[GRASS-user] Problem in running r.basin
Margherita Di Leo
diregola at gmail.com
Fri Oct 14 06:42:06 PDT 2016
Hi,
On Fri, Oct 14, 2016 at 2:33 PM, Priscilla_I <isacco.silvia at gmail.com>
wrote:
> Hi,
> Thanks for your answers, here the command line I run
> r.basin map=Ghiandone_DEM at Silvia prefix=out
> coordinates=368450.0,4954025.0 dir=Silvia threshold=1000 --overwrite
>
I think the problem lies in the "overwrite", which is not handled by
r.basin. Try to remove all your output map, then set the region on the DEM
and then run r.basin, and let us know.
>
> and these are my input raster info
>
> +-----------------------------------------------------------
> -----------------+
> | Map: Ghiandone_DEM at Silvia Date: Fri Sep 02 12:32:06
> 2016 |
> | Mapset: Silvia Login of Creator: Silvia
> |
> | Location: Piemonte
> |
> | DataBase: C:\Users\Silvia\Desktop\Grass
> |
> | Title: ( Ghiandone_DEM )
> |
> | 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 = 0 max = 2550
> |
> |
> |
> | Data Description:
> |
> | generato da r.in.gdal
> |
> |
> |
> | Comments:
> |
> | r.in.gdal input="C:\Users\Silvia\Desktop\Grass\Piemonte\Silvia\Ghian\
> |
> | done_DEM.tif" output="Ghiandone_DEM" memory=300 offset=0
> |
> |
> |
> +----------------------------------------------------------
> ------------------+
> (Fri Oct 14 10:11:48 2016) Comando terminato (0 sec)
>
> I tried with Stefan's command line but unfortunately I didn't solve my
> problem.
>
> 2016-10-14 2:45 GMT+02:00 SBL [via OSGeo.org] <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=5290740&i=0>>:
>
>> 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:[hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=5290654&i=0>] *On Behalf Of *Margherita
>> Di Leo
>> *Sent:* 13. oktober 2016 18:18
>> *To:* Priscilla_I <[hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=5290654&i=1>>
>> *Cc:* GRASS user list <[hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=5290654&i=2>>
>> *Subject:* Re: [GRASS-user] Problem in running r.basin
>>
>>
>>
>> Hi,
>>
>>
>>
>> On Thu, Oct 13, 2016 at 4:51 PM, Priscilla_I <[hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=5290654&i=3>> 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 of the DEM that you use as input?
>>
>>
>>
>>
>>
>>
>>
>> --
>>
>> Margherita Di Leo
>>
>> _______________________________________________
>> grass-user mailing list
>> [hidden email] <http:///user/SendEmail.jtp?type=node&node=5290654&i=4>
>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>> http://osgeo-org.1560.x6.nabble.com/Problem-in-running-r-
>> basin-tp5290587p5290654.html
>> To unsubscribe from Problem in running r.basin, click here.
>> NAML
>> <http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
> ------------------------------
> View this message in context: Re: Problem in running r.basin
> <http://osgeo-org.1560.x6.nabble.com/Problem-in-running-r-basin-tp5290587p5290740.html>
>
> Sent from the Grass - Users mailing list archive
> <http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html> at
> Nabble.com.
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
--
Margherita Di Leo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20161014/060972a3/attachment-0001.html>
More information about the grass-user
mailing list