[GRASS-SVN] r48384 - grass/trunk/vector/v.voronoi
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Sep 20 10:10:08 EDT 2011
Author: mmetz
Date: 2011-09-20 07:10:08 -0700 (Tue, 20 Sep 2011)
New Revision: 48384
Modified:
grass/trunk/vector/v.voronoi/main.c
Log:
v.voronoi: add messages
Modified: grass/trunk/vector/v.voronoi/main.c
===================================================================
--- grass/trunk/vector/v.voronoi/main.c 2011-09-20 14:05:12 UTC (rev 48383)
+++ grass/trunk/vector/v.voronoi/main.c 2011-09-20 14:10:08 UTC (rev 48384)
@@ -363,7 +363,7 @@
Vect_close(&In);
- /* cleaning */
+ /* cleaning part 1: count errors */
Vect_build_partial(&Out, GV_BUILD_CENTROIDS);
err_boundaries = err_centr_out = err_centr_dupl = err_nocentr = 0;
nlines = Vect_get_num_lines(&Out);
@@ -403,9 +403,11 @@
err_nocentr++;
}
+ /* cleaning part 2: snap */
if (err_nocentr || err_centr_dupl || err_centr_out) {
int nmod;
+ G_important_message(_("Output needs topological cleaning"));
Vect_snap_lines(&Out, GV_BOUNDARY, 1e-7, NULL);
do {
Vect_break_lines(&Out, GV_BOUNDARY, NULL);
@@ -435,7 +437,9 @@
}
}
}
+ /* cleaning part 3: remove remaining incorrect boundaries */
if (err_boundaries) {
+ G_important_message(_("Removing incorrect boundaries from output"));
nlines = Vect_get_num_lines(&Out);
for (line = 1; line <= nlines; line++) {
@@ -458,6 +462,7 @@
}
}
+ /* build clean topology */
Vect_build_partial(&Out, GV_BUILD_NONE);
Vect_build(&Out);
Vect_close(&Out);
More information about the grass-commit
mailing list