[GRASS-user] Eliminat small patches

Greetings

I have a bitmask raster (ones and nulls) and I want to eliminate patches, with values of 1, that have an area smaller than X ha (or X pixels). How can I do this in GRASS (without having to convert to vector)
THanks
Luisa

Hi Luisa,

I wrote a script that does exactly what you want to do. It uses r.clump, r.stats, and r.reclass in addition to some bash coding to make the input file for r.reclass from the r.stats output minus the clumps below your threshold size. Let me know if you want me to send you the code.

I’d be interested if anyone has a better solution.

Best,
Nick

On Tue, Oct 4, 2011 at 12:57 AM, Luisa Peña <luisapena1979@gmail.com> wrote:

Greetings

I have a bitmask raster (ones and nulls) and I want to eliminate patches, with values of 1, that have an area smaller than X ha (or X pixels). How can I do this in GRASS (without having to convert to vector)
THanks
Luisa


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

On Mon, Oct 3, 2011 at 6:57 PM, Luisa Peña <luisapena1979@gmail.com> wrote:

Greetings
I have a bitmask raster (ones and nulls) and I want to eliminate patches,
with values of 1, that have an area smaller than X ha (or X pixels). How can
I do this in GRASS (without having to convert to vector)

Try
http://grass.osgeo.org/gdp/html_grass64/r.reclass.area.html

Markus