DESCRIPTION

The module r.stream.snap is a supplementary module for r.stream.extract and r.stream.basins to correct position of outlets or stream initial points as they do not lie on the streamlines.

For outlets, the situation is clear. Points are snapped to nearest point which lies on the streamline. In situation where there can be a small tributuary nearer than main stream accumulation threshold shall be high enough to force the program ignoring this tributuary and snap to the main stream. If there is no accumulation map, the points will be snapped to the nearest stream line, which in particular situations may be wrong. Because the r.stream.* modules are prepared to work with MFD accumulation maps, both stream network and accumulation map are neccessary to resolve the problem.

While it is assumed that the accumulation map is a MFD map, if the stream network is not supplied, the snap point is calculated in different way: the threshold is used to select only these points in search radius which have accumulation value greater than the given threshold. The next mean value of these points is calculated and its value is taken as a new threshold. This procedure guarantees that points are snapped to the center of stream tube. While for inits small thresholds are in use, it is probable that points were snapped to the streamtube border instead of its center.

It is strongly recommended to use both stream network (even pre-generated with small accumulation threshold) and accumulation raster map, than accumulation or stream raster map only.

OPTIONS

stream_rast
Stream network created by r.stream.extract or r.watershed. If used, the points are snapped to the nearest streamline point whose accumulation is greater than threshold. If the accumulation is not used, the point is snapped to the nearest stream.
accumulation
Accumulation map created with r.watershed and used to generate the stream network with r.stream.extract. If the stream network is not used, the point is adaptively snapped to the point where the value is greater than mean values of accumulation greater than given threshold in a search radius. See description for details.
radius
Search radius (in cells). If there are no streams in the search radius, the point is not snapped. If there are no cells with accumulation greater than accumulation threshold, the point also is not snapped.
threshold
Minimum value of accumulation which cell must have to snap point. This option is added to snap stream inits to the stream tubes and to distinguish between local tributaries and main streams.
input
Vector file containing outlets or inits as vector points. Only point's categories are used. Any table attached to it is ignored. Every point shall have his own unique category.

OUTPUTS

Vector file containing outlets or inits after snapping. On layer 1, the original categories are preserved, on layer 2 there are four categories which mean:

  1. skipped (not in use yet)
  2. unresolved (points remain unsnapped due to lack of streams in search radius
  3. snapped (points snapped to streamlines)
  4. correct (points which remain on their original position, which were originally corrected)

EXAMPLE

g.region -p -a rast=elevation
r.watershed elevation=elevation threshold=10000 drainage=dirs stream=streams accumulation=accum
# snap a point sampled in the riverine landscape to the calculated river network
r.stream.snap input=mysampleoutlet output=mysampleoutlet_snapped stream_rast=streams accumulation=accum

SEE ALSO

r.watershed, r.stream.extract, r.stream.basins, r.stream.order, r.stream.stats, r.mapcalc, r.reclass, r.patch

AUTHOR

Jarek Jasiewicz, Adam Mickiewicz University, Geoecology and Geoinformation Institute.

Last changed: $Date$