[GRASS-user] elimination of holes in a vector layer

Markus Metz markus.metz.giswork at googlemail.com
Wed Jan 12 09:21:00 EST 2011


On Tue, Jan 11, 2011 at 12:20 AM, Pierre Roudier
<pierre.roudier at gmail.com> wrote:
> Dear list,
>
> I got a polygon layer, in which there are some holes.
>
> Is there a way to control the elimination of those holes, ie
> eliminates holes smaller than a given size, and keep the others (that
> are considered as significant by the user).
>
v.clean tool=rmarea thresh=X removes all areas, both holes and other
areas, <= X, X is in squared map units or square meters for latlon .

Just for clarification, in GRASS vector topology, holes are areas
without a centroid located within other areas.

If you want to remove small holes only, you can
1. run v.clean as above
2. upload area size to the attribute table in the original vector
3. extract all areas <= X from the original vector
4. patch the cleaned and the extracted vectors
5. clean the patched vector with v.clean tool=bpol,rmdupl

HTH,

Markus M


More information about the grass-user mailing list