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.
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:
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
Last changed: $Date$