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

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Feb 9 07:05:53 PST 2015


Author: neteler
Date: 2015-02-09 07:05:53 -0800 (Mon, 09 Feb 2015)
New Revision: 64529

Modified:
   grass/trunk/vector/v.generalize/main.c
   grass/trunk/vector/v.generalize/v.generalize.html
Log:
v.generalize: add user message about threshold; explain in manual

Modified: grass/trunk/vector/v.generalize/main.c
===================================================================
--- grass/trunk/vector/v.generalize/main.c	2015-02-09 14:45:37 UTC (rev 64528)
+++ grass/trunk/vector/v.generalize/main.c	2015-02-09 15:05:53 UTC (rev 64529)
@@ -401,6 +401,7 @@
 
 	G_message("-----------------------------------------------------");
 	G_message(_("Generalization (%s)..."), method_opt->answer);
+	G_message(_("Using threshold: %g %s"), thresh, G_database_unit_name(1));
 	G_percent_reset();
 
 	APoints = Vect_new_line_struct();
@@ -588,7 +589,7 @@
 
     G_message("-----------------------------------------------------");
     if (total_input != 0 && total_input != total_output)
-	G_done_msg(_("Number of vertices for selected features %s from %d to %d (%d%%)."),
+	G_done_msg(_("Number of vertices for selected features %s from %d to %d (%d%% remaining)"),
                    simplification ? _("reduced") : _("changed"), 
                    total_input, total_output,
                    (total_output * 100) / total_input);

Modified: grass/trunk/vector/v.generalize/v.generalize.html
===================================================================
--- grass/trunk/vector/v.generalize/v.generalize.html	2015-02-09 14:45:37 UTC (rev 64528)
+++ grass/trunk/vector/v.generalize/v.generalize.html	2015-02-09 15:05:53 UTC (rev 64529)
@@ -40,9 +40,10 @@
 </ul>
 
 Different algorithms require different parameters, but all the algorithms 
-have one parameter in common: the <b>threshold</b> parameter. In general, 
-the degree of simplification increases with the increasing value of 
-<b>threshold</b>.<br>
+have one parameter in common: the <b>threshold</b> parameter, given in map
+units (for latitude-longitude locations: in decimal degree). In general,
+the degree of simplification increases with the increasing value of
+<b>threshold</b>.
 
 <h4>ALGORITHM DESCRIPTIONS</h4>
 
@@ -77,22 +78,28 @@
 
 <i>Douglas-Peucker</i> and <i>Douglas-Peucker Reduction Algorithm</i> 
 use the same method to simplify the lines. Note that 
+
 <div class="code"><pre>
 v.generalize input=boundary_county output=boundary_county_dp20 method=douglas threshold=20
 </pre></div>
+
 is equivalent to
+
 <div class="code"><pre>
 v.generalize input=boundary_county output=boundary_county_dp_red20_100 \
              method=douglas_reduction threshold=20 reduction=100
 </pre></div>
+
 However, in this case, the first method is faster. Also observe that
 <i>douglas_reduction</i> never outputs more vertices than <i>douglas</i>,
 and that, in general, <i>douglas</i> is more efficient than 
 <i>douglas_reduction</i>. More importantly, the effect of
+
 <div class="code"><pre>
 v.generalize input=boundary_county output=boundary_county_dp_red0_30 \
              method=douglas_reduction threshold=0 reduction=30
 </pre></div>
+
 is that 'out' contains approximately only 30% of points of 'in'.
 
 
@@ -257,7 +264,8 @@
 <h2>EXAMPLES</h2>
 
 <h3>SIMPLIFICATION EXAMPLE</h3>
-Simplification of county boundaries with DP method (North Carolina sample dataset):
+Simplification of county boundaries with DP method (North Carolina sample dataset),
+threshold given in mapset units (here: meters):
 
 <div class="code"><pre>
 v.generalize input=boundary_county output=boundary_county_dp20 \
@@ -266,7 +274,8 @@
 
 <h3>SMOOTHING EXAMPLE</h3>
 
-Smoothing of road network with Chaiken method (North Carolina sample dataset):
+Smoothing of road network with Chaiken method (North Carolina sample dataset),
+threshold given in mapset units (here: meters):
 
 <div class="code"><pre>
 v.generalize input=roads output=roads_chaiken method=chaiken \
@@ -315,6 +324,6 @@
 
 Daniel Bundala, Google Summer of Code 2007, Student<br>
 Wolf Bergenheim, Mentor<br>
-Fixes: Markus Metz
+Partial rewrite: Markus Metz
 
 <p><i>Last changed: $Date$</i>



More information about the grass-commit mailing list