<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div>Hi Markus,<br></div>Hi others,<br><br></div>I am coming back to the topic of running r.watershed on a rasterized river network.<br><br></div>As recommended I buffered now my river raster. This river raster is a thinned distance raster<br>
with increasing values from the outlet to the branches (calculated via r.cost) and as<br></div>I said it is buffered now with a very large value (2 x max of the thinned distance raster).<br><br></div>So actually this should work as an input map to r.watershed. And it does more or<br>
less perfectly: There's just one issue concerning the outlet-stream segment.<br></div>Somehow this (in my case small segment, in the south-west corner) is missing in the stream-map output of r.watershed.<br>I am working on GRASS6.5. Attached there is a zipped GTIFF with the "pseudo-elevation" map<br>
</div>(this thinned and buffered distance raster) I am using as input to r.watershed.<br><br>The command I am using is:<br>r.watershed -f --overwrite elevation=buffer_river_raster stream=test_segments threshold=3<br></div>
The threshold has been set to 3 as this is the number of raster cells that refer to the buffer (3 x resolution)<br><br></div>Can anyone reproduce that the outlet small river segment is missing in the produced "test_segments"??<br>
</div>What is causing that?<br><br></div>/Johannes<br><div><div><div><div><br><div><div><div><div><div><div><div><div><br><br></div></div></div></div></div></div></div></div></div></div></div></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Apr 10, 2013 at 12:37 PM, GRASS GIS <span dir="ltr"><<a href="mailto:trac@osgeo.org" target="_blank">trac@osgeo.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">#1924: r.watershed - empty stream segment map<br>
-----------------------+----------------------------------------------------<br>
Reporter: jradinger | Owner: grass-dev@…<br>
Type: defect | Status: new<br>
Priority: normal | Milestone:<br>
Component: Raster | Version: svn-trunk<br>
Keywords: | Platform: Linux<br>
Cpu: x86-32 |<br>
-----------------------+----------------------------------------------------<br>
<br>
</div>Comment(by mmetz):<br>
<br>
Replying to [comment:2 jradinger]:<br>
<div class="im"> ><br>
> Two more important things:<br>
> 1) The elevation input map is accutally already a thinned river raster.<br>
The raster<br>
> values represent a pseude elevation which was generated with r.cost<br>
from the source.<br>
> Thus the value (elevation) is increasing upstream. r.watershed is just<br>
used for getting<br>
> the flowdirection and segmenting the river raster. (if needed I can<br>
provide the elevation-rcost<br>
> raster)<br>
<br>
</div> r.watershed expects a surface as input. Using a thinned river raster as<br>
input should give weird results: all non-NULL cells face at least one NULL<br>
cell treated as unknown elevation, thus flow direction can not be<br>
unambiguously determined. You can try to place a buffer around the rivers<br>
and fill the buffer with pseudo-elevation values larger than the largest<br>
cost value. For example, create a buffer using 300 meter (3 cells) as<br>
distance, set a pseudo elevation value for the buffer zone, patch the<br>
thinned river raster with the pseudo elevation, run r.watershed with<br>
threshold=3. Works for me.<br>
<div class="im"><br>
> And maybe a warning/error message should be printed when threshold = 0,<br>
instead of the (for me confusing error)<br>
<br>
</div> Makes sense.<br>
<br>
Markus M<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Ticket URL: <<a href="http://trac.osgeo.org/grass/ticket/1924#comment:3" target="_blank">http://trac.osgeo.org/grass/ticket/1924#comment:3</a>><br>
GRASS GIS <<a href="http://grass.osgeo.org" target="_blank">http://grass.osgeo.org</a>><br>
<br>
</font></span></blockquote></div><br></div>