[GRASS-SVN] r66346 - grass/trunk/vector/v.in.lidar

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Sep 26 19:12:05 PDT 2015


Author: wenzeslaus
Date: 2015-09-26 19:12:05 -0700 (Sat, 26 Sep 2015)
New Revision: 66346

Modified:
   grass/trunk/vector/v.in.lidar/main.c
Log:
v.in.lidar: check cat counter only when actually used

This fixes 66344 which ignored r66343. Also fixes 66345 which reported
unrelated warning when 66344 actually happened.


Modified: grass/trunk/vector/v.in.lidar/main.c
===================================================================
--- grass/trunk/vector/v.in.lidar/main.c	2015-09-27 01:59:51 UTC (rev 66345)
+++ grass/trunk/vector/v.in.lidar/main.c	2015-09-27 02:12:05 UTC (rev 66346)
@@ -978,8 +978,7 @@
             if (limit_n_counter == limit_n)
                 break;
         }
-        
-        if (cat == GV_CAT_MAX) {
+        if (id_layer && cat == GV_CAT_MAX) {
             cat_max_reached = TRUE;
             break;
         }
@@ -1002,9 +1001,10 @@
 	Vect_build(&Map);
     Vect_close(&Map);
 
-    /* can be easily determined only when not having count limit */
-    if (!limit_n && points_imported != n_features - not_valid - n_outside
-            - n_filtered - n_class_filtered - offset_n_counter - n_count_filtered)
+    /* can be easily determined only when iterated over all points */
+    if (!limit_n && !cat_max_reached && points_imported != n_features
+            - not_valid - n_outside - n_filtered - n_class_filtered
+            - offset_n_counter - n_count_filtered)
         G_warning(_("The underlying libLAS library is at its limits."
                     " Previously reported counts might have been distorted."
                     " However, the import itself should be unaffected."));



More information about the grass-commit mailing list