Hi Micha,<br><br><div class="gmail_quote">On Fri, Jun 8, 2012 at 4:48 PM, Micha Silver <span dir="ltr"><<a href="mailto:micha@arava.co.il" target="_blank">micha@arava.co.il</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"><div><div class="h5"><br></div></div><p>Hi Madi:</p>
<p>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.</p>
<p>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.:</p>
<p>N=`r.univar -g | grep "^n=" | cut -d "=" -f 2`</p>
<p>THRESH=$(( $N / 100))</p>
<p>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.</p></div></blockquote><div>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. <br>
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):<br>
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)<br>
2) r.threshold has a different reasoning. It starts from a relationship between the slope and the upslope area.<br>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).<br>
Anyway, if you think that the wiki page looks confusing, I really appreciate your help in editing :-)<br><br>Thanks,<br><br>madi<br></div></div><br clear="all"><br>-- <br>Dr. Margherita Di Leo<br>