[osmpbf] 19/22: Fix line endings (CRLF->LF), remove spaces at end of lines

Bas Couwenberg sebastic at xs4all.nl
Sun Mar 16 10:08:42 UTC 2014


This is an automated email from the git hooks/post-receive script.

sebastic-guest pushed a commit to tag v1.3.1
in repository osmpbf.

commit 73c5bd159ddd6f9471c4d59b3ce472c870b193e5
Author: Jochen Topf <jochen at topf.org>
Date:   Mon Sep 2 20:44:02 2013 +0200

    Fix line endings (CRLF->LF), remove spaces at end of lines
---
 src.java/crosby/binary/test/ReadFileExample.java | 172 +++++++++++------------
 src/CMakeLists.txt                               |   4 +-
 tools/CMakeLists.txt                             |   6 +-
 3 files changed, 91 insertions(+), 91 deletions(-)

diff --git a/src.java/crosby/binary/test/ReadFileExample.java b/src.java/crosby/binary/test/ReadFileExample.java
index 082d406..d8ad520 100644
--- a/src.java/crosby/binary/test/ReadFileExample.java
+++ b/src.java/crosby/binary/test/ReadFileExample.java
@@ -1,86 +1,86 @@
-package crosby.binary.test;
-
-import crosby.binary.*;
-import crosby.binary.Osmformat.*;
-import crosby.binary.file.*;
-import java.io.*;
-import java.util.List;
-
-/**
- * Demonstrates how to read a file. Reads sample.pbf from the resources folder
- * and prints details about it to the standard output.
- * 
- * @author Michael Tandy
- */
-public class ReadFileExample {
-    
-    public static void main(String[] args) throws Exception {
-        InputStream input = ReadFileExample.class.getResourceAsStream("/sample.pbf");
-        BlockReaderAdapter brad = new TestBinaryParser();
-        new BlockInputStream(input, brad).process();
-    }
-    
-    private static class TestBinaryParser extends BinaryParser {
-
-        @Override
-        protected void parseRelations(List<Relation> rels) {
-            if (!rels.isEmpty())
-                System.out.println("Got some relations to parse.");
-            Relation r = null;
-        }
-
-        @Override
-        protected void parseDense(DenseNodes nodes) {
-            long lastId=0;
-            long lastLat=0;
-            long lastLon=0;
-            
-            for (int i=0 ; i<nodes.getIdCount() ; i++) {
-                lastId += nodes.getId(i);
-                lastLat += nodes.getLat(i);
-                lastLon += nodes.getLon(i);
-                System.out.printf("Dense node, ID %d @ %.6f,%.6f\n",
-                        lastId,parseLat(lastLat),parseLon(lastLon));
-            }
-        }
-
-        @Override
-        protected void parseNodes(List<Node> nodes) {
-            for (Node n : nodes) {
-                System.out.printf("Regular node, ID %d @ %.6f,%.6f\n",
-                        n.getId(),parseLat(n.getLat()),parseLon(n.getLon()));
-            }
-        }
-
-        @Override
-        protected void parseWays(List<Way> ways) {
-            for (Way w : ways) {
-                System.out.println("Way ID " + w.getId());
-                StringBuilder sb = new StringBuilder();
-                sb.append("  Nodes: ");
-                long lastRef = 0;
-                for (Long ref : w.getRefsList()) {
-                    lastRef+= ref;
-                    sb.append(lastRef).append(" ");
-                }
-                sb.append("\n  Key=value pairs: ");
-                for (int i=0 ; i<w.getKeysCount() ; i++) {
-                    sb.append(getStringById(w.getKeys(i))).append("=")
-                            .append(getStringById(w.getVals(i))).append(" ");
-                }
-                System.out.println(sb.toString());
-            }
-        }
-
-        @Override
-        protected void parse(HeaderBlock header) {
-            System.out.println("Got header block.");
-        }
-
-        public void complete() {
-            System.out.println("Complete!");
-        }
-        
-    }
-    
-}
+package crosby.binary.test;
+
+import crosby.binary.*;
+import crosby.binary.Osmformat.*;
+import crosby.binary.file.*;
+import java.io.*;
+import java.util.List;
+
+/**
+ * Demonstrates how to read a file. Reads sample.pbf from the resources folder
+ * and prints details about it to the standard output.
+ *
+ * @author Michael Tandy
+ */
+public class ReadFileExample {
+
+    public static void main(String[] args) throws Exception {
+        InputStream input = ReadFileExample.class.getResourceAsStream("/sample.pbf");
+        BlockReaderAdapter brad = new TestBinaryParser();
+        new BlockInputStream(input, brad).process();
+    }
+
+    private static class TestBinaryParser extends BinaryParser {
+
+        @Override
+        protected void parseRelations(List<Relation> rels) {
+            if (!rels.isEmpty())
+                System.out.println("Got some relations to parse.");
+            Relation r = null;
+        }
+
+        @Override
+        protected void parseDense(DenseNodes nodes) {
+            long lastId=0;
+            long lastLat=0;
+            long lastLon=0;
+
+            for (int i=0 ; i<nodes.getIdCount() ; i++) {
+                lastId += nodes.getId(i);
+                lastLat += nodes.getLat(i);
+                lastLon += nodes.getLon(i);
+                System.out.printf("Dense node, ID %d @ %.6f,%.6f\n",
+                        lastId,parseLat(lastLat),parseLon(lastLon));
+            }
+        }
+
+        @Override
+        protected void parseNodes(List<Node> nodes) {
+            for (Node n : nodes) {
+                System.out.printf("Regular node, ID %d @ %.6f,%.6f\n",
+                        n.getId(),parseLat(n.getLat()),parseLon(n.getLon()));
+            }
+        }
+
+        @Override
+        protected void parseWays(List<Way> ways) {
+            for (Way w : ways) {
+                System.out.println("Way ID " + w.getId());
+                StringBuilder sb = new StringBuilder();
+                sb.append("  Nodes: ");
+                long lastRef = 0;
+                for (Long ref : w.getRefsList()) {
+                    lastRef+= ref;
+                    sb.append(lastRef).append(" ");
+                }
+                sb.append("\n  Key=value pairs: ");
+                for (int i=0 ; i<w.getKeysCount() ; i++) {
+                    sb.append(getStringById(w.getKeys(i))).append("=")
+                            .append(getStringById(w.getVals(i))).append(" ");
+                }
+                System.out.println(sb.toString());
+            }
+        }
+
+        @Override
+        protected void parse(HeaderBlock header) {
+            System.out.println("Got header block.");
+        }
+
+        public void complete() {
+            System.out.println("Complete!");
+        }
+
+    }
+
+}
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d752da1..4a2b9ac 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,9 +1,9 @@
 PROTOBUF_GENERATE_CPP(CPPS HS fileformat.proto osmformat.proto)
 
 if(MSVC)
-    set(CMAKE_CXX_FLAGS "/O3")        
+    set(CMAKE_CXX_FLAGS "/O3")
 else()
-    set(CMAKE_CXX_FLAGS "-O3")        
+    set(CMAKE_CXX_FLAGS "-O3")
 endif()
 
 add_library(osmpbf STATIC ${CPPS})
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 0a14450..91f01eb 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -2,7 +2,7 @@ SET(PROJECT osmpbf-outline)
 PROJECT(${PROJECT})
 
 if(MSVC)
-    set(CMAKE_CXX_FLAGS "/O3")        
+    set(CMAKE_CXX_FLAGS "/O3")
 else()
     set(CMAKE_CXX_FLAGS "-O3 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64")
 endif()
@@ -23,10 +23,10 @@ CHECK_INCLUDE_FILES(winsock2.h HAVE_WINSOCK)
 if(HAVE_WINSOCK)
    add_definitions( -DD_HAVE_WINSOCK )
    SET(WINSOCK_LIB ws2_32)
-endif() 
+endif()
 
 
 find_package(Threads)
 target_link_libraries(${PROJECT} ${WINSOCK_LIB} ${ZLIB_LIBRARY}  osmpbf ${PROTOBUF_LITE_LIBRARIES})
 
-INSTALL(TARGETS ${PROJECT} RUNTIME DESTINATION bin)
\ No newline at end of file
+INSTALL(TARGETS ${PROJECT} RUNTIME DESTINATION bin)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/osmpbf.git



More information about the Pkg-grass-devel mailing list