Hi Helmut and Margherita,
Thanks for your mails! Here are the answers to your questions:
a) This is the result of r.info and g.region:
r.info map@Elevation
±---------------------------------------------------------------------------+
| Map: map@Elevation Date: Sat Nov 15 16:35:08 2014 |
| Mapset: Elevation Login of Creator: Andrea |
| Location: ElevationData |
| DataBase: C:\Users\Andrea\Documents\grassdata |
| Title: ( map ) |
| Timestamp: none |
|
| Type of Map: raster Number of Categories: 0 |
| Data Type: FCELL |
| Rows: 21612 |
| Columns: 10812 |
| Total Cells: 233668944 |
| Projection: Latitude-Longitude |
| N: 45:00:02N S: 42:59:58N Res: 0:00:00.333333 |
| E: 70:59:58W W: 72:00:02W Res: 0:00:00.333333 |
| Range of data: min = 18.40538 max = 1916.398 |
|
| Data Description: |
| generated by r.patch |
|
| Comments: |
| r.patch input=“n44-72@Elevation,n45_72@Elevation” output=“map” |
|
| ±---------------------------------------------------------------------------+ |
g.region -p
projection: 3 (Latitude-Longitude)
zone: 0
datum: nad83
ellipsoid: grs80
north: 45:00:02N
south: 42:59:58N
west: 72:00:02W
east: 70:59:58W
nsres: 0:00:01
ewres: 0:00:01
rows: 7204
cols: 3604
cells: 25963216
b) These are all my steps:
++ open grass
++ load my two raster files
++ r.patch --overwrite input=n44_72@Elevation,n45_72@Elevation output=map
++ g.remove -f type=all name=original@Elevation,o_map_accumulation@Elevation,o_map_aspect@Elevation,o_map_aspect_mod@Elevation,o_map_average_hillslope@Elevation,o_map_basin@Elevation,o_map_dist2out@Elevation,o_map_drainage@Elevation,o_map_drainage_e@Elevation,o_map_hack@Elevation,o_map_height_average@Elevation,o_map_hillslope_distance@Elevation,o_map_horton@Elevation,o_map_mainchannel@Elevation,o_map_mainchannel_dim@Elevation,o_map_mainchannel_thin@Elevation,o_map_mask@Elevation,o_map_ord_1@Elevation,o_map_ord_1_thin@Elevation,o_map_r_outlet@Elevation,o_map_shreve@Elevation,o_map_slope@Elevation,o_map_strahler@Elevation,o_map_stream_e@Elevation,o_map_stream_e_thin@Elevation,r_elevation_crop@Elevation,o_map_basin@Elevation,o_map_mainchannel@Elevation,o_map_mainchannel_dim@Elevation,o_map_mainchannel_dim_point@Elevation,o_map_network@Elevation,o_map_ord_1@Elevation,o_map_outlet@Elevation,o_map_outlet_snap@Elevation,o_map_mainchannel_dim_thin@Elevation
++ g.region rast=map@Elevation res=0:00:01
(also tried with g.region -a rast=map@Elevation res=0:00:01, and got the same result)
++ r.basin map=map@Elevation prefix=o coordinates=-71.10394196,43.9865230801 threshold=19005 dir=“C:\Users\Andrea\Basins5”
c) Try to use the NC dataset
I downloaded it, but did not any changes in the resolution and computational region, since the manual said that the maps were ready for use…
I chose some coordinates just by a visual inspection of the DEM and used just random threshold. I run:
r.basin map=elev_ned_30m@PERMANENT prefix=o coordinates=640856.761198,215050.690725 threshold=400 dir="C:\Users\Andrea\Basins6
and get:
“…
…
Tot. cells 543.0
===========================
Hypsometric | quantiles
===========================
106 | 0.025
105 | 0.05
103 | 0.1
100 | 0.25
95 | 0.5
87 | 0.75
89 | 0.7
81 | 0.9
76 | 0.975
Done!
------------------------------
------------------------------
Traceback (most recent call last):
File "C:\Users\Andrea\AppData\Roaming\GRASS7\addons/scri
pts/r.width.funct.py", line 130, in
sys.exit(main())
File "C:\Users\Andrea\AppData\Roaming\GRASS7\addons/scri
pts/r.width.funct.py", line 86, in main
prc[4,0] , prc[4,1] = findint(kl,0.5) , 0.5
File "C:\Users\Andrea\AppData\Roaming\GRASS7\addons/scri
pts/r.width.funct.py", line 123, in findint
z1 , z2 , f1 , f2 = kl[float(Xf[0])][0] ,
kl[float(Xf[0]-1)][0] , kl[float(Xf[0])][1] ,
kl[float(Xf[0]-1)][1]
TypeError: only length-1 arrays can be converted to Python
scalars
Tot. cells 543.0
Tot. area 441051.75
Max distance 1693.190486
------------------------------
An ERROR occurred running r.basin
Please check for error messages above or try with another pairs of outlet coordinates"
d) Results of r.info and g.region for the NC dataset
r.info elev_ned_30m@PERMANENT
±---------------------------------------------------------------------------+
| Map: elev_ned_30m@PERMANENT Date: Tue Nov 7 00:35:18 2006 |
| Mapset: PERMANENT Login of Creator: helena |
| Location: nc_spm_08_grass7 |
| DataBase: C:\Users\Andrea\Documents\grassdata\nc_spm_08_grass7 |
| Title: South-West Wake county: National Elevation Data 30m ( elev_ned30 |
| Timestamp: none |
|
| Type of Map: raster Number of Categories: 255 |
| Data Type: FCELL |
| Rows: 450 |
| Columns: 500 |
| Total Cells: 225000 |
| Projection: Lambert Conformal Conic |
| N: 228500 S: 215000 Res: 30 |
| E: 645000 W: 630000 Res: 30 |
| Range of data: min = 55.1736 max = 156.3865 |
|
| Data Description: |
| generated by r.proj |
|
| Comments: |
| r.proj input=“ned1arcsec” location=“northcarolina_latlong” mapset="h\ |
| elena" output=“elev_ned30m” method=“cubic” resolution=30 |
|
| ±---------------------------------------------------------------------------+ |
g.region -p
projection: 99 (Lambert Conformal Conic)
zone: 0
datum: nad83
ellipsoid: a=6378137 es=0.006694380022900787
north: 228513
south: 214975.5
west: 629992.5
east: 645012
nsres: 28.5
ewres: 28.5
rows: 475
cols: 527
cells: 250325
e) The DEMs I am using
They are from the NED webpage (USGS), here is the link they sent me for downloading their files, but they are kind of large. If you want to download them I could select a catchment which only uses one DEM …
https://3c.gmx.net/mail/client/dereferrer?redirectUrl=ftp%3A%2F%2Frockyftp.cr.usgs.gov%2Fvdelivery%2FDatasets%2FStaged%2FNED%2F13%2FArcGrid%2Fn45w072.zip
https://3c.gmx.net/mail/client/dereferrer?redirectUrl=ftp%3A%2F%2Frockyftp.cr.usgs.gov%2Fvdelivery%2FDatasets%2FStaged%2FNED%2F13%2FArcGrid%2Fn44w072.zip
Hope this helps,
Regards, Andrea.
Gesendet: Dienstag, 18. November 2014 um 16:54 Uhr
Von: “Helmut Kudrnovsky” hellik@web.de
An: grass-user@lists.osgeo.org
Betreff: Re: [GRASS-user] Problem with r.basin in grass7
Andrea Timmermann wrote
Hi Margherita,
Thanks for your answer. I am sorry I did not explain well what I
meant.
When I delete all files and start again, I get again stuck at that point.
What I do is: delete all files, set region, run r.basin, get the error …
detele all files, set the region, run r.basin, get the error …
I just tried it again ..
Thanks,
Andrea
Gesendet: Dienstag, 18. November 2014 um 09:38 Uhr
Von: "Margherita Di Leo" <
diregola@
>
An: "Andrea Timmermann" <
timmermann@
>
Cc: "Helmut Kudrnovsky" <
hellik@
>, "GRASS user list" <
grass-user@.osgeo
>
Betreff: Re: [GRASS-user] Problem with r.basin in grass7
Hi Andrea,
On Tue, Nov 18, 2014 at 3:55 AM, Andrea Timmermann <
timmermann@
> wrote:
Hi Helmut,
Thanks for your email.
I set again the area and resolution with g.region before running r.basin.
I also deleted all files except my DEM.
Now I get a different error …
When I run
"r.basin map=map@Elevation prefix=o
coordinates=-71.10394196,43.9865230801 threshold=19005
dir=C:\\Users\\Andrea\\Basins"
I get:
"…
Building topology for vector map <o_map_ord_1@Elevation>…
Registering primitives…
10 primitives registered
558 vertices registered
Building areas…
0 areas built
0 isles built
Attaching islands…
Attaching centroids…
Number of nodes: 20
Number of primitives: 10
Number of points: 0
Number of lines: 10
Number of boundaries: 0
Number of centroids: 0
Number of areas: 0
Number of isles: 0
Updating attributes…
r.to.vect complete.
All in RAM calculation…
ERROR: Region resolution and raster map <o_map_strahler> resolution
differs. Run 'g.region rast=o_map_strahler' to set proper region
resolution"
I run g.region rast=o_map_strahler, but then I have to delete
all files and start over again running r.basin.
Yes if you change the region you have to delete the files created in the
previous run (if they have same name) or allow overwrite.
Best regards,
Dr. Margherita DI LEO
Scientific / technical project officer
European Commission - DG JRC
Institute for Environment and Sustainability (IES)
Via Fermi, 2749
I-21027 Ispra (VA) - Italy - TP 261
Tel. +39 0332 78 3600
margherita.di-leo@.europa
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.
grass-user mailing list
grass-user@.osgeo
http://lists.osgeo.org/mailman/listinfo/grass-user
could you post also the exact commands of your steps?
e.g.
g.region -a -p rast=yourdem align=yourdem
r.basin --verbose elevation=yourdem…
g.region
best regards
Helmut
View this message in context: http://osgeo-org.1560.x6.nabble.com/Problem-with-r-basin-in-grass7-tp5169155p5173590.html
Sent from the Grass - Users mailing list archive at Nabble.com.
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user