[GRASS-SVN] r42113 - grass/trunk/vector/v.buffer

svn_grass at osgeo.org svn_grass at osgeo.org
Tue May 4 11:17:15 EDT 2010


Author: martinl
Date: 2010-05-04 11:17:15 -0400 (Tue, 04 May 2010)
New Revision: 42113

Modified:
   grass/trunk/vector/v.buffer/main.c
Log:
v.buffer: be more verbose
(merge r42111 from devbr6)


Modified: grass/trunk/vector/v.buffer/main.c
===================================================================
--- grass/trunk/vector/v.buffer/main.c	2010-05-04 15:14:30 UTC (rev 42112)
+++ grass/trunk/vector/v.buffer/main.c	2010-05-04 15:17:15 UTC (rev 42113)
@@ -501,9 +501,12 @@
     /* Calculate new centroids for all areas */
     nareas = Vect_get_num_areas(&Out);
     Areas = (char *)G_calloc(nareas + 1, sizeof(char));
+    G_message(_("Calculating centroids for areas..."));
     for (area = 1; area <= nareas; area++) {
 	double x, y;
-
+	
+	G_percent(area, nareas, 2);
+	
 	G_debug(3, "area = %d", area);
 
 	if (!Vect_area_alive(&Out, area))
@@ -528,7 +531,9 @@
     G_debug(3, "nlines = %d", nlines);
     Lines = (char *)G_calloc(nlines + 1, sizeof(char));
 
+    G_message(_("Generating list of boundaries to be deleted..."));
     for (line = 1; line <= nlines; line++) {
+	G_percent(line, nlines, 2);
 	int j, side[2], areas[2];
 
 	G_debug(3, "line = %d", line);
@@ -558,7 +563,9 @@
     G_free(Areas);
 
     /* Delete boundaries */
+    G_message(_("Deleting boundaries..."));
     for (line = 1; line <= nlines; line++) {
+	G_percent(line, nlines, 2);
 	if (Lines[line]) {
 	    G_debug(3, " delete line %d", line);
 	    Vect_delete_line(&Out, line);
@@ -571,8 +578,10 @@
     Vect_reset_cats(Cats);
     Vect_cat_set(Cats, 1, 1);
     nareas = Vect_get_num_areas(&Out);
-
+    
+    G_message(_("Calculating centroids for areas..."));    
     for (area = 1; area <= nareas; area++) {
+	G_percent(area, nareas, 2);
 	double x, y;
 
 	G_debug(3, "area = %d", area);



More information about the grass-commit mailing list