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