r.walk.html 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <h2>DESCRIPTION</h2>
  2. <em>r.walk</em> computes anisotropic cumulative cost of moving between
  3. different geographic locations on an input elevation raster map whose
  4. cell category values represent elevation combined with an input raster
  5. map layer whose cell values represent friction cost.
  6. <p>
  7. <em>r.walk</em> outputs 1) a raster map showing the lowest
  8. cumulative cost (time) of moving between each cell and the user-specified
  9. starting points and 2) a second raster map showing the movement
  10. direction to the next cell on the path back to the start point (see
  11. <a href="#move">Movement Direction</a>). It uses an input elevation
  12. raster map whose cell category values represent elevation,
  13. combined with a second input raster map whose cell values
  14. represent friction costs.
  15. <p>
  16. This function is similar to <em><a href="r.cost.html">r.cost</a></em>,
  17. but in addiction to a friction map, it considers an anisotropic travel
  18. time due to the different walking speed associated with downhill and
  19. uphill movements.
  20. <h2>NOTES</h2>
  21. <p>
  22. The formula from Aitken 1977/Langmuir 1984 (based on Naismith's rule
  23. for walking times) has been used to estimate the cost parameters of
  24. specific slope intervals:
  25. <div class="code"><pre>
  26. T = a*delta_S + b*delta_H_uphill + c*delta_H_moderate_downhill + d*delta_H_steep_downhill
  27. </pre></div>
  28. where:
  29. <ul>
  30. <li><tt>T</tt> is time of movement in seconds,</li>
  31. <li><tt>delta S</tt> is the horizontal distance covered in meters,</li>
  32. <li><tt>delta H</tt> is the altitude difference in meters.</li>
  33. </ul>
  34. <p>
  35. The a, b, c, d <b>walk_coeff</b> parameters take in account
  36. movement speed in the different conditions and are linked to:
  37. <ul>
  38. <li>a: time in seconds it takes to walk for 1 meter a flat surface (1/walking speed)</li>
  39. <li>b: additional walking time in seconds, per meter of elevation gain
  40. on uphill slopes</li>
  41. <li>c: additional walking time in seconds, per meter of elevation loss
  42. on moderate downhill slopes (use positive value for decreasing cost)</li>
  43. <li>d: additional walking time in seconds, per meter of elevation loss
  44. on steep downhill slopes (use negative value for increasing cost)</li>
  45. </ul>
  46. It has been proved that moving downhill is favourable up to a specific
  47. slope value threshold, after that it becomes unfavourable. The default
  48. slope value threshold (<b>slope_factor</b>) is -0.2125, corresponding
  49. to tan(-12), calibrated on human behaviour (&gt;5 and &lt;12 degrees:
  50. moderate downhill; &gt;12 degrees: steep downhill). The default values
  51. for a, b, c, d <b>walk_coeff</b> parameters are those proposed by
  52. Langmuir (0.72, 6.0, 1.9998, -1.9998), based on man walking effort in
  53. standard conditions.
  54. <p>The <b>friction</b> cost parameter represents a time penalty in seconds
  55. of additional walking time to cross 1 meter distance.
  56. <p>The <b>lambda</b> parameter is a dimensionless scaling factor of the friction cost:
  57. <div class="code"><pre>
  58. total cost = movement time cost + lambda * friction costs * delta_S
  59. </pre></div>
  60. <p>
  61. For a more accurate result, the "knight's move" option can be used
  62. (although it is more time consuming). In the diagram below, the center
  63. location (O) represents a grid cell from which cumulative distances
  64. are calculated. Those neighbours marked with an x are always
  65. considered for cumulative cost updates. With the "knight's move"
  66. option, the neighbours marked with a K are also considered.
  67. <div class="code"><pre>
  68. K K
  69. K x x x K
  70. x O x
  71. K x x x K
  72. K K
  73. </pre></div>
  74. <p>The minimum cumulative costs are computed using Dijkstra's
  75. algorithm, that find an optimum solution (for more details see
  76. <em>r.cost</em>, that uses the same algorithm).
  77. <a name="move"></a>
  78. <h2>Movement Direction</h2>
  79. <p>The movement direction surface is created to record the sequence of
  80. movements that created the cost accumulation surface. Without it
  81. <em><a href="r.drain.html">r.drain</a></em> would not correctly create a path from an end point
  82. back to the start point. The direction of each cell points towards
  83. the next cell. The directions are recorded as degrees CCW from East:
  84. <div class="code"><pre>
  85. 112.5 67.5 i.e. a cell with the value 135
  86. 157.5 135 90 45 22.5 means the next cell is to the north-west
  87. 180 x 360
  88. 202.5 225 270 315 337.5
  89. 247.5 292.5
  90. </pre></div>
  91. <p>
  92. Once <em>r.walk</em> computes the cumulative cost map as a linear
  93. combination of friction cost (from friction map) and the altitude and
  94. distance covered (from the digital elevation
  95. model), <em><a href="r.drain.html">r.drain</a></em> can be used to
  96. find the minimum cost path. Make sure to use the <b>-d</b> flag and
  97. the movement direction raster map when
  98. running <em><a href="r.drain.html">r.drain</a></em> to ensure the path
  99. is computed according to the proper movement directions.
  100. <p>
  101. <em>r.walk</em>, like most all GRASS raster programs, is also made to
  102. be run on maps larger that can fit in available computer memory. As the
  103. algorithm works through the dynamic list of cells it can move almost
  104. randomly around the entire area. <em>r.walk</em> divides the entire
  105. area into a number of pieces and swaps these pieces in and out of
  106. memory (to and from disk) as needed. This provides a virtual memory
  107. approach optimally designed for 2-D raster maps. The amount of memory
  108. to be used by <em>r.walk</em> can be controlled with the <b>memory</b>
  109. option, default is 300 MB. For systems with less memory this value will
  110. have to be set to a lower value.
  111. <h2>EXAMPLES</h2>
  112. We compute a map showing how far a lost person could get from the
  113. point where he or she was last seen
  114. while taking into account the topography and landcover.
  115. <div class="code"><pre>
  116. g.region swwake_30m -p
  117. # create friction map based on land cover
  118. r.recode landclass96 out=friction &lt;&lt; EOF
  119. 1:3:0.1:0.1
  120. 4:5:10.:10.
  121. 6:6:1000.0:1000.0
  122. 7:7:0.3:0.3
  123. EOF
  124. r.walk -k elevation=elev_ned_30m friction=friction output=walkcost \
  125. start_coordinates=635576,216485 lambda=0.5 max=10000
  126. # compute contours on the cost surface to better understand
  127. # how far the person can get in certain time (1000 is in seconds)
  128. r.contour walkcost output=walkcost step=1000
  129. </pre></div>
  130. <h2>REFERENCES</h2>
  131. <ul>
  132. <li>Aitken, R. 1977. Wilderness areas in Scotland. Unpublished Ph.D. thesis.
  133. University of Aberdeen.
  134. <li> Steno Fontanari, University of Trento, Italy, Ingegneria per l'Ambiente e
  135. il Territorio, 2000-2001.
  136. Svilluppo di metodologie GIS per la determinazione dell'accessibilit&agrave;
  137. territoriale come supporto alle decisioni nella gestione ambientale.
  138. <li>Langmuir, E. 1984. Mountaincraft and leadership. The Scottish
  139. Sports Council/MLTB. Cordee, Leicester.
  140. </ul>
  141. <h2>SEE ALSO</h2>
  142. <em>
  143. <a href="r.cost.html">r.cost</a>,
  144. <a href="r.drain.html">r.drain</a>,
  145. <a href="r.in.ascii.html">r.in.ascii</a>,
  146. <a href="r.mapcalc.html">r.mapcalc</a>,
  147. <a href="r.out.ascii.html">r.out.ascii</a>
  148. </em>
  149. <h2>AUTHORS</h2>
  150. <b>Based on r.cost written by :</b><br>
  151. Antony Awaida, Intelligent Engineering, Systems Laboratory, M.I.T.<br>
  152. James Westervelt, U.S.Army Construction Engineering Research Laboratory<br>
  153. Updated for Grass 5 by Pierre de Mouveaux (pmx@audiovu.com)
  154. <p><b>Initial version of r.walk:</b><br>
  155. Steno Fontanari, 2002
  156. <p><b>Current version of r.walk:</b><br>
  157. Franceschetti Simone, Sorrentino Diego, Mussi Fabiano and Pasolli Mattia<br>
  158. Correction by: Fontanari Steno, Napolitano Maurizio and Flor Roberto<br>
  159. In collaboration with: Franchi Matteo, Vaglia Beatrice, Bartucca Luisa, Fava Valentina and Tolotti Mathias, 2004
  160. <p><b>Updated for GRASS 6.1:</b><br>
  161. Roberto Flor and Markus Neteler
  162. <p><b>Updated for GRASS GIS 7:</b><br>
  163. Markus Metz
  164. <p>
  165. <i>Last changed: $Date$</i>