grass-addons icon indicating copy to clipboard operation
grass-addons copied to clipboard

[Bug] r.basin: g.region conflict

Open adrian199108 opened this issue 5 years ago • 1 comments

Name of the addon r.basin

Describe the bug I run the application and everything seems to go well, until I get this message: ERROR: Region resolution and raster map <Basin_DEM_strahler> resolution differs. Run 'g.region raster=Basin_DEM_strahler' to set proper region resolution.

No problems on calculating other parameters, but stops there though. I run 'g.region raster=Basin_DEM_strahler', but still get the same error. I changed the outlet coordinates, and still get the same error.

To Reproduce Load inputs and run.

Screenshots image

Additional context Windows 10. Grass 7.8.3

adrian199108 avatar Oct 19 '20 23:10 adrian199108

tested here with OSGeo4W winGRASS 7.8.1 and OSGeo4W winGRASS 7.8.4, r.basin works.

it seems there is some mismatch between the raster and the resolution.

to align the resolution to the raster, see the g.region manual:

-a
    Align region to resolution (default = align to bounds, works only for 2D resolution)

and

align=name
    Adjust region cells to cleanly align with this raster map

so compare

g.region -p raster=Basin_DEM_strahler

with

g.region -ap raster=Basin_DEM_strahler align=Basin_DEM_strahler

@madi any other idea?

hellik avatar Oct 24 '20 07:10 hellik