[GRASSLIST:9812] v.extract area with holes but without islands
Roger Bivand
Roger.Bivand at nhh.no
Fri Jan 13 06:06:34 EST 2006
I have a question about how to extract only a polygon and its holes from a
vector.
The background is that I have a shapefile from a colleague vectorised in
Arc from a raster showing a polygon with holes. The shapefile holes are
also clockwise (curiously), but I think that this is because the vector
shapes were not cleaned before outputting.
When read into GRASS 6 with v.in.ogr, the holes are recognised, but island
polygons are also created, type=area was used.
The same happens when I read the raster into GRASS and vectorise with
r.to.vect - creating the new vector makes one geometry of the external
boundary with holes, and then adds each hole again as an island as a
separate geometry, again type=area.
Finally, it happens again when I use v.extract on the geometry with holes:
the islands get built and added in, type=area.
Is there any way to remove the islands from the vector representation? The
output is to be used for spatial sampling, so sample points falling in the
holes should be discarded. I think v.build is assuming that holes should
be filled with islands in each case.
Roger
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no
More information about the grass-user
mailing list