[Liblas-commits] r1012 - trunk/apps

liblas-commits at liblas.org liblas-commits at liblas.org
Tue Feb 10 23:34:06 EST 2009


Author: hobu
Date: Tue Feb 10 23:34:06 2009
New Revision: 1012
URL: http://liblas.org/changeset/1012

Log:
allow las2las to write 1.2 format

Modified:
   trunk/apps/las2las.c

Modified: trunk/apps/las2las.c
==============================================================================
--- trunk/apps/las2las.c	(original)
+++ trunk/apps/las2las.c	Tue Feb 10 23:34:06 2009
@@ -27,6 +27,7 @@
 
 #define LAS_FORMAT_10 0
 #define LAS_FORMAT_11 1
+#define LAS_FORMAT_12 2
 
 void usage()
 {
@@ -202,8 +203,11 @@
             else if (strcmp(argv[i], "1.1") == 0) {
                 format = LAS_FORMAT_11;
             } 
+            else if (strcmp(argv[i], "1.2") == 0) {
+                format = LAS_FORMAT_12;
+            }
             else {
-                LASError_Print("Format must be specified as 1.0 or 1.1");
+                LASError_Print("Format must be specified as 1.0, 1.1, or 1.2");
             }
 
         }
@@ -624,9 +628,12 @@
     
     if (format == LAS_FORMAT_10) {
         LASHeader_SetVersionMinor(surviving_header, 0);
-    } else {
+    } else if (format == LAS_FORMAT_11){
         LASHeader_SetVersionMinor(surviving_header, 1);
+    } else if (format == LAS_FORMAT_12) {
+        LASHeader_SetVersionMinor(surviving_header, 2);
     }
+    
 
 /*  if (remove_extra_header) surviving_header.offset_to_point_data = surviving_header.header_size;
 */


More information about the Liblas-commits mailing list