[GRASS-dev] Unresolved directions in r.fill.dir
Markus Metz
markus.metz.giswork at gmail.com
Sun Nov 26 13:04:21 PST 2017
Hi Vaclav,
On Sun, Nov 26, 2017 at 1:31 AM, Vaclav Petras <wenzeslaus at gmail.com> wrote:
>
> Hi all,
>
> r.fill.dir with the bellow artificial DEM leaves part of the directions
unresolved and this area is marked in areas, although the area is filled in
the output. Here is the code to reproduce:
>
> g.region n=220750 s=220000 w=638300 e=639000 nsres=1 ewres=1 rows=750
cols=700 -p
> r.mapcalc "hills = 500 * sin(row()) + 500 * sin(col())"
> r.fill.dir input=hills output=filled direction=directions areas=areas
>
> In r71809, I have committed a fix which transforms these unresolved
directions to NULLs because in the previous implementation (current 7.4svn
and older) internal representation of angles was leaking outside of the
module.
>
> I have 2 questions:
>
> Should I backport r71809 to 7.4?
For me, the fix makes sense.
>
> Should we pursue this issue further to resolve why these edge cases are
not resolved, although they are filled? Does anybody has suggestions at
this point? (Paper with the method is linked in the doc.)
I don't think it is worth the pursue the issue of directions any further.
The module is based on rather old, not to say outdated, methods from the
1980's. These methods were developed for DEMs created from contour lines
which in turn were determined by land surveyors. Back then there was
nothing like SRTM or LiDAR.
r.hydrodem offers a more advanced method to remove sinks by a combination
of filling and carving.
Directions can also be obtained with r.slope.aspect or with the
hydrological modules r.watershed, r.stream.extract, r.terraflow. Regarding
hydrology, main flow directions may differ between modules and settings and
to directions from r.slope.aspect, but all of them are valid according to
the logic of the underlying algorithm and settings.
Markus M
>
> Thank you,
> Vaclav
>
> https://trac.osgeo.org/grass/changeset/71809
> https://grass.osgeo.org/grass74/manuals/r.fill.dir.html
>
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20171126/ca69d850/attachment.html>
More information about the grass-dev
mailing list