[GRASS-user] Problem in running r.basin

Blumentrath, Stefan Stefan.Blumentrath at nina.no
Thu Oct 13 13:14:22 PDT 2016


Hi Priscilla,

I guess the problem is that you run g.region both with the –a flag and the align option.
Se: https://grass.osgeo.org/grass70/manuals/g.region.html

Please try:
g.region -p raster=out_Ghiandone_DEM_strahler at Silvia align=out_Ghiandone_DEM_strahler at Silvia
or even just:
g.region -p raster=out_Ghiandone_DEM_strahler at Silvia
(both commands should give the same result).

I have seen quite some confusion around the –a flag (e.g. it has been used in Processing in QGIS in a unsuitable way for quite some time).
Maybe the manual should be improved by:

1)      altering the flag description and

2)      adding examples for aligning the region to

a.      another raster map

b.      a user given resolution / map resolution

Flag description could be e.g.:
“Adjusted to be even multiples of the resolution in raster or res option” instead of the current:
“Align region to resolution (default = align to bounds, works only for 2D resolution)”

BTW, is there any case where it makes sense to specify both –a flag and align option? If not, both could be made mutually exclusive in order to avoid such confusion?

Finally, two possible examples for the manual of g.region, which might help to make that a bit more clear:

# Set region extent to a vector map and align resolution to an existing raster map
g.region –p vector=soils align=elev_state_500m

# Define region to  align resolution to be an even multiple of the resolution specified by the user
g.region –pa vector=soils res=100


Kind regards,
Stefan

From: grass-user [mailto:grass-user-bounces at lists.osgeo.org] On Behalf Of Margherita Di Leo
Sent: 13. oktober 2016 18:18
To: Priscilla_I <isacco.silvia at gmail.com>
Cc: GRASS user list <grass-user at lists.osgeo.org>
Subject: Re: [GRASS-user] Problem in running r.basin

Hi,

On Thu, Oct 13, 2016 at 4:51 PM, Priscilla_I <isacco.silvia at gmail.com<mailto:isacco.silvia at gmail.com>> wrote:
Hi,
I'm a new grass user, running "r.basin" module for Grass 7.0.4 on Windows
10, I get this error message "ERROR: Region resolution and raster map
<out_Ghiandone_DEM_strahler> resolution differs. Run 'g.region
raster=out_Ghiandone_DEM_strahler' to set proper region resolution."
I'm using a map in projected coordinates, and I align region with the raster

g.region -p -a raster=out_Ghiandone_DEM_strahler at Silvia
align=out_Ghiandone_DEM_strahler at Silvia

projection: 1 (UTM)
zone:       32
datum:      wgs84
ellipsoid:  wgs84
north:      4965768.6398801
south:      4943886.74090327
west:       353479.72655961
east:       379279.66825865
nsres:      24.64177813
ewres:      24.64177813
rows:       888
cols:       1047
cells:      929736


raster info are

Map:      out_Ghiandone_DEM_strahler at Si  Date: Thu Oct 13 11:31:23 2016    |
 | Mapset:   Silvia                         Login of Creator: Silvia
|
 | Location: Piemonte
|
 | DataBase: C:\Users\Silvia\Desktop\Grass
|
 | Title:     ( out_Ghiandone_DEM_strahler )
|
 | Timestamp: none
|

|----------------------------------------------------------------------------|
 |
|
 |   Type of Map:  raster               Number of Categories: 0
|
 |   Data Type:    CELL
|
 |   Rows:         888
|
 |   Columns:      1047
|
 |   Total Cells:  929736
|
 |        Projection: UTM (zone 32)
|
 |            N: 4965768.6398801    S: 4943886.74090327   Res: 24.64177813
|
 |            E: 379279.66825865    W: 353479.72655961   Res: 24.64177813
|
 |   Range of data:    min = 1  max = 4
|
 |
|
 |   Data Description:
|
 |    generato da r.stream.order
|
 |
|
 |   Comments:
|
 |    r.stream.order stream_rast="out_Ghiandone_DEM_stream_e" direction="o\
|
 |    ut_Ghiandone_DEM_drainage_e" strahler="out_Ghiandone_DEM_strahler" h\
|
 |    orton="out_Ghiandone_DEM_horton" shreve="out_Ghiandone_DEM_shreve" h\
|
 |    ack="out_Ghiandone_DEM_hack" memory=300
|
 |
|

+----------------------------------------------------------------------------+

Any ideas? Thanks in advance!

What is the exact r.basin command line that you  run? Can you post also r.info<http://r.info> of the DEM that you use as input?



--
Margherita Di Leo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20161013/5e00c630/attachment-0001.html>


More information about the grass-user mailing list