[GRASS-user] Problem in running r.basin

Priscilla_I isacco.silvia at gmail.com
Fri Oct 14 05:33:55 PDT 2016


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

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] <
ml-node+s1560n5290654h81 at n6.nabble.com>:

> 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
> <http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5290587&code=aXNhY2NvLnNpbHZpYUBnbWFpbC5jb218NTI5MDU4N3w3Mjk2MDM5MDE=>
> .
> 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: http://osgeo-org.1560.x6.nabble.com/Problem-in-running-r-basin-tp5290587p5290740.html
Sent from the Grass - Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20161014/3b65f4dc/attachment-0001.html>


More information about the grass-user mailing list