Selaa lähdekoodia

r.to.vect: print progress when exporting areas

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@54071 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 12 vuotta sitten
vanhempi
commit
6fa9b79b2e
2 muutettua tiedostoa jossa 7 lisäystä ja 2 poistoa
  1. 5 1
      raster/r.to.vect/areas_io.c
  2. 2 1
      raster/r.to.vect/main.c

+ 5 - 1
raster/r.to.vect/areas_io.c

@@ -298,6 +298,7 @@ int write_area(struct area_table *a_list,	/* list of areas */
 
     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 @@ int write_area(struct area_table *a_list,	/* list of areas */
 		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 @@ int write_area(struct area_table *a_list,	/* list of areas */
 	    }
 	}
     }
-
+    G_percent(1, 1, 1);
+    
     return 0;
 }

+ 2 - 1
raster/r.to.vect/main.c

@@ -261,7 +261,8 @@ int main(int argc, char *argv[])
 	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);