## NAME

r.flowmd - construction of slope lines (flowlines), flowpath lengths and flowline densities from a raster digital elevation model using a modified multiple directions algorithm.

(GRASS Raster/Vector Program)

## SYNOPSIS

r.flowmd
r.flowmd help
r.flowmd [-d ] elevin=name aspin=name [barrierin=name ] [skip=val ] [flout=name [lgout=name ] [dsout=name ]

## DESCRIPTION

r.flowmd

generates flowlines using a combined raster-vector approach from input elevation elevin , aspect aspin and optionally barrier barrierin raster maps.

Input elevation raster map with integer values should have values in centimeters preventing premature flowline stop in flat areas. Aspect used for input must follow the same rules as aspect computed in other GRASS programs (see r.slope.aspect, s.surf.rst). Barriers are defined by non-zero values in an input raster map barierin . Make sure that the resolution of your current region is set to the resolution of the elevation raster file.

There are three possible output maps which can be produced in any combination simultaneously: a vector file flout of flowlines, a raster map lgout of flowpath lengths, and a raster map dsout of flowline densities. Flowlines are constructed by straight line segments (vectors) with endpoints creating intersections of the flowline with edges of the imaginary mesh connecting centers of the grid cells. Flowlines are generated from each cell uphill by default; they can be generated downhill using the flag -d . 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, skip =val , indicates that only the flowlines from every val th cell are to be included in flout . The default skip is 1. A high skip usually speeds up processing time and often improves the readability of a visualization of flout .

Flowpath length output flout gives the horizontal length of the flowline for given grid cell in units defined by your mapset. It is computed as the sum of the planar length of all straight flowline segments.

Flowline density output dsout represents the number of generated flowlines passing through the given cell. This program uses a modified multiple directions algorithm. Flowline density for each flowline passing between 2 grid cell centers is fractioned between these grid cells by distance. This algorithm smoothes flowline densities on convex (dispersing) slopes. Flowline lengths and densities can be computed for both uphill and downhill directionss.

## OPTIONS

The user can run this program either interactively or non-interactively. The program will be run non-interactively if the user specifies program arguments and flag settings on the command line using the form:

> r.flowmd [-d ] elevin=name aspin=name [barrierin=name] [skip=val ] [flout=name ] [lgout=name ] [dsout=name ]

Alternately, the user can simply type r.flowmd on the command line without program arguments. In this case, the user will be prompted for parameter values and flag settings using the standard GRASS parser interface.

Flag:

[-d ]
  Generate flowlines downhill (default generates flowlines uphill)

Parameters:

elevin=name
  Use the existing raster file with elevationsname as input.
aspin=name
  Use the existing raster file with aspectname as input.
barrierin=name
  Use the existing raster file with non-zero values representing barriers with name as input.
skip=val
  Set the the number of cells skipped for origins of flowlines to val .
flout=name
  Output coordinates of flowlines to vector file named name .
lgout=name
  Output flowpath length values to raster file named name .
dsout=name
  Output flowline density values to raster file named name .

## Algorithm background

1. Construction of flow-lines (slope-lines): r.flow 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 both r.flowmd and r.flow algorithms (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.

2. Computation of contributing areas: r.flowmd divides this flow proportionally to two downslope adjacent cells using the distance between the intersection node (flowline node) and these adjacent cell centres. (All these three points are always on one connection line). Therefore r.flowmd uses a multiple flow algorithm but using a flux decomposition different from Desmet & Govers (1996). D. & G. split the flux vector to two ordinal components (cells) using sin, cos of the aspect value. The flux is then divided to 2 from 4 neighboring cardinal cells. The algorithm used in r.flowmd divides the flux to two adjacent downslope cells (always one cardinal and one diagonal cell) using a procedure as described above.

## NOTES

Flowlines generated uphill are used for computation of the flowpath length (slope lenghts) defining the distance between the grid cell and upland area. This can be used, for example, in water erosion modeling for the computation of LS factor in standard form of USLE. Flowlines can be also generated downhill from each grid point to simulate the topographic potential for quasi steady-state overland water flow. Downslope flowline density multiplied by grid cell area gives the upslope contributing area. This topographic parameter defines an area from which water inflows to the given cell. This area is an estimate of potential steady-state water flux and can be used in the modeling of water erosion and for computation of unit stream power based LS factor. The program has been designed for modeling erosion on hillslopes and has a very strict condition for ending the flowline. It is therefore not very suitable for the extraction of stream network or delineation of watersheds unless a DEM without pits or flat areas is available.

To label the vector flowlines automatically, the user can use v.llabel.

## FURTHER NOTES

Differences between r.flow and r.flowmd

1. r.flow has an option to compute slope and aspect internally thus making the program capable to process much larger data sets than r.flowmd. It has also 2 additional options for handling of large data sets but it is not known that they work properly.
2. the programs handle the special cases when the flowline passes exactly (or very close) through the grid vertices differently.
3. r.flowmd has the simplified multiple flow addition so the results are smoother.

In conclusion, r.flowmd produces nicer results but is slower and it do support as large data sets as r.flow.

## SEE ALSO

r.flow,
r.watershed,
r.drain,
r.slope.aspect,
s.surf.rst v.llabel

## AUTHOR

Jaroslav Hofierka, GeoModel s.r.o., Bratislava, Slovakia

## REFERENCES

Mitasova, H., L. Mitas, 1993, Interpolation by regularized spline with tension : I. Theory and implementation. Mathematical Geology 25, p. 641-655. (online)
GMSL/University of Illinois at Urbana-Champaign

Mitasova, H., J. Hofierka, 1993, Interpolation by regularized spline with tension : II. Application to terrain modeling and surface geometry analysis. Mathematical Geology 25, p. 657-669. (online)

Mitasova, H., Hofierka, J., Zlocha, M., Iverson, R. L. (1996). Modelling Topographic Potential for Erosion and Deposition Using GIS. International Journal of Geographical Information Systems, 10, 629-641. (online)

Mitasova, H.(1993): Surfaces and modeling. Grassclippings (winter and spring) p.18-19.

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)

Last changed: $Date: 2003/02/05 12:46:03 $