[GRASS-SVN] r43401 - grass/branches/develbranch_6/vector/v.clean
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Sep 3 12:49:02 EDT 2010
Author: mmetz
Date: 2010-09-03 16:49:02 +0000 (Fri, 03 Sep 2010)
New Revision: 43401
Modified:
grass/branches/develbranch_6/vector/v.clean/prune.c
grass/branches/develbranch_6/vector/v.clean/rmdac.c
grass/branches/develbranch_6/vector/v.clean/rmline.c
Log:
cleaning tools in v.clean: show progress, report modifications
Modified: grass/branches/develbranch_6/vector/v.clean/prune.c
===================================================================
--- grass/branches/develbranch_6/vector/v.clean/prune.c 2010-09-03 16:44:13 UTC (rev 43400)
+++ grass/branches/develbranch_6/vector/v.clean/prune.c 2010-09-03 16:49:02 UTC (rev 43401)
@@ -60,6 +60,8 @@
for (line = 1; line <= nlines; line++) {
+ G_percent(line, nlines, 1);
+
if (!Vect_line_alive(Out, line))
continue;
@@ -160,7 +162,7 @@
if (intersect) {
G_debug(3,
- "The pruned boundary instersects another boundary -> not pruned");
+ "The pruned boundary intersects another boundary -> not pruned");
not_pruned_lines++;
continue;
}
Modified: grass/branches/develbranch_6/vector/v.clean/rmdac.c
===================================================================
--- grass/branches/develbranch_6/vector/v.clean/rmdac.c 2010-09-03 16:44:13 UTC (rev 43400)
+++ grass/branches/develbranch_6/vector/v.clean/rmdac.c 2010-09-03 16:49:02 UTC (rev 43401)
@@ -34,10 +34,10 @@
G_debug(1, "nlines = %d", nlines);
ndupl = 0;
- if (G_verbose() > G_verbose_min())
- fprintf(stderr, _("Duplicate area centroids: %5d"), ndupl);
for (i = 1; i <= nlines; i++) {
+ G_percent(i, nlines, 2);
+
if (!Vect_line_alive(Out, i))
continue;
@@ -52,18 +52,13 @@
Vect_delete_line(Out, i);
ndupl++;
- if (G_verbose() > G_verbose_min())
- fprintf(stderr, "\r%s: %5d", _("Duplicate area centroids"),
- ndupl);
-
if (Err) {
Vect_write_line(Err, type, Points, Cats);
}
}
}
- if (G_verbose() > G_verbose_min())
- fprintf(stderr, "\n");
+ G_verbose_message(_("Duplicate area centroids: %d"), ndupl);
Vect_destroy_line_struct(Points);
Vect_destroy_cats_struct(Cats);
Modified: grass/branches/develbranch_6/vector/v.clean/rmline.c
===================================================================
--- grass/branches/develbranch_6/vector/v.clean/rmline.c 2010-09-03 16:44:13 UTC (rev 43400)
+++ grass/branches/develbranch_6/vector/v.clean/rmline.c 2010-09-03 16:49:02 UTC (rev 43401)
@@ -37,6 +37,8 @@
G_debug(1, "nlines = %d", nlines);
for (line = 1; line <= nlines; line++) {
+ G_percent(line, nlines, 1);
+
if (!Vect_line_alive(Map, line))
continue;
@@ -57,6 +59,8 @@
count++;
}
+ G_verbose_message(_("Lines / boundaries removed: %d"), count);
+
Vect_destroy_line_struct(Points);
Vect_destroy_cats_struct(Cats);
More information about the grass-commit
mailing list