[GRASS-SVN] r63358 - grass/branches/develbranch_6/raster/r.walk

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Dec 3 02:55:17 PST 2014


Author: neteler
Date: 2014-12-03 02:55:16 -0800 (Wed, 03 Dec 2014)
New Revision: 63358

Modified:
   grass/branches/develbranch_6/raster/r.walk/description.html
   grass/branches/develbranch_6/raster/r.walk/main.c
Log:
r.walk: sync length of module description to r.cost; minor HTML sync to trunk

Modified: grass/branches/develbranch_6/raster/r.walk/description.html
===================================================================
--- grass/branches/develbranch_6/raster/r.walk/description.html	2014-12-03 10:55:04 UTC (rev 63357)
+++ grass/branches/develbranch_6/raster/r.walk/description.html	2014-12-03 10:55:16 UTC (rev 63358)
@@ -1,35 +1,49 @@
 <h2>DESCRIPTION</h2>
 
-<em>r.walk</em> outputs 1) a raster map layer showing the lowest
+<em>r.walk</em> computes anisotropic cumulative cost of moving between
+different geographic locations on an input elevation raster map whose
+cell category values represent elevation combined with an input raster
+map layer whose cell values represent friction cost.
+
+<p>
+<em>r.walk</em> outputs 1) a raster map showing the lowest
 cumulative cost of moving between each cell and the user-specified
-starting points and 2) a second raster map layer showing the movement 
+starting points and 2) a second raster map showing the movement 
 direction to the next cell on the path back to the start point (see 
-<a href="#move">Movement Direction</a>). It uses an input elevation raster map layer whose
-cell category values represent elevation, combined with a second input
-raster map layer whose cell values represent friction costs.
+<a href="#move">Movement Direction</a>). It uses an input elevation 
+raster map whose cell category values represent elevation, 
+combined with a second input raster map whose cell values 
+represent friction costs.
 
-This function is similar to <em>r.cost</em>, but in addiction to a
-friction map, it considers an anisotropic travel time due to the
-different walking speed associated with downhill and uphill movements.
 <p>
+This function is similar to <em><a href="r.cost.html">r.cost</a></em>,
+but in addiction to a friction map, it considers an anisotropic travel
+time due to the different walking speed associated with downhill and
+uphill movements.
 
+<h2>NOTES</h2>
+
+<p>
 The formula from Aitken 1977/Langmuir 1984 (based on Naismith's rule
 for walking times) has been used to estimate the cost parameters of
 specific slope intervals:
 
-<p>
+<div class="code"><pre>
 T= [(a)*(Delta S)] + [(b)*(Delta H uphill)] + [(c)*(Delta H moderate downhill)] + [(d)*(Delta H steep downhill)]
+</pre></div>
+
+where:
+<ul>
+  <li><tt>T</tt> is time of movement in seconds,</li>
+  <li><tt>Delta S</tt> is the distance covered in meters,</li>
+  <li><tt>Delta H</tt> is the altitude difference in meter.</li>
+</ul>
+
 <p>
-where:<br>
-T is time of movement in seconds,<br>
-Delta S is the distance covered in meters,<br>
-Delta H is the altitude difference in meter.
-<p> 
+The a, b, c, d <b>walk_coeff</b> parameters take in account
+movement speed in the different conditions and are linked to:
 
-The a, b, c, d parameters take in account movement speed in the different
-conditions and are linked to:
-
-</ul>
+<ul>
   <li>a: underfoot condition (a=1/walking_speed)</li>
   <li>b: underfoot condition and cost associated to movement uphill</li>
   <li>c: underfoot condition and cost associated to movement moderate downhill</li>
@@ -38,20 +52,20 @@
 
 It has been proved that moving downhill is favourable up to a specific
 slope value threshold, after that it becomes unfavourable. The default
-slope value threshold (slope factor) is -0.2125, corresponding to
-tan(-12), calibrated on human behaviour (>5 and <12
-degrees: moderate downhill; >12 degrees: steep downhill). The
-default values for a, b, c, d are those proposed by Langmuir (0.72, 6.0,
-1.9998, -1.9998), based on man walking effort in standard
-conditions.<p>
+slope value threshold (<b>slope_factor</b>) is -0.2125, corresponding
+to tan(-12), calibrated on human behaviour (>5 and <12 degrees:
+moderate downhill; >12 degrees: steep downhill). The default values
+for a, b, c, d <b>walk_coeff</b> parameters are those proposed by
+Langmuir (0.72, 6.0, 1.9998, -1.9998), based on man walking effort in
+standard conditions.
 
-The lambda parameter of the linear equation combining movement and
-friction costs:<br>
-
-total cost = movement time cost + (lambda) * friction costs<br>
+<p>The <b>lambda</b> parameter of the linear equation
+combining movement and friction costs:<br>
+<div class="code"><pre>
+total cost = movement time cost + (lambda) * friction costs
+</pre></div>
 must be set in the option section of <em>r.walk</em>.
 <p>
-
 For a more accurate result, the "knight's move" option can be used
 (although it is more time consuming). In the diagram below, the center
 location (O) represents a grid cell from which cumulative distances
@@ -71,21 +85,26 @@
 The minimum cumulative costs are computed using Dijkstra's
 algorithm, that find an optimum solution (for more details see
 <em>r.cost</em>, that uses the same algorithm).
+
 <a name="move"></a>
 <h2>Movement Direction</h2>
 <p>
 The movement direction surface is created to record the sequence of
 movements that created the cost accumulation surface. Without it 
-<EM>r.drain</EM> would not correctly create a path from an end point 
+<em>r.drain</em> would not correctly create a path from an end point 
 back to the start point. The direction shown in each cell points <b>away</b> 
 from the cell that came before it. The directions are recorded as
-GRASS standard directions:<div class="code"><pre>
+degrees CCW from East:
+
+<!-- this (description) differs from trunk: -->
+<div class="code"><pre>
        112.5 90  67.5         i.e. a cell with the value 135 
 157.5  135   0   45   22.5    means the cell <b>before</b> it is 
        180   x   0            to the south-east.
 202.5  225  270  315  337.5
        247.5     292.5
 </pre></div>
+
 <p>
 Once <em>r.walk</em> computes the cumulative cost map as a linear
 combination of friction cost (from friction map) and the altitude and
@@ -95,15 +114,6 @@
 the path is computed according to the proper movement directions.
 
 
-<h2>SEE ALSO</h2>
-
-<em><a href="r.cost.html">r.cost</a></em>,
-<em><a href="r.drain.html">r.drain</a></em>,
-<em><a href="r.in.ascii.html">r.in.ascii</a></em>,
-<em><a href="r.mapcalc.html">r.mapcalc</a></em>,
-<em><a href="r.out.ascii.html">r.out.ascii</a></em>
-
-
 <h2>REFERENCES</h2>
 
 <ul>
@@ -117,6 +127,17 @@
  Sports Council/MLTB. Cordee, Leicester.
 </ul>
 
+<h2>SEE ALSO</h2>
+
+<em>
+<a href="r.cost.html">r.cost</a>,
+<a href="r.drain.html">r.drain</a>,
+<a href="r.in.ascii.html">r.in.ascii</a>,
+<a href="r.mapcalc.html">r.mapcalc</a>,
+<a href="r.out.ascii.html">r.out.ascii</a>
+</em>
+
+
 <h2>AUTHORS</h2>
 
 <b>Based on r.cost written by :</b>
@@ -145,7 +166,7 @@
 In collaboration with: Franchi Matteo, Vaglia Beatrice, Bartucca Luisa, Fava Valentina and Tolotti Mathias, 2004
 
 <p>
-<b>Updated for Grass 6.1</b>
+<b>Updated for GRASS 6.1</b>
 <p>
 Roberto Flor and Markus Neteler
 

Modified: grass/branches/develbranch_6/raster/r.walk/main.c
===================================================================
--- grass/branches/develbranch_6/raster/r.walk/main.c	2014-12-03 10:55:04 UTC (rev 63357)
+++ grass/branches/develbranch_6/raster/r.walk/main.c	2014-12-03 10:55:16 UTC (rev 63358)
@@ -28,7 +28,7 @@
  *               Updated for calculation errors and directional surface generation
  *                 Colin Nielsen <colin.nielsen gmail com>
  * PURPOSE:      anisotropic movements on cost surfaces
- * COPYRIGHT:    (C) 1999-2006 by the GRASS Development Team
+ * COPYRIGHT:    (C) 1999-2014 by the GRASS Development Team
  *
  *               This program is free software under the GNU General Public
  *               License (>=v2). Read the file COPYING that comes with GRASS
@@ -176,12 +176,10 @@
     module = G_define_module();
     module->keywords = _("raster, cost surface, cumulative costs");
     module->description =
-	_("Outputs a raster map layer showing the "
+	_("Creates a raster map showing the "
 	  "anisotropic cumulative cost of moving between different "
-	  "geographic locations on an input elevation raster map "
-	  "layer whose cell category values represent elevation "
-	  "combined with an input raster map layer whose cell "
-	  "values represent friction cost.");
+	  "geographic locations on an input raster map "
+	  "whose cell category values represent cost.");
 
     opt2 = G_define_option();
     opt2->key = "elevation";



More information about the grass-commit mailing list