1r.flow(1) GRASS GIS User's Manual r.flow(1)
2
3
4
6 r.flow - Constructs flowlines.
7 Computes flowlines, flowpath lengths, and flowaccumulation (contribut‐
8 ing areas) from a elevation raster map.
9
11 raster, hydrology
12
14 r.flow
15 r.flow --help
16 r.flow [-u3m] elevation=name [aspect=name] [barrier=name]
17 [skip=integer] [bound=integer] [flowline=name] [flowlength=name]
18 [flowaccumulation=name] [--overwrite] [--help] [--verbose]
19 [--quiet] [--ui]
20
21 Flags:
22 -u
23 Compute upslope flowlines instead of default downhill flowlines
24
25 -3
26 3D lengths instead of 2D
27
28 -m
29 Use less memory, at a performance penalty
30
31 --overwrite
32 Allow output files to overwrite existing files
33
34 --help
35 Print usage summary
36
37 --verbose
38 Verbose module output
39
40 --quiet
41 Quiet module output
42
43 --ui
44 Force launching GUI dialog
45
46 Parameters:
47 elevation=name [required]
48 Name of input elevation raster map
49
50 aspect=name
51 Name of input aspect raster map
52
53 barrier=name
54 Name of input barrier raster map
55
56 skip=integer
57 Number of cells between flowlines
58
59 bound=integer
60 Maximum number of segments per flowline
61
62 flowline=name
63 Name for output flow line vector map
64
65 flowlength=name
66 Name for output flow path length raster map
67
68 flowaccumulation=name
69 Name for output flow accumulation raster map
70
72 r.flow generates flowlines using a combined raster-vector approach (see
73 Mitasova and Hofierka 1993 and Mitasova et al. 1995) from an input ele‐
74 vation raster map (integer or floating point), and optionally an input
75 aspect raster map and/or an input barrier raster map.
76
77 There are three possible output raster maps which can be produced in
78 any combination simultaneously: a vector map flowline of flowlines, a
79 raster map flowlength of flowpath lengths, and a raster map flowaccumu‐
80 lation of flowline densities (which are equal upslope contributed areas
81 per unit width, when multiplied by resolution).
82
84 Aspect used for input must follow the same rules as aspect computed in
85 other modules (see v.surf.rst or r.slope.aspect).
86
87 Output flowline is generated downhill. The line segments of flowline
88 vectors have endpoints on edges of a grid formed by drawing imaginary
89 lines through the centers of the cells in the elevation map. Flowlines
90 are generated from each cell downhill by default; they can be generated
91 uphill using the flag -u. A flowline stops if its next segment would
92 reverse the direction of flow (from up to down or vice-versa), cross a
93 barrier, or arrive at a cell with undefined elevation or aspect. An‐
94 other option, skip, indicates that only the flowlines from every val-th
95 cell are to be included in flowline. The default skip is max(1, <rows
96 in elevation>/50, <cols in elevation>/50). A high skip usually speeds
97 up processing time and often improves the readability of a visualiza‐
98 tion of flowline.
99
100 Flowpath length output is given in a raster map flowlength. The value
101 in each grid cell is the sum of the planar lengths of all segments of
102 the flowline generated from that cell. If the flag -3 is given, eleva‐
103 tion is taken into account in calculating the length of each segment.
104
105 Flowline density downhill or uphill output is given in a raster map
106 flowaccumulation. The value in each grid cell is the number of flow‐
107 lines which pass through that grid cell, that means the number of flow‐
108 lines from the entire map which have segment endpoints within that
109 cell. With the -m flag less memory is used as aspect at each cell is
110 computed on the fly. This option incurs a severe performance penalty.
111 If this flag is given, the aspect input map (if any) will be ignored.
112 The barrier parameter is a raster map name with non-zero values repre‐
113 senting barriers as input.
114
115 For best results, use input elevation maps with high precision units
116 (e.g., centimeters) so that flowlines do not terminate prematurely in
117 flat areas. To prevent the creation of tiny flowline segments with im‐
118 perceivable changes in elevation, an endpoint which would land very
119 close to the center of a grid cell is quantized to the exact center of
120 that cell. The maximum distance between the intercepts along each axis
121 of a single diagonal segment and another segment of 1/2 degree differ‐
122 ent aspect is taken to be "very close" for that axis. Note that this
123 distance (the so-called "quantization error") is about 1-2% of the res‐
124 olution on maps with square cells.
125
126 The values in length maps computed using the -u flag represent the dis‐
127 tances from each cell to an upland flat or singular point. Such dis‐
128 tances are useful in water erosion modeling for computation of the LS
129 factor in the standard form of USLE. Uphill flowlines merge on ridge
130 lines; by redirecting the order of the flowline points in the output
131 vector map, dispersed waterflow can be simulated. The density map can
132 be used for the extraction of ridge lines.
133
134 Computing the flowlines downhill simulates the actual flow (also known
135 as the raindrop method). These flowlines tend to merge in valleys; they
136 can be used for localization of areas with waterflow accumulation and
137 for the extraction of channels. The downslope flowline density multi‐
138 plied by the resolution can be used as an approximation of the upslope
139 contributing area per unit contour width. This area is a measure of po‐
140 tential water flux for the steady state conditions and can be used in
141 the modeling of water erosion for the computation of the unit stream
142 power based LS factor or sediment transport capacity.
143
144 r.flow has been designed for modeling erosion on hillslopes and has
145 rather strict conditions for ending flowlines. It is therefore not very
146 suitable for the extraction of stream networks or delineation of water‐
147 sheds unless a DEM without pits or flat areas is available (r.fill.dir
148 can be used to fill pits).
149
150 To label the vector flowlines automatically, the user can use v.cate‐
151 gory (add categories).
152
153 Algorithm background
154 r.flow uses an original vector-grid algorithm which uses an infinite
155 number of directions between 0.0000... and 360.0000... and traces the
156 flow as a line (vector) in the direction of gradient (rather than from
157 cell to cell in one of the 8 directions = D-infinity algorithm). They
158 are traced in any direction using aspect (so there is no limitation to
159 8 directions here). The D8 algorithm produces zig-zag lines. The value
160 in the outlet is very similar for r.flow algorithm (because it is es‐
161 sentially the watershed area), however the spatial distribution of
162 flow, especially on hillslopes is quite different. It is still a 1D
163 flow routing so the dispersal flow is not accurately described, but
164 still better than D8.
165
166 r.flow uses a single flow algorithm, i.e. all flow is transported to a
167 single cell downslope.
168
169 Diagnostics
170 Elevation raster map resolution differs from current region resolution
171 The resolutions of all input raster maps and the current region must
172 match (see g.region).
173 Resolution too unbalanced
174 The difference in length between the two axes of a grid cell is so
175 great that quantization error is larger than one of the dimensions. Re‐
176 sample the map and try again.
177
179 In this example a flow line vector map, a flow path length raster map
180 and a flow accumulation raster map are computed from an elevation
181 raster map (North Carolina sample dataset):
182 g.region raster=elevation -p
183 r.flow elevation=elevation skip=3 flowline=flowline flowlength=flowlength \
184 flowaccumulation=flowaccumulation
185
186 Figure: Flow lines with underlying elevation map; flow lines with un‐
187 derlying flow path lengths (in map units: meters); flow accumulation
188 map (zoomed view)
189
191 • Mitasova, H., L. Mitas, 1993, Interpolation by regularized
192 spline with tension : I. Theory and implementation. Mathemati‐
193 cal Geology 25, p. 641-655. (online)
194
195 • Mitasova and Hofierka 1993 : Interpolation by Regularized
196 Spline with Tension: II. Application to Terrain Modeling and
197 Surface Geometry Analysis. Mathematical Geology 25(6), 657-669
198 (online).
199
200 • Mitasova, H., Mitas, L., Brown, W.M., Gerdes, D.P., Kosinovsky,
201 I., Baker, T., 1995: Modeling spatially and temporally distrib‐
202 uted phenomena: New methods and tools for GRASS GIS. Interna‐
203 tional Journal of Geographical Information Systems 9(4),
204 433-446.
205
206 • Mitasova, H., J. Hofierka, M. Zlocha, L.R. Iverson, 1996, Mod‐
207 eling topographic potential for erosion and deposition using
208 GIS. Int. Journal of Geographical Information Science, 10(5),
209 629-641. (reply to a comment to this paper appears in 1997 in
210 Int. Journal of Geographical Information Science, Vol. 11, No.
211 6)
212
213 • Mitasova, H.(1993): Surfaces and modeling. Grassclippings (win‐
214 ter and spring) p.18-19.
215
217 r.basins.fill, r.drain, r.fill.dir, r.water.outlet, r.watershed,
218 v.category, v.to.rast
219
221 Original version of program: Maros Zlocha and Jaroslav Hofierka, Come‐
222 nius University, Bratislava, Slovakia
223
224 The version of the program (adapted for GRASS 5.0): Joshua Caplan, Mark
225 Ruesink, Helena Mitasova, University of Illinois at Urbana-Champaign
226 with support from USA CERL. GMSL/University of Illinois at Ur‐
227 bana-Champaign
228
230 Available at: r.flow source code (history)
231
232 Accessed: Mon Jun 20 16:46:04 2022
233
234 Main index | Raster index | Topics index | Keywords index | Graphical
235 index | Full index
236
237 © 2003-2022 GRASS Development Team, GRASS GIS 8.2.0 Reference Manual
238
239
240
241GRASS 8.2.0 r.flow(1)