[GRASS-SVN] r64530 - grass/branches/releasebranch_7_0/vector/v.generalize

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Feb 9 07:06:01 PST 2015


Author: neteler
Date: 2015-02-09 07:06:01 -0800 (Mon, 09 Feb 2015)
New Revision: 64530

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

Modified: grass/branches/releasebranch_7_0/vector/v.generalize/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.generalize/main.c	2015-02-09 15:05:53 UTC (rev 64529)
+++ grass/branches/releasebranch_7_0/vector/v.generalize/main.c	2015-02-09 15:06:01 UTC (rev 64530)
@@ -399,6 +399,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();
@@ -597,7 +598,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/branches/releasebranch_7_0/vector/v.generalize/v.generalize.html
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.generalize/v.generalize.html	2015-02-09 15:05:53 UTC (rev 64529)
+++ grass/branches/releasebranch_7_0/vector/v.generalize/v.generalize.html	2015-02-09 15:06:01 UTC (rev 64530)
@@ -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 \



More information about the grass-commit mailing list