1r.walk(1)                   GRASS GIS 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=memory   in   MB]     [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=memory in MB
102           Maximum memory to be used (in MB)
103           Cache size for raster rows
104           Default: 300
105
106       walk_coeff=a,b,c,d
107           Coefficients for walking energy formula parameters a,b,c,d
108           Default: 0.72,6.0,1.9998,-1.9998
109
110       lambda=float
111           Lambda coefficients for combining walking energy and friction cost
112           Default: 1.0
113
114       slope_factor=float
115           Slope factor determines travel energy cost per height step
116           Default: -0.2125
117

DESCRIPTION

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

NOTES

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

Movement Direction

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

EXAMPLES

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

REFERENCES

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

SEE ALSO

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

AUTHORS

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

SOURCE CODE

281       Available at: r.walk source code (history)
282
283       Accessed: Saturday Jan 21 21:15:29 2023
284
285       Main  index  | Raster index | Topics index | Keywords index | Graphical
286       index | Full index
287
288       © 2003-2023 GRASS Development Team, GRASS GIS 8.2.1 Reference Manual
289
290
291
292GRASS 8.2.1                                                          r.walk(1)
Impressum