[GRASS-user] Different distances to outlet for r.stream.order and r.stream.distance

Markus Metz markus.metz.giswork at gmail.com
Wed Sep 21 02:08:31 PDT 2016


On Tue, Sep 20, 2016 at 10:53 AM, Mira Kattwinkel
<kattwinkel-mira at uni-landau.de> wrote:
> Dear List
>
> r.stream.order gives, among other output, the distance of current the stream
> init from the outlet of the catchment ('out_dist'). So for the most
> downstream segment this is identical to the length of the segment.
> r.stream.distance calculates the distance to the outlet and results in a
> raster file. Both are based on a stream raster and a direction raster.
>
> When I compare the results, they are slightly different, although based on
> the same input files (see the attached Fig1). The raster value is 212.33 at
> the junction, while the out_dist of the line is 237.69. The difference is
> one cellsize (25.023 in may example), probably due to the horizontal bit of
> the line at the end (upper right of the figure).

Yes, this horizontal bit of the line is a bug in r.stream.order, the
stream vector is leaving the current region or going into a NULL cell.
All other r.stream.* modules place the outlet on a valid cell. Fixed
in r69542.

> However, this difference is
> not fixed. In the middle of the network (Fig2) it is larger (81028.9 -
> 81002.89 = 27).

What is the difference in the middle of the network now with r69542?

Markus M

>
> What is the reason for this difference? Is this a bug or a wanted behaviour?
>
> I want to extract the position of points on the network (i.e. upstream of a
> junction on the lines). To this end, I planned to use the upstream distance
> of the points and the out_dist of the segments (length(segment) -
> (out_dist(segment) - upDist(point)) = position(point)).
> Has anybody another idea how to accomplish this?
>
> Thanks a lot,
> Mira
>
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user


More information about the grass-user mailing list