[GRASS-SVN] r61480 - grass/trunk/raster/r.in.lidar

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jul 31 09:53:22 PDT 2014


Author: neteler
Date: 2014-07-31 09:53:22 -0700 (Thu, 31 Jul 2014)
New Revision: 61480

Modified:
   grass/trunk/raster/r.in.lidar/main.c
Log:
r.in.lidar: support for intensity values added

Modified: grass/trunk/raster/r.in.lidar/main.c
===================================================================
--- grass/trunk/raster/r.in.lidar/main.c	2014-07-31 16:51:55 UTC (rev 61479)
+++ grass/trunk/raster/r.in.lidar/main.c	2014-07-31 16:53:22 UTC (rev 61480)
@@ -146,7 +146,7 @@
     struct Option *input_opt, *output_opt, *percent_opt, *type_opt, *filter_opt;
     struct Option *method_opt, *zrange_opt, *zscale_opt;
     struct Option *trim_opt, *pth_opt, *res_opt;
-    struct Flag *print_flag, *scan_flag, *shell_style, *over_flag, *extents_flag;
+    struct Flag *print_flag, *scan_flag, *shell_style, *over_flag, *extents_flag, *intens_flag;
 
     /* LAS */
     LASReaderH LAS_reader;
@@ -277,6 +277,11 @@
     shell_style->description =
 	_("In scan mode, print using shell script style");
 
+    intens_flag = G_define_flag();
+    intens_flag->key = 'i';
+    intens_flag->description =
+        _("Import intensity values rather than z values");
+
     if (G_parser(argc, argv))
 	exit(EXIT_FAILURE);
 
@@ -761,7 +766,11 @@
 
 	    x = LASPoint_GetX(LAS_point);
 	    y = LASPoint_GetY(LAS_point);
-	    z = LASPoint_GetZ(LAS_point);
+	    if (intens_flag->answer)
+		/* use z variable here to allow for scaling of intensity below */
+		z = LASPoint_GetIntensity(LAS_point);
+	    else
+		z = LASPoint_GetZ(LAS_point);
 
 	if (return_filter != LAS_ALL) {
 	    int return_no = LASPoint_GetReturnNumber(LAS_point);



More information about the grass-commit mailing list