[GRASS-user] Filling sinks w/ minimum slope

Markus Metz markus.metz.giswork at gmail.com
Tue Jun 20 01:45:20 PDT 2017


On Tue, Jun 20, 2017 at 10:05 AM, Ken Mankoff <mankoff at gmail.com> wrote:
>
>
> On 2017-06-20 at 06:28, Markus Metz <markus.metz.giswork at gmail.com> wrote:
> > You don't need to fill sinks with r.watershed, internal sinks are by
> > default drained.
>
> I have negative values in the drainage direction raster produced by
r.watershed in the interior. Is this a bug? Or am I misunderstanding the
definition of a sink?

Negative values in the drainage direction should only occur at the borders
of the current region and around NULL cells. Note that if you want internal
sinks to be drained, you must not use the depression option.

>
> While looking into this, I also notice that I get different accumulation
maps if I scale the elevation (e.g. divide by 100), even when using the
"-s" flag. At first consideration, this does not make sense to me.

There could be small differences due to floating point representation
differences.
>
> > You can create flat areas (also with r.terraflow), then use the -b
> > flag of r.watershed to create a gentle slope for flat areas.
>
> I tried this and the accumulation map still has end-points (and direction
has negative values) in the interior.

Accumulation stops only if true sinks are defined with the depression
option or if the elevation of any neighbor is unknown (border of the
current region, NULL cells).

I tested with elev_lid792_1m in the NC dataset and don't get negative
drainage in internal sinks:

g.region -p rast=elev_lid792_1m
r.watershed ele=elev_lid792_1m drain=elev_lid792_1m_drain
acc=elev_lid792_1m_acc

Markus M
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20170620/8d776c14/attachment.html>


More information about the grass-user mailing list