[GRASS-SVN] r54071 - grass/trunk/raster/r.to.vect

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Nov 27 01:15:54 PST 2012


Author: martinl
Date: 2012-11-27 01:15:53 -0800 (Tue, 27 Nov 2012)
New Revision: 54071

Modified:
   grass/trunk/raster/r.to.vect/areas_io.c
   grass/trunk/raster/r.to.vect/main.c
Log:
r.to.vect: print progress when exporting areas


Modified: grass/trunk/raster/r.to.vect/areas_io.c
===================================================================
--- grass/trunk/raster/r.to.vect/areas_io.c	2012-11-27 08:46:48 UTC (rev 54070)
+++ grass/trunk/raster/r.to.vect/areas_io.c	2012-11-27 09:15:53 UTC (rev 54071)
@@ -298,6 +298,7 @@
 
     catNum = 1;
 
+    G_important_message(_("Writing areas..."));
     for (i = 0, p = a_list; i < n_areas; i++, p++) {
 	if (equivs[i] == i && p->width > 0 && !Rast_is_d_null_value(&(p->cat))) {
 	    char buf[1000];
@@ -310,6 +311,8 @@
 		catNum++;
 	    }
 
+            G_percent(i, n_areas, 3);
+            
 	    x = cell_head.west + (p->col +
 				  (p->width / 2.0)) * cell_head.ew_res;
 	    y = cell_head.north - (p->row + 0.5) * cell_head.ns_res;
@@ -372,6 +375,7 @@
 	    }
 	}
     }
-
+    G_percent(1, 1, 1);
+    
     return 0;
 }

Modified: grass/trunk/raster/r.to.vect/main.c
===================================================================
--- grass/trunk/raster/r.to.vect/main.c	2012-11-27 08:46:48 UTC (rev 54070)
+++ grass/trunk/raster/r.to.vect/main.c	2012-11-27 09:15:53 UTC (rev 54071)
@@ -261,7 +261,8 @@
 	if (fidx >= 0) {
 	    ncats = Vect_cidx_get_num_cats_by_index(&Map, fidx);
 	    lastcat = -1;
-
+            
+            G_important_message(_("Updating attributes..."));
 	    for (c = 0; c < ncats; c++) {
 		Vect_cidx_get_cat_by_index(&Map, fidx, c, &cat, &tp, &id);
 



More information about the grass-commit mailing list