GRASS logo

NAME

r.stream.snap - Snap point to modelled stream network.
Input can be stream network, point vector map with outlets or outlet coordinates.

KEYWORDS

raster, hydrology, stream network, basins creation

SYNOPSIS

r.stream.snap
r.stream.snap --help
r.stream.snap input=name output=name [stream_rast=name] [accumulation=name] [threshold=float] [radius=integer] [memory=integer] [--overwrite] [--help] [--verbose] [--quiet] [--ui]

Flags:

--overwrite
Allow output files to overwrite existing files
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--ui
Force launching GUI dialog

Parameters:

input=name [required]
Name of input vector map
Name of input vector points map
output=name [required]
Name for output vector points map
stream_rast=name
Name of input raster map with stream network
accumulation=name
Name of input accumulation raster map
threshold=float
Minimum accumulation threshold to snap
Default: -1
radius=integer
Maximum distance to snap (in cells)
Default: 1
memory=integer
Max memory used (MB)
Default: 300

Table of contents

DESCRIPTION

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

For the outlet, the point is snapped to the nearest point which lies on the streamline.

For the stream initial points, when there is a small tributary near the main stream, the accumulation threshold shall be high enough to force the program ignoring this tributary 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 necessary.

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 those points in the 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 the stream tube. While for inits small thresholds are in use, it is probable that points were snapped to the stream tube 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 the 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 the 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 to snap the point. This option is added to the 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 its own unique category.
output
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 raster=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.mapcalc, r.patch, r.reclass, r.stream.extract, r.stream.basins, r.stream.channel, r.stream.order, r.stream.segment, r.stream.slope, r.stream.stats, r.stream.distance, r.watershed

See also r.streams.* modules wiki page.

AUTHOR

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

SOURCE CODE

Available at: r.stream.snap source code (history)

Latest change: Tuesday Nov 05 09:35:47 2024 in commit: f00067506253c89598cffadc3c7fa07cff7233fd


Main index | Raster index | Topics index | Keywords index | Graphical index | Full index

© 2003-2024 GRASS Development Team, GRASS GIS 8.5.0dev Reference Manual