1r.walk(1)                     Grass User's Manual                    r.walk(1)
2
3
4

NAME

6       r.walk   - Creates a raster map showing the anisotropic cumulative cost
7       of moving between different geographic locations on an input raster map
8       whose cell category values represent cost.
9

KEYWORDS

11       raster, cost surface, cumulative costs, cost allocation
12

SYNOPSIS

14       r.walk
15       r.walk --help
16       r.walk [-knrib] elevation=name friction=name output=name  [solver=name]
17       [nearest=name]            [outdir=name]             [start_points=name]
18       [stop_points=name]          [start_raster=name]          [start_coordi‐
19       nates=east,north[,east,north,...]]                        [stop_coordi‐
20       nates=east,north[,east,north,...]]                     [max_cost=value]
21       [null_cost=value]          [memory=value]          [walk_coeff=a,b,c,d]
22       [lambda=float]      [slope_factor=float]      [--overwrite]    [--help]
23       [--verbose]  [--quiet]  [--ui]
24
25   Flags:
26       -k
27           Use the ’Knight’s move’; slower, but more accurate
28
29       -n
30           Keep null values in output raster map
31
32       -r
33           Start with values in raster map
34
35       -i
36           Print info about disk space and memory requirements and exit
37
38       -b
39           Create bitmask encoded directions
40
41       --overwrite
42           Allow output files to overwrite existing files
43
44       --help
45           Print usage summary
46
47       --verbose
48           Verbose module output
49
50       --quiet
51           Quiet module output
52
53       --ui
54           Force launching GUI dialog
55
56   Parameters:
57       elevation=name [required]
58           Name of input elevation raster map
59
60       friction=name [required]
61           Name of input raster map containing friction costs
62
63       output=name [required]
64           Name for output raster map to contain walking costs
65
66       solver=name
67           Name of input raster map solving equal costs
68           Helper variable to pick a direction if two  directions  have  equal
69           cumulative costs (smaller is better)
70
71       nearest=name
72           Name for output raster map with nearest start point
73
74       outdir=name
75           Name for output raster map to contain movement directions
76
77       start_points=name
78           Name of starting vector points map
79           Or data source for direct OGR access
80
81       stop_points=name
82           Name of stopping vector points map
83           Or data source for direct OGR access
84
85       start_raster=name
86           Name of starting raster points map
87
88       start_coordinates=east,north[,east,north,...]
89           Coordinates of starting point(s) (E,N)
90
91       stop_coordinates=east,north[,east,north,...]
92           Coordinates of stopping point(s) (E,N)
93
94       max_cost=value
95           Maximum cumulative cost
96           Default: 0
97
98       null_cost=value
99           Cost assigned to null cells. By default, null cells are excluded
100
101       memory=value
102           Maximum memory to be used in MB
103           Default: 300
104
105       walk_coeff=a,b,c,d
106           Coefficients for walking energy formula parameters a,b,c,d
107           Default: 0.72,6.0,1.9998,-1.9998
108
109       lambda=float
110           Lambda coefficients for combining walking energy and friction cost
111           Default: 1.0
112
113       slope_factor=float
114           Slope factor determines travel energy cost per height step
115           Default: -0.2125
116

DESCRIPTION

118       r.walk computes anisotropic cumulative cost of moving between different
119       geographic locations on an input elevation raster map whose cell  cate‐
120       gory values represent elevation combined with an input raster map layer
121       whose cell values represent friction cost.
122
123       r.walk outputs 1) a raster  map  showing  the  lowest  cumulative  cost
124       (time)  of  moving  between  each  cell and the user-specified starting
125       points and 2) a second raster map showing the movement direction to the
126       next cell on the path back to the start point (see Movement Direction).
127       It uses an input elevation raster map whose cell category values repre‐
128       sent elevation, combined with a second input raster map whose cell val‐
129       ues represent friction costs.
130
131       This function is similar to r.cost, but in addition to a friction  map,
132       it  considers  an  anisotropic travel time due to the different walking
133       speed associated with downhill and uphill movements.
134

NOTES

136       The formula from Aitken 1977/Langmuir 1984 (based  on  Naismith’s  rule
137       for  walking  times)  has  been used to estimate the cost parameters of
138       specific slope intervals:
139       T = a*delta_S + b*delta_H_uphill + c*delta_H_moderate_downhill + d*delta_H_steep_downhill
140       where:
141
142           ·   T is time of movement in seconds,
143
144           ·   delta S is the horizontal distance covered in meters,
145
146           ·   delta H is the altitude difference in meters.
147
148       The a, b, c, d walk_coeff parameters take in account movement speed  in
149       the different conditions and are linked to:
150
151           ·   a:  time in seconds it takes to walk for 1 meter a flat surface
152               (1/walking speed)
153
154           ·   b: additional walking time in seconds, per meter  of  elevation
155               gain on uphill slopes
156
157           ·   c:  additional  walking time in seconds, per meter of elevation
158               loss on  moderate  downhill  slopes  (use  positive  value  for
159               decreasing cost)
160
161           ·   d:  additional  walking time in seconds, per meter of elevation
162               loss on steep downhill slopes (use negative value for  increas‐
163               ing cost)
164       It  has been proved that moving downhill is favourable up to a specific
165       slope value threshold, after that it becomes unfavourable. The  default
166       slope  value  threshold  (slope_factor)  is  -0.2125,  corresponding to
167       tan(-12), calibrated on human behaviour (>5 and <12  degrees:  moderate
168       downhill; >12 degrees: steep downhill). The default values for a, b, c,
169       d walk_coeff parameters are those  proposed  by  Langmuir  (0.72,  6.0,
170       1.9998, -1.9998), based on man walking effort in standard conditions.
171
172       The  friction  cost  parameter  represents a time penalty in seconds of
173       additional walking time to cross 1 meter distance.
174
175       The lambda parameter is a dimensionless scaling factor of the  friction
176       cost:
177       total cost = movement time cost + lambda * friction costs * delta_S
178
179       For  a  more  accurate  result,  the "knight’s move" option can be used
180       (although it is more time consuming). In the diagram below, the  center
181       location (O) represents a grid cell from which cumulative distances are
182       calculated. Those neighbours marked with an x are always considered for
183       cumulative  cost  updates.  With the "knight’s move" option, the neigh‐
184       bours marked with a K are also considered.
185         K   K
186       K x x x K
187         x O x
188       K x x x K
189         K   K
190
191       The minimum cumulative costs are computed using  Dijkstra’s  algorithm,
192       that  find  an optimum solution (for more details see r.cost, that uses
193       the same algorithm).
194

Movement Direction

196       The movement direction surface is created to  record  the  sequence  of
197       movements  that  created  the  cost accumulation surface. This movement
198       direction surface can be used by r.path to recover a path from  an  end
199       point  back  to  the  start  point.   The direction of each cell points
200       towards the next cell.  The directions are recorded as degrees CCW from
201       East:
202              112.5      67.5         i.e. a cell with the value 135
203       157.5  135   90   45   22.5    means the next cell is to the north-west
204              180   x   360
205       202.5  225  270  315  337.5
206              247.5     292.5
207
208       Once r.walk computes the cumulative cost map as a linear combination of
209       friction cost (from friction map) and the altitude and distance covered
210       (from  the  digital elevation model), the associated movement direction
211       map can be used by r.path to find the minimum cost path.
212
213       r.walk, like most all GRASS raster programs, is also made to be run  on
214       maps larger that can fit in available computer memory. As the algorithm
215       works through the dynamic list of cells it  can  move  almost  randomly
216       around the entire area. r.walk divides the entire area into a number of
217       pieces and swaps these pieces in and out of memory (to and  from  disk)
218       as  needed.  This provides a virtual memory approach optimally designed
219       for 2-D raster maps. The amount of memory to be used by r.walk  can  be
220       controlled  with the memory option, default is 300 MB. For systems with
221       less memory this value will have to be set to a lower value.
222

EXAMPLES

224       We compute a map showing how far a lost person could get from the point
225       where  he or she was last seen while taking into account the topography
226       and landcover.
227       g.region swwake_30m -p
228       # create friction map based on land cover
229       r.recode landclass96 out=friction rules=- << EOF
230       1:3:0.1:0.1
231       4:5:10.:10.
232       6:6:1000.0:1000.0
233       7:7:0.3:0.3
234       EOF
235       r.walk -k elevation=elev_ned_30m friction=friction output=walkcost \
236           start_coordinates=635576,216485 lambda=0.5 max=10000
237       # compute contours on the cost surface to better understand
238       # how far the person can get in certain time (1000 is in seconds)
239       r.contour walkcost output=walkcost step=1000
240

REFERENCES

242           ·   Aitken, R. 1977.  Wilderness  areas  in  Scotland.  Unpublished
243               Ph.D. thesis.  University of Aberdeen.
244
245           ·   Steno  Fontanari,  University  of Trento, Italy, Ingegneria per
246               l’Ambiente e il Territorio, 2000-2001.  Svilluppo di  metodolo‐
247               gie  GIS per la determinazione dell’accessibilità territoriale
248               come supporto alle decisioni nella gestione ambientale.
249
250           ·   Langmuir, E. 1984. Mountaincraft and leadership.  The  Scottish
251               Sports Council/MLTB. Cordee, Leicester.
252

SEE ALSO

254        r.cost, r.path, r.in.ascii, r.mapcalc, r.recode, r.out.ascii
255

AUTHORS

257       Based on r.cost written by :
258       Antony Awaida, Intelligent Engineering, Systems Laboratory, M.I.T.
259       James Westervelt, U.S.Army Construction Engineering Research Laboratory
260       Updated for Grass 5 by Pierre de Mouveaux (pmx@audiovu.com)
261
262       Initial version of r.walk:
263       Steno Fontanari, 2002
264
265       Current version of r.walk:
266       Franceschetti  Simone, Sorrentino Diego, Mussi Fabiano and Pasolli Mat‐
267       tia
268       Correction by: Fontanari Steno, Napolitano Maurizio and  Flor Roberto
269       In collaboration with: Franchi Matteo, Vaglia Beatrice, Bartucca Luisa,
270       Fava Valentina and Tolotti Mathias, 2004
271
272       Updated for GRASS 6.1:
273       Roberto Flor and Markus Neteler
274
275       Updated for GRASS GIS 7:
276       Markus Metz
277       Multiple path directions sponsored by mundialis
278

SOURCE CODE

280       Available at: r.walk source code (history)
281
282       Main  index  | Raster index | Topics index | Keywords index | Graphical
283       index | Full index
284
285       © 2003-2019 GRASS Development Team, GRASS GIS 7.8.2 Reference Manual
286
287
288
289GRASS 7.8.2                                                          r.walk(1)
Impressum