[GRASS-SVN] r73012 - grass/trunk/vector/v.in.ogr

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Jul 28 04:26:19 PDT 2018


Author: mmetz
Date: 2018-07-28 04:26:19 -0700 (Sat, 28 Jul 2018)
New Revision: 73012

Modified:
   grass/trunk/vector/v.in.ogr/main.c
Log:
v.in.ogr: fix counter for G_percent()

Modified: grass/trunk/vector/v.in.ogr/main.c
===================================================================
--- grass/trunk/vector/v.in.ogr/main.c	2018-07-28 03:37:20 UTC (rev 73011)
+++ grass/trunk/vector/v.in.ogr/main.c	2018-07-28 11:26:19 UTC (rev 73012)
@@ -1532,11 +1532,12 @@
 #endif
 
 	    cat = 0;		/* field = layer + 1 */
+	    feature_count = 0;
 	    while ((Ogr_feature = ogr_getnextfeature(&OGR_iter, layer_id,
 						     layer_names[layer],
 						     poSpatialFilter[layer],
 						     attr_filter)) != NULL) {
-		G_percent(cat, n_features[layer], 2);
+		G_percent(feature_count++, n_features[layer], 2);
 
 		/* Category */
 		if (key_idx[layer] > -1)



More information about the grass-commit mailing list