[GRASS-user] Problem with r.basin in grass7
Andrea Timmermann
timmermann at gmx.at
Sun Dec 14 20:09:20 PST 2014
Hi Helmut,
I downloaded the newest GRASS version and also updated my addons.
I am using the newest version of the NC test data set.
My result of g.region -p is:
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
When I run:
"r.basin map=elev_ned_30m at PERMANENT prefix=sss coordinates=636654.791181,218824.126649 threshold=40 dir="C:\\Users\\Andrea\\Basins2222" --overwrite"
I get:
"....
....
Reading raster map <sss_elev_ned_30m_strahler>...
Reading raster map <sss_elev_ned_30m_drainage_e>...
Reading raster map <r_elevation_crop>...
ERROR: Error while executing: 'DROP TABLE summary'
Traceback (most recent call last):
File "C:\Program Files (x86)\GRASS GIS
7.1.svn/scripts/db.in.ogr.py", line 123, in <module>
main()
File "C:\Program Files (x86)\GRASS GIS
7.1.svn/scripts/db.in.ogr.py", line 77, in main
grass.write_command('db.execute', input = '-', stdin =
"DROP TABLE %s" % output)
File "C:\Program Files (x86)\GRASS GIS
7.1.svn\etc\python\grass\script\core.py", line 483, in
write_command
return handle_errors(returncode, returncode, args,
kwargs)
File "C:\Program Files (x86)\GRASS GIS
7.1.svn\etc\python\grass\script\core.py", line 308, in
handle_errors
returncode=returncode)
grass.exceptions.CalledModuleError: Module run None
['db.execute', 'input=-', 'stdin=DROP TABLE summary'] ended
with error
Process ended with non-zero return code 1. See errors in the
(error) output.
------------------------------
An ERROR occurred running r.basin
Please check for error messages above or try with another pairs of outlet coordinates
------------------------------
Output of r.stream.stats:
Summary:
Max order | Tot.N.str. | Tot.str.len. | Tot.area. | Dr.dens. | Str.freq.
(num) | (num) | (km) | (km2) | (km/km2) | (num/km2)
4 | 47 | 26.4605 | 7.9101 | 3.3452 | 5.9418
Stream ratios based on regresion coefficient:
Bif.rt. | Len.rt. | Area.rt. | Slo.rt. | Grd.rt.
3.2413 | 1.2265 | 3.5856 | 1.6621 | 1.7310
Avaraged stream ratios with standard deviations:
Bif.rt. | Len.rt. | Area.rt. | Slo.rt. | Grd.rt.
4.6667 | 1.7001 | 4.1945 | 1.9270 | 2.0256
4.6188 | 1.2717 | 5.4587 | 0.8586 | 0.9290
Order | Avg.len | Avg.ar | Avg.sl | Avg.grad. | Avg.el.dif
num | (km) | (km2) | (m/m) | (m/m) | (m)
1 | 0.4573 | 0.1462 | 0.0328 | 0.0254 | 9.7057
2 | 1.3953 | 1.5154 | 0.0128 | 0.0106 | 13.4085
3 | 0.7346 | 3.3597 | 0.0134 | 0.0109 | 9.4618
4 | 1.1185 | 7.9101 | 0.0059 | 0.0040 | 4.5139
Order | Std.len | Std.ar | Std.sl | Std.grad. | Std.el.dif
num | (km) | (km2) | (m/m) | (m/m) | (m)
1 | 0.3874 | 0.1177 | 0.0207 | 0.0138 | 6.2704
2 | 2.1832 | 2.3181 | 0.0099 | 0.0091 | 16.5566
3 | 0.8267 | 3.0598 | 0.0009 | 0.0034 | 11.5751
4 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000
Order | N.streams | Tot.len (km) | Tot.area (km2)
1 | 40 | 18.2917 | 5.8473
2 | 4 | 5.5811 | 6.0615
3 | 2 | 1.4691 | 6.7194
4 | 1 | 1.1185 | 7.9101
Order | Bif.rt. | Len.rt. | Area.rt. | Slo.rt. | Grd.rt. | d.dens. | str.freq.
1 | 10.0000 | 3.0512 | 0.0000 | 2.5727 | 2.3961 | 3.1282 | 6.8408
2 | 2.0000 | 0.5265 | 10.3663 | 0.9526 | 0.9685 | 0.9207 | 0.6599
3 | 2.0000 | 1.5227 | 2.2171 | 2.2558 | 2.7122 | 0.2186 | 0.2976
4 | 0.0000 | 0.0000 | 2.3544 | 0.0000 | 0.0000 | 0.1414 | 0.1264
(Sun Dec 14 17:12:49 2014) Command finished (40 sec)
Thanks,
Andrea.
Gesendet: Montag, 15. Dezember 2014 um 00:17 Uhr
Von: "Helmut Kudrnovsky" <hellik at web.de>
An: grass-user at lists.osgeo.org
Betreff: Re: [GRASS-user] Problem with r.basin in grass7
hi Andrea,
>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 at Elevation prefix=o coordinates=-71.10394196,43.9865230801
threshold=19005 >dir=C:\\Users\\Andrea\\Basins"
>ERROR: Region resolution and raster map <o_map_strahler> resolution
differs. Run 'g.region >rast=o_map_strahler' to set proper region
resolution"
please test r.basin with the NC data sample data for GRASS: GRASS 7 full
data tar.gz | zip (nc_spm, 145MB)
(http://grass.osgeo.org/download/sample-data/)
and have a look at http://grasswiki.osgeo.org/wiki/R.basin#Usage[http://grasswiki.osgeo.org/wiki/R.basin#Usage] for a
r.basin usage with this NC sample data (the wiki needs some update, feel
free to contribute...)
tested here with NC data sample data (with coordinates taken from the wiki),
it works without any error.
please try following commands (just copy/paste it and adapt only the path to
the output directory) within the NC sample data set:
g.region -p -a raster=elevation at PERMANENT align=elevation at PERMANENT
r.basin map=elevation at PERMANENT prefix=a
coordinates=636654.791181,218824.126649 dir=C:\tmp\rbasin threshold=20
and then report back.
[p.s. could you send text emails to the ML instead of hmtl mails? it's more
readable in the ML archive]
-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Problem-with-r-basin-in-grass7-tp5169155p5177835.html[http://osgeo-org.1560.x6.nabble.com/Problem-with-r-basin-in-grass7-tp5169155p5177835.html]
Sent from the Grass - Users mailing list archive at Nabble.com.
_______________________________________________
grass-user mailing list
grass-user at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user[http://lists.osgeo.org/mailman/listinfo/grass-user]
More information about the grass-user
mailing list