[GRASS-SVN] r68451 - grass/trunk/vector/v.generalize

svn_grass at osgeo.org svn_grass at osgeo.org
Tue May 17 13:21:17 PDT 2016


Author: mmetz
Date: 2016-05-17 13:21:16 -0700 (Tue, 17 May 2016)
New Revision: 68451

Modified:
   grass/trunk/vector/v.generalize/main.c
   grass/trunk/vector/v.generalize/v.generalize.html
Log:
v.generalize: change error output to contain errors, update manual

Modified: grass/trunk/vector/v.generalize/main.c
===================================================================
--- grass/trunk/vector/v.generalize/main.c	2016-05-17 14:10:47 UTC (rev 68450)
+++ grass/trunk/vector/v.generalize/main.c	2016-05-17 20:21:16 UTC (rev 68451)
@@ -96,8 +96,10 @@
     error_out = G_define_standard_option(G_OPT_V_OUTPUT);
     error_out->key = "error";
     error_out->required = NO;
+    error_out->label =
+	_("Error map with failed generalizations");
     error_out->description =
-	_("Error map of all lines and boundaries not being generalized due to topology issues or over-simplification");
+	_("Lines and boundaries causing errors (collapsed to a point or topology errors)");
 
     method_opt = G_define_option();
     method_opt->key = "method";
@@ -540,7 +542,7 @@
 		after = APoints->n_points;
 		n_oversimplified++;
                 if (error_out->answer)
-		    Vect_write_line(&Error, type, APoints, Cats);
+		    Vect_write_line(&Error, GV_POINT, Points, Cats);
 	    }
 	    /* check for topology corruption */
 	    else if (type == GV_BOUNDARY) {
@@ -548,7 +550,7 @@
 		    after = APoints->n_points;
 		    not_modified_boundaries++;
                     if (error_out->answer)
-		        Vect_write_line(&Error, type, APoints, Cats);
+		        Vect_write_line(&Error, type, Points, Cats);
 		}
 		else
 		    after = Points->n_points;

Modified: grass/trunk/vector/v.generalize/v.generalize.html
===================================================================
--- grass/trunk/vector/v.generalize/v.generalize.html	2016-05-17 14:10:47 UTC (rev 68450)
+++ grass/trunk/vector/v.generalize/v.generalize.html	2016-05-17 20:21:16 UTC (rev 68451)
@@ -20,14 +20,32 @@
 up to 4000% of the number of vertices in the original. In such an instance, 
 it is always a good idea to simplify the line after smoothing.
 
-<p>Smoothing and simplification algorithms implemented in this module work 
-line by line, i.e. simplification/smoothing of one line does not affect 
-the other lines; they are treated separately.  Also, the first and the 
-last point of each line is never translated and/or deleted. 
+<p>Smoothing and simplification algorithms implemented in this module 
+work line by line, i.e. simplification/smoothing of one line does not 
+affect the other lines; they are treated separately. For isolated loops 
+formed by a single line/boundary, he first and the last point of each 
+line/boundary can be translated and/or deleted, unless the <em>-l</em> 
+flag is used to disable loop support.
 
+<p>Lines and boundaries are not translated if they would collapse to a 
+single point. Boundaries are not translated if they would intersect 
+with themselves or other boundaries. Such erroneus features are written 
+to an optional <em>error</em> vector map. Overlaying the <em>error</em> 
+map over the generalized map indicates the kind of error. 
+Lines/boundaries collapsing to a point are written out as points, 
+boundaries violating topology are written out as boundaries. The 
+<em>error</em> map can be overlaid over the generalized map to 
+understand why some features were not generalized.
+
+
 <h3>SIMPLIFICATION</h3>
 
-<em>v.generalize</em> contains following line simplification algorithms:
+Simplification can fail for many boundaries if the simplification 
+parameters would result in a large reduction of vertices. If many 
+lines/boundaries could not be simplified, try different parameters that 
+would cause a lower degree of simplification.
+
+<p><em>v.generalize</em> contains following line simplification algorithms:
 <ul>
 <li>Douglas-Peucker Algorithm</li>
 <li>Douglas-Peucker Reduction Algorithm</li>



More information about the grass-commit mailing list