[GRASS-user] r.basin Issues Needing Resolution

   I have several questions about r.basin that I hope can be quickly
answered.

   1.) Is there an example that can be added to the manual page? I would like
to better understand the prefix and threshold parameters.

   2.) There are several module dependencies, but r.stream.basin, r.wf.py,
and r.ipso.py cannot be downloaded and installed using g.extension; they're
not found in the addon repository.

   3.) The r.stream.extract module is not working for my projects' data using
version 6.5svn on linux. I have detailed vector maps of the stream networks
in each of the subbasins I need to describe and model. If I run v.to.rast on
these maps can I use the outlet cell as the values for the easting and
northing parameters to the command?

Thanks,

Rich

Hi Rich,

On Sat, Apr 7, 2012 at 12:23 AM, Rich Shepard <rshepard@appl-ecosys.com> wrote:

I have several questions about r.basin that I hope can be quickly
answered.

1.) Is there an example that can be added to the manual page? I would like
to better understand the prefix and threshold parameters.

r.basin produces several maps for every run, which are flow direction, accumulation, Horton ordered streams etc… Prefix parameter is simply a string given by the user in order to distinguish all the maps produced by a single run of the program, i.e. every set of coords for outlet. For example,

r.basin.py map=elevation@PERMANENT prefix=out easting=636654.791181 northing=218824.126649 threshold=20

will produce output maps named:

raster

out_elevation_accumulation
out_elevation_aspect
out_elevation_dist2out
out_elevation_distance
out_elevation_drainage
out_elevation_hack
out_elevation_hillslope_distance
out_elevation_horton
out_elevation_shreve
out_elevation_slope
out_elevation_strahler

vector

out_elevation_basin
out_elevation_mainchannel
out_elevation_network
out_elevation_outlet

Threshold parameter is the same of r.watershed. ‘Autothreshold ’ flag’ simply uses a threshold area of 1 km^2 and is intended as a tentative.

2.) There are several module dependencies, but r.stream.basin, r.wf.py,
and r.ipso.py cannot be downloaded and installed using g.extension; they’re
not found in the addon repository.

For what concerns r.stream.basin, it is a typo in the documentation, correct is r.stream.basins, thanks for pointing me out, I just updated it in the description file.
r.wf.py and r.ipso.py are in the addOns repository:

http://grass.osgeo.org/wiki/GRASS_AddOns#r.wf
http://grass.osgeo.org/wiki/GRASS_AddOns#r.ipso

I can’t see any obvious error in the Makefile… maybe an experienced dev could please check why they are not working with g.extension.

3.) The r.stream.extract module is not working for my projects’ data using
version 6.5svn on linux. I have detailed vector maps of the stream networks
in each of the subbasins I need to describe and model. If I run v.to.rast on
these maps can I use the outlet cell as the values for the easting and
northing parameters to the command?

Please note that r.basin is intended to work with only one outlet at time. This means you should script it in a for cycle if you run it for several outlets. You can’t give to r.basin the coordinates directly from a vector map.
I have indicated to run r.stream.extract before r.basin because most of the times the calculated stream network doesn’t match with the natural one, so that your coordinates should be adjusted to match the calculated stream network in order to get a result from r.basin. By the way, in a first run you can give a try with your coordinates.

HTH,
madi

Thanks,

Rich


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Ing. Margherita Di Leo, Ph.D.

On Sat, Apr 7, 2012 at 10:16 AM, Margherita Di Leo <diregola@gmail.com> wrote:

Hi Rich,

2.) There are several module dependencies, but r.stream.basin, r.wf.py,
and r.ipso.py cannot be downloaded and installed using g.extension; they’re
not found in the addon repository.

How do you run g.extension?
g.extension extension=r.ipso -s
g.extension extension=r.wf -s
works for me in G6.5 on debian.


Ing. Margherita Di Leo, Ph.D.

On Sat, 7 Apr 2012, Margherita Di Leo wrote:

r.basin produces several maps for every run, which are flow direction,
accumulation, Horton ordered streams etc.. Prefix parameter is simply a
string given by the user in order to distinguish all the maps produced by a
single run of the program, i.e. every set of coords for outlet. For
example,

madi,

   I thought this is the case, but wanted to know rather than assume.

Threshold parameter is the same of r.watershed. 'Autothreshold ' flag'
simply uses a threshold area of 1 km^2 and is intended as a tentative.

   Again, rather than assuming I wanted to be sure I understood.

For what concerns r.stream.basin, it is a typo in the documentation,
correct is r.stream.basins, thanks for pointing me out, I just updated it
in the description file.
r.wf.py and r.ipso.py are in the addOns repository:

   Ah, I see why they did not download for me: I added the .py extention to
the g.estension command. Now I know to leave it off.

Please note that r.basin is intended to work with only one outlet at time.
This means you should script it in a for cycle if you run it for several
outlets.

   I understand this.

You can't give to r.basin the coordinates directly from a vector map.

   But, can I use the coordinates of a rasterized stream network?

I have indicated to run r.stream.extract before r.basin because most of the
times the calculated stream network doesn't match with the natural one, so
that your coordinates should be adjusted to match the calculated stream
network in order to get a result from r.basin. By the way, in a first run
you can give a try with your coordinates.

   The outputs of r.stream.extract on two different project sub-watersheds
are, as far as I can see on the display, only about 5-10% of the vector
stream network, and all at the lower ends of the basins in which they
appear. I can send screen shots if you'd like to see the differences.

   After downloading and building the 'missing' three modules I'll try
v.to.rast on the natural stream network (at 1:24,000 scale, just like the
elevation data) and see what r.basin tells me.

Many thanks,

Rich

Rich,

I just created a wiki page [1] on the use of r.basin, with an example from NC dataset. Hope this would make the usage clear. If you have any further question don’t hesitate to ask.

Best,
madi

[1]http://grass.osgeo.org/wiki/R.basin

Ing. Margherita Di Leo, Ph.D.

Hi Margherita,

nice wiki! Should I add the windows related things there?

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/r-basin-Issues-Needing-Resolution-tp4693897p4695411.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Helmut,

On Sat, Apr 7, 2012 at 5:18 PM, Helmut Kudrnovsky <hellik@web.de> wrote:

Hi Margherita,

nice wiki! Should I add the windows related things there?

Believe it or not, if was just writing you an email for asking you if you kindly could do that :smiley:

Thanks!

madi


best regards
Helmut

View this message in context: http://osgeo-org.1560.n6.nabble.com/r-basin-Issues-Needing-Resolution-tp4693897p4695411.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


Ing. Margherita Di Leo, Ph.D.

Rich,

On Sat, Apr 7, 2012 at 3:51 PM, Rich Shepard <rshepard@appl-ecosys.com> wrote:

On Sat, 7 Apr 2012, Margherita Di Leo wrote:

r.basin produces several maps for every run, which are flow direction,
accumulation, Horton ordered streams etc… Prefix parameter is simply a
string given by the user in order to distinguish all the maps produced by a
single run of the program, i.e. every set of coords for outlet. For
example,

madi,

I thought this is the case, but wanted to know rather than assume.

Threshold parameter is the same of r.watershed. ‘Autothreshold ’ flag’
simply uses a threshold area of 1 km^2 and is intended as a tentative.

Again, rather than assuming I wanted to be sure I understood.

For what concerns r.stream.basin, it is a typo in the documentation,
correct is r.stream.basins, thanks for pointing me out, I just updated it
in the description file.
r.wf.py and r.ipso.py are in the addOns repository:

Ah, I see why they did not download for me: I added the .py extention to
the g.estension command. Now I know to leave it off.

Please note that r.basin is intended to work with only one outlet at time.
This means you should script it in a for cycle if you run it for several
outlets.

I understand this.

You can’t give to r.basin the coordinates directly from a vector map.

But, can I use the coordinates of a rasterized stream network?

No. Do you think this would be an useful add? If so, I could work on it when I have some spare time… Let me know.

I have indicated to run r.stream.extract before r.basin because most of the
times the calculated stream network doesn’t match with the natural one, so
that your coordinates should be adjusted to match the calculated stream
network in order to get a result from r.basin. By the way, in a first run
you can give a try with your coordinates.

The outputs of r.stream.extract on two different project sub-watersheds
are, as far as I can see on the display, only about 5-10% of the vector
stream network, and all at the lower ends of the basins in which they
appear. I can send screen shots if you’d like to see the differences.

AFAICT this could be due to an odd value for the threshold, or a g.region or mask related problem. Please try setting g.region to match the elevation map, removing the mask and setting a lower threshold value.

After downloading and building the ‘missing’ three modules I’ll try
v.to.rast on the natural stream network (at 1:24,000 scale, just like the
elevation data) and see what r.basin tells me.

Let me know about your results.

madi

Many thanks,

Rich


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Ing. Margherita Di Leo, Ph.D.