1r.walk(1) Grass User's Manual r.walk(1)
2
3
4
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
11 raster, cost surface, cumulative costs, cost allocation
12
14 r.walk
15 r.walk --help
16 r.walk [-knri] elevation=name friction=name output=name [outdir=name]
17 [start_points=name] [stop_points=name] [start_raster=name]
18 [start_coordinates=east,north[,east,north,...]] [stop_coordi‐
19 nates=east,north[,east,north,...]] [max_cost=value]
20 [null_cost=value] [memory=value] [walk_coeff=a,b,c,d]
21 [lambda=float] [slope_factor=float] [--overwrite] [--help]
22 [--verbose] [--quiet] [--ui]
23
24 Flags:
25 -k
26 Use the ’Knight’s move’; slower, but more accurate
27
28 -n
29 Keep null values in output raster map
30
31 -r
32 Start with values in raster map
33
34 -i
35 Print info about disk space and memory requirements and exit
36
37 --overwrite
38 Allow output files to overwrite existing files
39
40 --help
41 Print usage summary
42
43 --verbose
44 Verbose module output
45
46 --quiet
47 Quiet module output
48
49 --ui
50 Force launching GUI dialog
51
52 Parameters:
53 elevation=name [required]
54 Name of input elevation raster map
55
56 friction=name [required]
57 Name of input raster map containing friction costs
58
59 output=name [required]
60 Name for output raster map to contain walking costs
61
62 outdir=name
63 Name for output raster map to contain movement directions
64
65 start_points=name
66 Name of starting vector points map
67 Or data source for direct OGR access
68
69 stop_points=name
70 Name of stopping vector points map
71 Or data source for direct OGR access
72
73 start_raster=name
74 Name of starting raster points map
75
76 start_coordinates=east,north[,east,north,...]
77 Coordinates of starting point(s) (E,N)
78
79 stop_coordinates=east,north[,east,north,...]
80 Coordinates of stopping point(s) (E,N)
81
82 max_cost=value
83 Maximum cumulative cost
84 Default: 0
85
86 null_cost=value
87 Cost assigned to null cells. By default, null cells are excluded
88
89 memory=value
90 Maximum memory to be used in MB
91 Default: 300
92
93 walk_coeff=a,b,c,d
94 Coefficients for walking energy formula parameters a,b,c,d
95 Default: 0.72,6.0,1.9998,-1.9998
96
97 lambda=float
98 Lambda coefficients for combining walking energy and friction cost
99 Default: 1.0
100
101 slope_factor=float
102 Slope factor determines travel energy cost per height step
103 Default: -0.2125
104
106 r.walk computes anisotropic cumulative cost of moving between different
107 geographic locations on an input elevation raster map whose cell cate‐
108 gory values represent elevation combined with an input raster map layer
109 whose cell values represent friction cost.
110
111 r.walk outputs 1) a raster map showing the lowest cumulative cost
112 (time) of moving between each cell and the user-specified starting
113 points and 2) a second raster map showing the movement direction to the
114 next cell on the path back to the start point (see Movement Direction).
115 It uses an input elevation raster map whose cell category values repre‐
116 sent elevation, combined with a second input raster map whose cell val‐
117 ues represent friction costs.
118
119 This function is similar to r.cost, but in addition to a friction map,
120 it considers an anisotropic travel time due to the different walking
121 speed associated with downhill and uphill movements.
122
124 The formula from Aitken 1977/Langmuir 1984 (based on Naismith’s rule
125 for walking times) has been used to estimate the cost parameters of
126 specific slope intervals:
127 T = a*delta_S + b*delta_H_uphill + c*delta_H_moderate_downhill + d*delta_H_steep_downhill
128 where:
129
130 · T is time of movement in seconds,
131
132 · delta S is the horizontal distance covered in meters,
133
134 · delta H is the altitude difference in meters.
135
136 The a, b, c, d walk_coeff parameters take in account movement speed in
137 the different conditions and are linked to:
138
139 · a: time in seconds it takes to walk for 1 meter a flat surface
140 (1/walking speed)
141
142 · b: additional walking time in seconds, per meter of elevation
143 gain on uphill slopes
144
145 · c: additional walking time in seconds, per meter of elevation
146 loss on moderate downhill slopes (use positive value for
147 decreasing cost)
148
149 · d: additional walking time in seconds, per meter of elevation
150 loss on steep downhill slopes (use negative value for increas‐
151 ing cost)
152 It has been proved that moving downhill is favourable up to a specific
153 slope value threshold, after that it becomes unfavourable. The default
154 slope value threshold (slope_factor) is -0.2125, corresponding to
155 tan(-12), calibrated on human behaviour (>5 and <12 degrees: moderate
156 downhill; >12 degrees: steep downhill). The default values for a, b, c,
157 d walk_coeff parameters are those proposed by Langmuir (0.72, 6.0,
158 1.9998, -1.9998), based on man walking effort in standard conditions.
159
160 The friction cost parameter represents a time penalty in seconds of
161 additional walking time to cross 1 meter distance.
162
163 The lambda parameter is a dimensionless scaling factor of the friction
164 cost:
165 total cost = movement time cost + lambda * friction costs * delta_S
166
167 For a more accurate result, the "knight’s move" option can be used
168 (although it is more time consuming). In the diagram below, the center
169 location (O) represents a grid cell from which cumulative distances are
170 calculated. Those neighbours marked with an x are always considered for
171 cumulative cost updates. With the "knight’s move" option, the neigh‐
172 bours marked with a K are also considered.
173 K K
174 K x x x K
175 x O x
176 K x x x K
177 K K
178
179 The minimum cumulative costs are computed using Dijkstra’s algorithm,
180 that find an optimum solution (for more details see r.cost, that uses
181 the same algorithm).
182
184 The movement direction surface is created to record the sequence of
185 movements that created the cost accumulation surface. Without it
186 r.drain would not correctly create a path from an end point back to the
187 start point. The direction of each cell points towards the next cell.
188 The directions are recorded as degrees CCW from East:
189 112.5 67.5 i.e. a cell with the value 135
190 157.5 135 90 45 22.5 means the next cell is to the north-west
191 180 x 360
192 202.5 225 270 315 337.5
193 247.5 292.5
194
195 Once r.walk computes the cumulative cost map as a linear combination of
196 friction cost (from friction map) and the altitude and distance covered
197 (from the digital elevation model), r.drain can be used to find the
198 minimum cost path. Make sure to use the -d flag and the movement direc‐
199 tion raster map when running r.drain to ensure the path is computed
200 according to the proper movement directions.
201
202 r.walk, like most all GRASS raster programs, is also made to be run on
203 maps larger that can fit in available computer memory. As the algorithm
204 works through the dynamic list of cells it can move almost randomly
205 around the entire area. r.walk divides the entire area into a number of
206 pieces and swaps these pieces in and out of memory (to and from disk)
207 as needed. This provides a virtual memory approach optimally designed
208 for 2-D raster maps. The amount of memory to be used by r.walk can be
209 controlled with the memory option, default is 300 MB. For systems with
210 less memory this value will have to be set to a lower value.
211
213 We compute a map showing how far a lost person could get from the point
214 where he or she was last seen while taking into account the topography
215 and landcover.
216 g.region swwake_30m -p
217 # create friction map based on land cover
218 r.recode landclass96 out=friction << EOF
219 1:3:0.1:0.1
220 4:5:10.:10.
221 6:6:1000.0:1000.0
222 7:7:0.3:0.3
223 EOF
224 r.walk -k elevation=elev_ned_30m friction=friction output=walkcost \
225 start_coordinates=635576,216485 lambda=0.5 max=10000
226 # compute contours on the cost surface to better understand
227 # how far the person can get in certain time (1000 is in seconds)
228 r.contour walkcost output=walkcost step=1000
229
231 · Aitken, R. 1977. Wilderness areas in Scotland. Unpublished
232 Ph.D. thesis. University of Aberdeen.
233
234 · Steno Fontanari, University of Trento, Italy, Ingegneria per
235 l’Ambiente e il Territorio, 2000-2001. Svilluppo di metodolo‐
236 gie GIS per la determinazione dell’accessibilità territoriale
237 come supporto alle decisioni nella gestione ambientale.
238
239 · Langmuir, E. 1984. Mountaincraft and leadership. The Scottish
240 Sports Council/MLTB. Cordee, Leicester.
241
243 r.cost, r.drain, r.in.ascii, r.mapcalc, r.out.ascii
244
246 Based on r.cost written by :
247 Antony Awaida, Intelligent Engineering, Systems Laboratory, M.I.T.
248 James Westervelt, U.S.Army Construction Engineering Research Laboratory
249 Updated for Grass 5 by Pierre de Mouveaux (pmx@audiovu.com)
250
251 Initial version of r.walk:
252 Steno Fontanari, 2002
253
254 Current version of r.walk:
255 Franceschetti Simone, Sorrentino Diego, Mussi Fabiano and Pasolli Mat‐
256 tia
257 Correction by: Fontanari Steno, Napolitano Maurizio and Flor Roberto
258 In collaboration with: Franchi Matteo, Vaglia Beatrice, Bartucca Luisa,
259 Fava Valentina and Tolotti Mathias, 2004
260
261 Updated for GRASS 6.1:
262 Roberto Flor and Markus Neteler
263
264 Updated for GRASS GIS 7:
265 Markus Metz
266
267 Last changed: $Date: 2018-05-03 20:11:48 +0200 (Thu, 03 May 2018) $
268
270 Available at: r.walk source code (history)
271
272 Main index | Raster index | Topics index | Keywords index | Graphical
273 index | Full index
274
275 © 2003-2019 GRASS Development Team, GRASS GIS 7.4.4 Reference Manual
276
277
278
279GRASS 7.4.4 r.walk(1)