Question on filter

Angus Carr apcarr at FLASH.LakeheadU.CA
Fri Apr 17 15:50:50 EDT 1998


For what it's worth, I do this with a series of commands:
r.clump to generate clumps, then
r.stats and r.reclass to assign area to the clumps
r.mapcalc to drop out any clumps less than the target size
r.mapcalc to apply the holes from the clumped map to the original map
r.mapcalc to run a filter across it to grow in the holes that only applies
    to the 0's

If you need more information, drop me a note.

Angus Carr.

On Fri, 17 Apr 1998, HONGBEI YUAN wrote:

> 
> Hello,
> 
> I want to filter out small patches (such as <2 cells) while keeping the
> shape of other large or linear patches. Could you tell me which commands
> in GRASS can do that? Though r.neighbors(mode) can filter out the small
> patches, but it also change the shape of other patches.
> 
> H. Yuan
> 
> 



More information about the grass-user mailing list