[GRASS-user] Filling sinks w/ minimum slope

Markus Metz markus.metz.giswork at gmail.com
Mon Jun 19 23:28:07 PDT 2017


On Mon, Jun 19, 2017 at 10:35 PM, Ken Mankoff <mankoff at gmail.com> wrote:
>
>
> On 2017-06-19 at 18:20, Stefan Blumentrath <Stefan.Blumentrath at nina.no>
wrote:
> > To my knowledge r.watershed does not require to fill sinks in advance,
> > because it has a minimal impact routing for handling (non-real) sinks.
> >
> > Do you have a particular reason for your wish to fill the DEM in
> > advance?
>
> If I don't fill it, then my definition of non-real and the algorithms
definition are different. I need all water to leave the domain, but there
are internal sinks.

You don't need to fill sinks with r.watershed, internal sinks are by
default drained. You could also use r.hydrodem to remove internal sinks.

> My solution is to fill them like this:
>
> # run the filling algorithm until there are no holes left
> A=1
> while [[ $A -ne 0 ]]; do
>   r.fill.dir input=phi output=phi format=agnps direction=d areas=a --o --q
>   A=$(r.info a | egrep -o "max = .*" | cut -c7-20)
> done
> g.remove -f type=raster name=a,d
>
> Then use "phi" as the elevation input to r.watershed. Then all water
leaves the domain, but there are flat areas. I would prefer if these were
gently-sloped. A colleague does this in QGIS w/ SAGA and the minimum slope,
but I am trying to make the work reproducible, and therefore prefer CLI
GRASS to GUI QGIS.

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.

Markus M

>
>   -k.
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20170620/f973783d/attachment.html>


More information about the grass-user mailing list