The recommended method requires two maps: flow direction and streams. Using cats option it is possible to create basins having the same category of the stream they refer to. The module is prepared to work with output data of r.watershed, r.stream.extract, r.stream.order also with modification done by r.reclass and r.mapcalc. r.stream.basins can delineate basins according outlets marked by raster streams, polygons, vector points or coordinates. If the outlets are given by points or coordinates, the module delineates the basins individuating the cells that drain into that point. If the outlets are marked by the streams, it includes the cells that contribute to the last (downstream) cell of each stream. If the outlets are marked by polygons, it includes the cells contributing to the most downstream cell of the polygon. If the polygon covers more outlets than of one basins, it will create a collective basin for all the outlets with common category.
The module produces one raster map with basins defined according to the user's rules.
To achieve good results, outlets markers created by the user shall overlap with the streams, otherwise basins could result with very small area. Input maps must be in CELL format (default output of r.watershed, r.stream.order or r.stream.extract).
To delineate all basins with categories of streams:
r.stream.basins direction=direction stream_rast=streams basins=bas_basins_elem
To determine major and minor basins defined by outlets, ignoring subbasins, use -l flag. This flag ignores all nodes and uses only real outlets (in most cases that on map border):
r.stream.basins -l direction=direction stream_rast=streams basins=bas_basins_last r.stream.basins direction=direction coors=639936.623832,216939.836449
To delineate one or more particular basins defined by given streams, add simply stream categories:
r.stream.basins -lc direction=direction stream_rast=streams cats=2,7,184 basins=bas_basin
To delineate basins of particular order, the following procedure can be used:
r.stream.basins -lc direction=direction stream_rast=strahler cats=2 \ basins=bas_basin_strahler_2
The usage of polygons as outlets markers is useful when the exact stream course cannot be clearly determined before running the analysis, but the area of its occurrence can be determined (mainly by iterative simulations). In the example, r.circle is used, but it can be substituted by any polygon created for example with v.digit:
r.circle -b output=circle coordinate=639936.623832,216939.836449 max=200 r.stream.basins -c direction=direction streams=circle basins=bas_simul
To determine areas of contribution to streams of particular order use as streams the result of ordering:
r.stream.basins direction=direction stream_rast=ord_strahler basins=bas_basin_strahler
Determination of areas of potential source of pollution. The example will be done for lake marked with FULL_HYDR 8056 in North Carolina sample dataset. The lake shall be extracted and converted to binary raster map.
v.extract -d input=lakes@PERMANENT output=lake8056 type=area layer=1 \ where='FULL_HYDRO = 8056' new=-1 v.to.rast input=lake8056 output=lake8056 use=val type=area layer=1 value=1 r.stream.basins direction=direction streams=lake8056 basins=bas_basin_lake
See also the tutorial: http://grass.OSGeo.org/wiki/R.stream.*
Last changed: $Date$