<div dir="ltr">Thanks for the hint about r.clump2. <div><br></div><div>I just tried to apply it to my data. While this tool works with diagonally connected cells (in contrast to r.clump) it does not preserve the distinct category values of adjacent cells. Furthermore, as also mentioned in the manual: Linear elements are always clumped together, unless the e-flag is set (which basically ignores diagonally connected cells and thus is comparable to r.clump result). So as I'd like to have unique category values for the single (adjacent) patches this tool does not necessarily help me. However, good to know that there is such a tool available. For the moment, I'll try an approach to buffer (r.grow) my raster lines before applying r.clump which could work.<div>
<br></div><div>best,</div><div>Johannes</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jan 13, 2014 at 3:30 PM, Markus Neteler <span dir="ltr"><<a href="mailto:neteler@osgeo.org" target="_blank">neteler@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">On Mon, Jan 13, 2014 at 12:39 PM, Johannes Radinger<br>
<<a href="mailto:johannesradinger@gmail.com">johannesradinger@gmail.com</a>> wrote:<br>
> Dear all,<br>
><br>
> I just tried r.clump on a rastarized river with alternating patches of good<br>
> and bad habitat (values 1 and 2). However, due to its linear structure, many<br>
> cells of the same habitat patch are often only diagonally connected. So this<br>
> is a case where r.clump does not work (as stated in its manual).<br>
><br>
> So, as a suggestion, it'd be nice if also diagonal cells could be considered<br>
> by r.clump (e.g. by setting a flag).<br>
<br>
</div>Note that there is a more modern version here:<br>
<br>
<a href="http://grasswiki.osgeo.org/wiki/AddOns/GRASS_6#r.clump2" target="_blank">http://grasswiki.osgeo.org/wiki/AddOns/GRASS_6#r.clump2</a><br>
<br>
<a href="http://grasswiki.osgeo.org/wiki/AddOns/GRASS7/raster#r.clump2" target="_blank">http://grasswiki.osgeo.org/wiki/AddOns/GRASS7/raster#r.clump2</a><br>
<span class="HOEnZb"><font color="#888888"><br>
Markus<br>
</font></span></blockquote></div><br></div>