[GRASS-user] error: accumulation map does not match with elevation map! (r.basin)

Margherita Di Leo diregola at gmail.com
Thu Feb 7 02:14:57 PST 2013


Hi,

On Wed, Jan 23, 2013 at 3:18 PM, Markus Metz
<markus.metz.giswork at gmail.com>wrote:

> On Wed, Jan 23, 2013 at 1:21 PM, Helmut Kudrnovsky <hellik at web.de> wrote:
> >> but when I launch r.basin in a closing section of the basin, I get the
> > error: "map of accumulations
> >> does not match the map of elevations."
> >
> > r.basin is based upon r.stream.extract and other useful modules.
>
> The bug is in r.basin which modifies the current region after
> r.watershed is called and before r.stream.extract is called, if the
> default threshold should be used. In this case, the region is set to
> match the input elevation map in order to get the resolution (nsres
> only by the way). The fix would be to replace in r.basin.py line 135 -
> 137
>         info_region = grass.read_command('g.region', flags = 'p', rast
> = '%s' % (r_elevation))
>         dict_region = grass.parse_key_val(info_region, ':')
>         resolution = float(dict_region['nsres'])
> with
>         resolution = grass.region()['nsres']
>

 FYI, I applied this modification, and also switched from SFD to MFD
algorithm in r.basin. I also updated the wiki page documentation
accordingly.

Regards,
madi


-- 
Margherita DI LEO
Postdoctoral Researcher

European Commission - DG JRC
Institute for Environment and Sustainability (IES). Unit H03 – FRC
Via Fermi, 2749
I-21027 Ispra (VA) - Italy - TP 261

Tel. +39 0332 78 3600
margherita.di-leo at jrc.ec.europa.eu

Disclaimer: The views expressed are purely those of the writer and may not
in any circumstance be regarded as stating an official position of the
European Commission.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20130207/dc93b9be/attachment.html>


More information about the grass-user mailing list