- Calculates Horton's statistics for Strahler and Horton ordered networks created with r.stream.order.
, stream network
, Horton's statistics
r.stream.stats [-mco] stream_rast=name direction=name elevation=name [memory=integer] [output=name] [--overwrite] [--help] [--verbose] [--quiet] [--ui]
- Use memory swap (operation is slow)
- Print only catchment's statistics
- Print only orders' statistics
- Allow output files to overwrite existing files
- Print usage summary
- Verbose module output
- Quiet module output
- Force launching GUI dialog
- stream_rast=name [required]
- Name of input raster map with stream network
- direction=name [required]
- Name of input flow direction raster map
- elevation=name [required]
- Name of input elevation raster map
- Max memory used in memory swap mode (MB)
- Default: 300
- Name for output file (if omitted output to stdout)
The module r.stream.stats
is prepared to calculate Horton's
statistics of drainage network.
- Print only catchment's characteristics. Useful for shell script calculation
or collecting data in external tables.
- Print only parameters for every order. Useful to visualise Horton's law with
external software (see example bellow).
- Only for very large data sets. Use segment library to optimise memory
consumption during analysis.
- Stream network: name of input stream raster map produced
by r.watershed or
which ordering will be performed. Because stream network produced by
and r.stream.extract may
slighty differ in detail, it is required to use
both stream_rast and direction map produced by the same
module. The stream_rast background shall have NULL value or
zero value. Background values of NULL are by default produced by
and r.stream.extract. If
not 0 or NULL use r.mapcalc to
set background values to NULL.
- Flow direction: name of input direction raster map produced by
raster map is used, it only has non-NULL values in places where
streams occur. NULL (nodata) cells are ignored, zero and negative
values are valid direction data if they vary from -8 to 8 (CCW from
East in steps of 45 degrees). Direction map shall be of type CELL
values. Region resolution and map resolution must be the same.
Also stream_rast network map must have the same resolution. It
is checked by default. If resolutions differ the module informs about
it and stops. Region boundary and maps boundary may differ but it may
lead to unexpected results.
- Elevation: name of input elevation map. Map can be of type CELL,
FCELL or DCELL. It is not restricted to resolution of region settings
as stream_rast and direction raster map.
Output statistics are send to standard output or to a file if specified
using the output
option. Aletrnatively, to redirect output to
a file use redirection operators: >
(Unix only). If redirection is used, output messages are printed on
stderr (usually terminal) while statistics are written to the file.
Statistics can be print as a formatted summary information with number
of parameters or as a catchement's descriptive statistics and table
with statistics for every order.
These statistics are calculated according to formulas given by
R. Horton (1945). Horton didn't define precisely what is
stream slope, consequently 2 different approaches have been proposed.
The first (slope) uses cell-by-cell slope calculation.
The second (gradient)
uses the difference between elevation of outlet and source of every
channel to its length to calculate formula. Bifurcation ratio for
every order is calculated acording to the formula:
is the current order
is the next higher order. For max order of the cell
value of streams is zero. Rest of the ratios are calculated in similar
mode. The bifurcation and other ratios for the whole catchment (map)
is calculated as mean i.e. sum of all bifurcation ratio /
(for max_order stream bifurcation ratio =
). It is strongly recommended to extract the stream network
using basin map created with r.stream.basins
. If the whole
stream order raster map is used, the calculation will be performed but
results may not have hydrological sense.
For every order (std) means that statistics are calculated with standard deviation:
- number of streams
- total length of streams of a given order
- total area of basins of a given order
- drainage density
- stream density
- average length of streams of a given order (std)
- average slope (cell by cell inclination) of streams of a given order (std)
- average gradient (spring to outlet inclination) of streams of a given order
- average area of basins of a given order (std)
- avarage elevation difference of a given order (std)
- bifuracation ratio
- length ratio
- slope and gradient ratios
- area ratio
For the whole basin:
- total number of streams
- total length of streams
- total basin area
- drainage density
- stream density
- bifurcation ratio (std)
- length ratio (std)
- slope and gradient ratios (std)
- area ratio (std)
For the whole basins ratios are calculated acording two formulas: as a
mean of ratios for every order, or as a antilog of slope coefficient
of the regression model: order vs. log10(parameter)
The module calculates statistics for all streams in
input stream_rast map. It is strongly recommended to extract
only network of one basin, but it is not necessary for
computation. Streams for the desired basin can be extracted by the
following r.mapcalc formula:
# xxx denotes the category of desired basin
r.mapcalc "sel_streams = if(basin == xxx, streams, null())"
It is also possible to calculate Horton's statistics for Shreve
ordering but it has no hydrological sense. Hack (or Gravelius
hierarchy) main stream is not the same what so called Horton's reverse
ordering (see Horton 1945).
The module can work only if direction raster
map, stream_rast map and region have the same settings. It is
also required that stream_rast map and direction map come from the
same source. For lots of reason this limitation probably cannot be
omitted. This means that if stream_rast map comes from
must be used. If the stream network was generated with MFD method also
MFD direction map must be used.
Create table with order statistics. This table can easily be sent to
external program (like R) to be visualized (assuming a unix-like command
g.region -p -a raster=elevation
r.watershed elevation=elevation threshold=10000 drainage=direction stream=streams
r.stream.stats stream_rast=horton direction=direction elevation=elevation
# export for processing in R
r.stream.stats -o stream_rast=horton direction=direction elevation=elevation > tmp_file
# now in R
r=read.csv("tmp_file", skip=1, header=TRUE)
plot(num_of_streams~order, data=r, log="y",
sub=paste("Bifurcation ratio: ",
- Horton, R. E. (1945), Erosional development of streams and their drainage
basins: hydro-physical approach to quantitative morphology, Geological
Society of America Bulletin 56 (3): 275-370
modules wiki page.
Jarek Jasiewicz, Adam Mickiewicz University, Geoecology and Geoinformation Institute.
r.stream.stats source code
Latest change: Wed Feb 2 21:46:15 2022 in commit: 2e3dcb5eafe36d640aa68585be0192f07ca1eabb
Main index |
Raster index |
Topics index |
Keywords index |
Graphical index |
GRASS Development Team,
GRASS GIS 8.0.3dev Reference Manual