Thanks for the hint about r.clump2. 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.
best, Johannes On Mon, Jan 13, 2014 at 3:30 PM, Markus Neteler <[email protected]> wrote: > On Mon, Jan 13, 2014 at 12:39 PM, Johannes Radinger > <[email protected]> wrote: > > Dear all, > > > > I just tried r.clump on a rastarized river with alternating patches of > good > > and bad habitat (values 1 and 2). However, due to its linear structure, > many > > cells of the same habitat patch are often only diagonally connected. So > this > > is a case where r.clump does not work (as stated in its manual). > > > > So, as a suggestion, it'd be nice if also diagonal cells could be > considered > > by r.clump (e.g. by setting a flag). > > Note that there is a more modern version here: > > http://grasswiki.osgeo.org/wiki/AddOns/GRASS_6#r.clump2 > > http://grasswiki.osgeo.org/wiki/AddOns/GRASS7/raster#r.clump2 > > Markus >
_______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
