[GRASS-dev] r.terraflow vs. r.hydrodem

Markus Metz markus.metz.giswork at gmail.com
Sat Jun 15 13:43:49 PDT 2019


Hi Stefan,

On Fri, Jun 14, 2019 at 10:03 PM Stefan Blumentrath <
Stefan.Blumentrath at nina.no> wrote:
>
> Hei,
>
> Before investing time in getting r.terraflow to work on larger regions I
actually tried r.fill.dir.
>
> The problem is that the results are significantly different and those of
r.terraflow and r.hydrodem (where no breaching is performed) are more
suitable for my needs. Here, r.terraflow fills most, r.fill.dir least and
r.hydrodem inbetween.

I remember from previous tests that r.fill.dir might need several runs.
Using elevation from nc_spm_08 as in your example, r.fill.dir apparently
needs to be run 5 times to resolve all problem areas. Maybe you get the
desired results by running r.fill.dir multiple times, using the output of
the previous run as input for the next run. r.fill.dir should also use far
less resources (disk space and memory) than r.terraflow or r.hydrodem.

Markus M
>
> Here a little comparison based on NC data:
>
> g.extension extension=r.hydrodem operation=add
> g.region -p raster=elevation
>
> r.fill.dir --overwrite --verbose input=elevation
output=elevation_fill_dir_depressionless
direction=elevation_fill_dir_direction areas=elevation_fill_dir_pas
>
> r.hydrodem -a --overwrite input=elevation memory=5000
output=elevation_hydrodem_depressionless
>
> r.terraflow --overwrite --verbose elevation=elevation
filled=elevation_terraflow_depressionless memory=5000
>
> for m in terraflow fill_dir hydrodem
> do
> r.mapcalc --o
expression="${m}_effect=if((elevation_${m}_depressionless-elevation)>0,elevation_${m}_depressionless-elevation,null())"
> done
>
> r.univar map="terraflow_effect"
> total null and non-null cells: 2025000
> total null cells: 1901290
>
> Of the non-null cells:
> ----------------------
> n: 123710
> minimum: 7.62939e-06
> maximum: 12.5168
> range: 12.5168
> mean: 1.49711
> mean of absolute values: 1.49711
> standard deviation: 1.97871
> variance: 3.91528
> variation coefficient: 132.169 %
> sum: 185206.976940155
>
> r.univar map="fill_dir_effect"
> total null and non-null cells: 2025000
> total null cells: 1964852
>
> Of the non-null cells:
> ----------------------
> n: 60148
> minimum: 7.62939e-06
> maximum: 10.9003
> range: 10.9003
> mean: 0.499953
> mean of absolute values: 0.499953
> standard deviation: 0.939429
> variance: 0.882526
> variation coefficient: 187.903 %
> sum: 30071.1971092224
>
> r.univar map="hydrodem_effect"
> total null and non-null cells: 2025000
> total null cells: 1020396
>
> Of the non-null cells:
> ----------------------
> n: 1004604
> minimum: 3.8147e-06
> maximum: 4.74686
> range: 4.74685
> mean: 0.00587574
> mean of absolute values: 0.00587574
> standard deviation: 0.08715
> variance: 0.00759513
> variation coefficient: 1483.22 %
> sum: 5902.79515457153
>
> Cheers
> Stefan
> ________________________________
> Fra: Markus Metz <markus.metz.giswork at gmail.com>
> Sendt: fredag 14. juni 2019 14.25
> Til: Stefan Blumentrath
> Kopi: grass-dev at lists.osgeo.org
> Emne: Re: [GRASS-dev] r.terraflow vs. r.hydrodem
>
>
>
> On Fri, Jun 14, 2019 at 1:23 PM Stefan Blumentrath <
Stefan.Blumentrath at nina.no> wrote:
> >
> > Hi,
> >
> > While trying to make r.terraflow work with larger regions, I was
wondering if it would be doable to add a flag to r.hydrodem that forces the
module to perform only sink filling and no breaching / carving?
> >
> > Sink filling is the function I need from r.terraflow but if it would be
an option to add this function to r.hydrodem, that would be fine as well of
course...
>
> what about r.fill.dir? It should work as is with larger regions.
>
> Markus M
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20190615/9e0470aa/attachment.html>


More information about the grass-dev mailing list