.TH r.flow 1grass "" "GRASS 8.3.1" "GRASS GIS User's Manual" .SH NAME \fI\fBr.flow\fR\fR \- Constructs flowlines. .br Computes flowlines, flowpath lengths, and flowaccumulation (contributing areas) from a elevation raster map. .SH KEYWORDS raster, hydrology .SH SYNOPSIS \fBr.flow\fR .br \fBr.flow \-\-help\fR .br \fBr.flow\fR [\-\fBu3m\fR] \fBelevation\fR=\fIname\fR [\fBaspect\fR=\fIname\fR] [\fBbarrier\fR=\fIname\fR] [\fBskip\fR=\fIinteger\fR] [\fBbound\fR=\fIinteger\fR] [\fBflowline\fR=\fIname\fR] [\fBflowlength\fR=\fIname\fR] [\fBflowaccumulation\fR=\fIname\fR] [\-\-\fBoverwrite\fR] [\-\-\fBhelp\fR] [\-\-\fBverbose\fR] [\-\-\fBquiet\fR] [\-\-\fBui\fR] .SS Flags: .IP "\fB\-u\fR" 4m .br Compute upslope flowlines instead of default downhill flowlines .IP "\fB\-3\fR" 4m .br 3D lengths instead of 2D .IP "\fB\-m\fR" 4m .br Use less memory, at a performance penalty .IP "\fB\-\-overwrite\fR" 4m .br Allow output files to overwrite existing files .IP "\fB\-\-help\fR" 4m .br Print usage summary .IP "\fB\-\-verbose\fR" 4m .br Verbose module output .IP "\fB\-\-quiet\fR" 4m .br Quiet module output .IP "\fB\-\-ui\fR" 4m .br Force launching GUI dialog .SS Parameters: .IP "\fBelevation\fR=\fIname\fR \fB[required]\fR" 4m .br Name of input elevation raster map .IP "\fBaspect\fR=\fIname\fR" 4m .br Name of input aspect raster map .IP "\fBbarrier\fR=\fIname\fR" 4m .br Name of input barrier raster map .IP "\fBskip\fR=\fIinteger\fR" 4m .br Number of cells between flowlines .IP "\fBbound\fR=\fIinteger\fR" 4m .br Maximum number of segments per flowline .IP "\fBflowline\fR=\fIname\fR" 4m .br Name for output flow line vector map .IP "\fBflowlength\fR=\fIname\fR" 4m .br Name for output flow path length raster map .IP "\fBflowaccumulation\fR=\fIname\fR" 4m .br Name for output flow accumulation raster map .SH DESCRIPTION \fIr.flow\fR generates flowlines using a combined raster\-vector approach (see Mitasova and Hofierka 1993 and Mitasova et al. 1995) from an input \fBelevation\fR raster map (integer or floating point), and optionally an input \fBaspect\fR raster map and/or an input \fBbarrier\fR raster map. .PP There are three possible output raster maps which can be produced in any combination simultaneously: a vector map \fBflowline\fR of flowlines, a raster map \fBflowlength\fR of flowpath lengths, and a raster map \fBflowaccumulation\fR of flowline densities (which are equal upslope contributed areas per unit width, when multiplied by resolution). .SH NOTES Aspect used for input must follow the same rules as aspect computed in other modules (see \fIv.surf.rst\fR or \fIr.slope.aspect\fR). .PP Output \fBflowline\fR is generated downhill. The line segments of flowline vectors have endpoints on edges of a grid formed by drawing imaginary lines through the centers of the cells in the elevation map. Flowlines are generated from each cell downhill by default; they can be generated uphill using the flag \fB\-u\fR. A flowline stops if its next segment would reverse the direction of flow (from up to down or vice\-versa), cross a barrier, or arrive at a cell with undefined elevation or aspect. Another option, \fBskip\fR, indicates that only the flowlines from every val\-th cell are to be included in \fBflowline\fR. The default \fBskip\fR is max(1, /50, /50). A high \fBskip\fR usually speeds up processing time and often improves the readability of a visualization of \fBflowline\fR. .PP Flowpath length output is given in a raster map \fBflowlength\fR. The value in each grid cell is the sum of the planar lengths of all segments of the flowline generated from that cell. If the flag \fB\-3\fR is given, elevation is taken into account in calculating the length of each segment. .PP Flowline density downhill or uphill output is given in a raster map \fBflowaccumulation.\fR The value in each grid cell is the number of flowlines which pass through that grid cell, that means the number of flowlines from the entire map which have segment endpoints within that cell. With the \fB\-m\fR flag less memory is used as aspect at each cell is computed on the fly. This option incurs a severe performance penalty. If this flag is given, the \fBaspect\fR input map (if any) will be ignored. The \fBbarrier\fR parameter is a raster map name with non\-zero values representing barriers as input. .PP For best results, use input elevation maps with high precision units (e.g., centimeters) so that flowlines do not terminate prematurely in flat areas. To prevent the creation of tiny flowline segments with imperceivable changes in elevation, an endpoint which would land very close to the center of a grid cell is quantized to the exact center of that cell. The maximum distance between the intercepts along each axis of a single diagonal segment and another segment of 1/2 degree different aspect is taken to be \(dqvery close\(dq for that axis. Note that this distance (the so\-called \(dqquantization error\(dq) is about 1\-2% of the resolution on maps with square cells. .PP The values in length maps computed using the \fB\-u\fR flag represent the distances from each cell to an upland flat or singular point. Such distances are useful in water erosion modeling for computation of the LS factor in the standard form of USLE. Uphill flowlines merge on ridge lines; by redirecting the order of the flowline points in the output vector map, dispersed waterflow can be simulated. The density map can be used for the extraction of ridge lines. .PP Computing the flowlines downhill simulates the actual flow (also known as the raindrop method). These flowlines tend to merge in valleys; they can be used for localization of areas with waterflow accumulation and for the extraction of channels. The downslope flowline density multiplied by the resolution can be used as an approximation of the upslope contributing area per unit contour width. This area is a measure of potential water flux for the steady state conditions and can be used in the modeling of water erosion for the computation of the unit stream power based LS factor or sediment transport capacity. .PP \fIr.flow\fR has been designed for modeling erosion on hillslopes and has rather strict conditions for ending flowlines. It is therefore not very suitable for the extraction of stream networks or delineation of watersheds unless a DEM without pits or flat areas is available (\fIr.fill.dir\fR can be used to fill pits). .PP To label the vector flowlines automatically, the user can use \fIv.category\fR (add categories). .SS Algorithm background .PP \fIr.flow\fR uses an original vector\-grid algorithm which uses an infinite number of directions between 0.0000... and 360.0000... and traces the flow as a line (vector) in the direction of gradient (rather than from cell to cell in one of the 8 directions = D\-infinity algorithm). They are traced in any direction using aspect (so there is no limitation to 8 directions here). The D8 algorithm produces zig\-zag lines. The value in the outlet is very similar for \fIr.flow\fR algorithm (because it is essentially the watershed area), however the spatial distribution of flow, especially on hillslopes is quite different. It is still a 1D flow routing so the dispersal flow is not accurately described, but still better than D8. .PP \fIr.flow\fR uses a single flow algorithm, i.e. all flow is transported to a single cell downslope. .SS Diagnostics .br .nf \fC Elevation raster map resolution differs from current region resolution \fR .fi The resolutions of all input raster maps and the current region must match (see \fIg.region\fR). .br .nf \fC Resolution too unbalanced \fR .fi The difference in length between the two axes of a grid cell is so great that quantization error is larger than one of the dimensions. Resample the map and try again. .SH EXAMPLE In this example a flow line vector map, a flow path length raster map and a flow accumulation raster map are computed from an elevation raster map (North Carolina sample dataset): .br .nf \fC g.region raster=elevation \-p r.flow elevation=elevation skip=3 flowline=flowline flowlength=flowlength \(rs flowaccumulation=flowaccumulation \fR .fi .PP Figure: Flow lines with underlying elevation map; flow lines with underlying flow path lengths (in map units: meters); flow accumulation map (zoomed view) .SH REFERENCES .RS 4n .IP \(bu 4n Mitasova, H., L. Mitas, 1993, Interpolation by regularized spline with tension : I. Theory and implementation. Mathematical Geology 25, p. 641\-655. (online) .IP \(bu 4n Mitasova and Hofierka 1993 : Interpolation by Regularized Spline with Tension: II. Application to Terrain Modeling and Surface Geometry Analysis. Mathematical Geology 25(6), 657\-669 (online). .IP \(bu 4n Mitasova, H., Mitas, L., Brown, W.M., Gerdes, D.P., Kosinovsky, I., Baker, T., 1995: Modeling spatially and temporally distributed phenomena: New methods and tools for GRASS GIS. International Journal of Geographical Information Systems 9(4), 433\-446. .IP \(bu 4n Mitasova, H., J. Hofierka, M. Zlocha, L.R. Iverson, 1996, Modeling topographic potential for erosion and deposition using GIS. Int. Journal of Geographical Information Science, 10(5), 629\-641. (reply to a comment to this paper appears in 1997 in Int. Journal of Geographical Information Science, Vol. 11, No. 6) .IP \(bu 4n Mitasova, H.(1993): Surfaces and modeling. Grassclippings (winter and spring) p.18\-19. .RE .SH SEE ALSO \fI r.basins.fill, r.drain, r.fill.dir, r.water.outlet, r.watershed, v.category, v.to.rast \fR .SH AUTHORS \fIOriginal version of program:\fR Maros Zlocha and Jaroslav Hofierka, Comenius University, Bratislava, Slovakia .PP \fIThe version of the program (adapted for GRASS 5.0)\fR: Joshua Caplan, Mark Ruesink, Helena Mitasova, University of Illinois at Urbana\-Champaign with support from USA CERL. GMSL/University of Illinois at Urbana\-Champaign .SH SOURCE CODE .PP Available at: r.flow source code (history) .PP Accessed: Sunday Dec 17 17:21:46 2023 .PP Main index | Raster index | Topics index | Keywords index | Graphical index | Full index .PP © 2003\-2023 GRASS Development Team, GRASS GIS 8.3.1 Reference Manual