This function is similar to r.cost, 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.
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:
T= [(a)*(Delta S)] + [(b)*(Delta H uphill)] + [(c)*(Delta H moderate downhill)] + [(d)*(Delta H steep downhill)]
The a, b, c, d walk_coeff parameters take in account movement speed in the different conditions and are linked to:
The lambda parameter of the linear equation
combining movement and friction costs:
total cost = movement time cost + (lambda) * friction costs
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 are calculated. Those neighbours marked with an x are always considered for cumulative cost updates. With the "knight's move" option, the neighbours marked with a K are also considered.
K K K x x x K x O x K x x x K K K
The minimum cumulative costs are computed using Dijkstra's algorithm, that find an optimum solution (for more details see r.cost, that uses the same algorithm).
The movement direction surface is created to record the sequence of movements that created the cost accumulation surface. Without it r.drain would not correctly create a path from an end point back to the start point. The direction of each cell points towards the next cell. The directions are recorded as degrees CCW from East:
112.5 67.5 i.e. a cell with the value 135 157.5 135 90 45 22.5 means the next cell is to the north-west 180 x 360 202.5 225 270 315 337.5 247.5 292.5
Once r.walk computes the cumulative cost map as a linear combination of friction cost (from friction map) and the altitude and distance covered (from the digital elevation model), r.drain can be used to find the minimum cost path. Make sure to use the -d flag and the movement direction raster map when running r.drain to ensure the path is computed according to the proper movement directions.
Initial version of r.walk:
Steno Fontanari, 2002
Current version of r.walk:
Franceschetti Simone, Sorrentino Diego, Mussi Fabiano and Pasolli Mattia
Correction by: Fontanari Steno, Napolitano Maurizio and Flor Roberto
In collaboration with: Franchi Matteo, Vaglia Beatrice, Bartucca Luisa, Fava Valentina and Tolotti Mathias, 2004
Updated for Grass 6.1:
Roberto Flor and Markus Neteler
Last changed: $Date$