[GRASS-user] r.basin: Completes on Some Basins, Fails on Others

Margherita Di Leo diregola at gmail.com
Fri Jun 8 08:08:47 PDT 2012


Hi Micha,

On Fri, Jun 8, 2012 at 4:48 PM, Micha Silver <micha at arava.co.il> wrote:

>
> Hi Madi:
>
> Regarding the threshold value in your auxilliary parsing.py script, do you
> think it might be better to calcuclate a suggested value from the size of
> the original DEM, rather than just put in some random 10,000 or so.
>
> Obviously the user has to understand, and change the threshold to suit his
> needs, but if the script is going to contain some value, maybe it should be
> something "reasonable". I thought, for example to choose a suggested thresh
> size of num_cells/100. i.e.:
>
> N=`r.univar -g | grep "^n=" | cut -d "=" -f 2`
>
> THRESH=$(( $N / 100))
>
> Does that sound reasonable? Since the python auxilliary script runs
> independently of GRASS, I'm not sure how how this would all merge together.
> But it's worth thinking about.
>
I've added comments in the wiki page in the python script section, about
the threshold and the name of the DEM, both parameters should be changed
manually.
For what concerns a "reasonable" value of the threshold, well, it actually
depends on too many factors, by the way, I've provided already some ways to
start from a "reasonable" value (all exposed in the wiki page):
1) r.basin has a flag -a which uses a default value of threshold,
corresponding to 1 km^2 (this value comes from literature and it's suitable
for _italian_ territory, this means that it could be completely wrong for
other territories)
2) r.threshold has a different reasoning. It starts from a relationship
between the slope and the upslope area.
3) r.stream.preview: it simply allow user to have a preview of the
threshold in order to quickly set a "reasonable" value. (this is a piece of
wx.stream, which I'm not satisfied of and am re-writing from scratch).
Anyway, if you think that the wiki page looks confusing, I really
appreciate your help in editing :-)

Thanks,

madi


-- 
Dr. Margherita Di Leo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20120608/b185bc56/attachment.html>


More information about the grass-user mailing list