[GRASS-SVN] r61798 - in grass/branches/releasebranch_7_0: . raster/r.in.lidar

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Sep 4 21:37:31 PDT 2014


Author: neteler
Date: 2014-09-04 21:37:31 -0700 (Thu, 04 Sep 2014)
New Revision: 61798

Modified:
   grass/branches/releasebranch_7_0/
   grass/branches/releasebranch_7_0/raster/r.in.lidar/main.c
Log:
r.in.lidar: support for intensity values added (trunk, r61480)


Property changes on: grass/branches/releasebranch_7_0
___________________________________________________________________
Modified: svn:mergeinfo
   - /grass/trunk:61380,61420,61422,61500,61764
   + /grass/trunk:61380,61420,61422,61480,61500,61764

Modified: grass/branches/releasebranch_7_0/raster/r.in.lidar/main.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.in.lidar/main.c	2014-09-05 04:27:41 UTC (rev 61797)
+++ grass/branches/releasebranch_7_0/raster/r.in.lidar/main.c	2014-09-05 04:37:31 UTC (rev 61798)
@@ -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