[GRASS-SVN] r68470 - in grass/trunk: raster/r.in.lidar raster3d/r3.in.lidar vector/v.in.lidar vector/v.out.lidar

svn_grass at osgeo.org svn_grass at osgeo.org
Thu May 19 14:28:21 PDT 2016


Author: wenzeslaus
Date: 2016-05-19 14:28:21 -0700 (Thu, 19 May 2016)
New Revision: 68470

Modified:
   grass/trunk/raster/r.in.lidar/local_proto.h
   grass/trunk/raster3d/r3.in.lidar/filters.h
   grass/trunk/vector/v.in.lidar/lidar.h
   grass/trunk/vector/v.out.lidar/main.c
Log:
give meaning to numbers associated with first/mid/last constants, now basically part of API

Modified: grass/trunk/raster/r.in.lidar/local_proto.h
===================================================================
--- grass/trunk/raster/r.in.lidar/local_proto.h	2016-05-19 21:19:00 UTC (rev 68469)
+++ grass/trunk/raster/r.in.lidar/local_proto.h	2016-05-19 21:28:21 UTC (rev 68470)
@@ -44,8 +44,8 @@
 
 #define LAS_ALL 0
 #define LAS_FIRST 1
-#define LAS_LAST 2
-#define LAS_MID 3
+#define LAS_MID 2
+#define LAS_LAST 3
 
 
 /* info.c */

Modified: grass/trunk/raster3d/r3.in.lidar/filters.h
===================================================================
--- grass/trunk/raster3d/r3.in.lidar/filters.h	2016-05-19 21:19:00 UTC (rev 68469)
+++ grass/trunk/raster3d/r3.in.lidar/filters.h	2016-05-19 21:28:21 UTC (rev 68470)
@@ -16,8 +16,8 @@
 
 #define LAS_ALL 0
 #define LAS_FIRST 1
-#define LAS_LAST 2
-#define LAS_MID 3
+#define LAS_MID 2
+#define LAS_LAST 3
 
 struct ReturnFilter
 {

Modified: grass/trunk/vector/v.in.lidar/lidar.h
===================================================================
--- grass/trunk/vector/v.in.lidar/lidar.h	2016-05-19 21:19:00 UTC (rev 68469)
+++ grass/trunk/vector/v.in.lidar/lidar.h	2016-05-19 21:28:21 UTC (rev 68470)
@@ -18,8 +18,8 @@
 
 #define LAS_ALL 0
 #define LAS_FIRST 1
-#define LAS_LAST 2
-#define LAS_MID 3
+#define LAS_MID 2
+#define LAS_LAST 3
 
 /*
  * ASPRS Standard LIDAR Point Classes

Modified: grass/trunk/vector/v.out.lidar/main.c
===================================================================
--- grass/trunk/vector/v.out.lidar/main.c	2016-05-19 21:19:00 UTC (rev 68469)
+++ grass/trunk/vector/v.out.lidar/main.c	2016-05-19 21:28:21 UTC (rev 68470)
@@ -28,8 +28,8 @@
 #include <liblas/capi/liblas.h>
 
 #define LAS_FIRST 1
-#define LAS_LAST 2
-#define LAS_MID 3
+#define LAS_MID 2
+#define LAS_LAST 3
 
 struct WriteContext
 {
@@ -392,16 +392,15 @@
     if (context->return_layer) {
         if (!Vect_cat_get(cats, context->return_layer, &cat))
             return;             /* TODO: is this an error? */
-        /* TODO: use LAS... as constants for numbers */
         if (cat == LAS_FIRST) {
-            LASPoint_SetReturnNumber(las_point, 1);
-            LASPoint_SetNumberOfReturns(las_point, 3);
+            LASPoint_SetReturnNumber(las_point, LAS_FIRST);
+            LASPoint_SetNumberOfReturns(las_point, LAS_FIRST);
         } else if (cat == LAS_LAST) {
-            LASPoint_SetReturnNumber(las_point, 3);
-            LASPoint_SetNumberOfReturns(las_point, 3);
+            LASPoint_SetReturnNumber(las_point, LAS_LAST);
+            LASPoint_SetNumberOfReturns(las_point, LAS_LAST);
         } else {
-            LASPoint_SetReturnNumber(las_point, 2);
-            LASPoint_SetNumberOfReturns(las_point, 3);
+            LASPoint_SetReturnNumber(las_point, LAS_MID);
+            LASPoint_SetNumberOfReturns(las_point, LAS_LAST);
         }
     }
     if (context->class_layer) {



More information about the grass-commit mailing list