[GRASS-user] Import of multi-part polygons using v.in.ogr?

Benjamin Ducke benducke at fastmail.fm
Sun Dec 2 06:33:22 PST 2012


Hi List --

Looking at function centroid() in geom.c
of v.in.ogr, it seems to me that the code
for import of polygons always assumes that
the first ring is the exterior boundary and
the following ones are all interior boundaries
(see comment on lines 70 and 71).

Is this a limitation of GRASS' vector model
or would it be possible to import multi-part
polygons with more than one outer boundary by
amending the code in v.in.ogr?

I understand that it is possible to import
multi-part geometries into GRASS and assign
each part the same "cat" number. However,
when exporting with v.out.ogr, they will be
exported as separate parts, each with its
own attribute table row. Is there any
way to preserve multi-part features using
v.in.ogr and v.out.ogr?

If this is currently not possible: Would it
be a viable solution to add a "-j" (join)
flag to v.out.ogr so that it will merge
geometries with the same "cat" into multi-
part features on export?

Cheers,

Ben

-- 
Benjamin Ducke
{*} Geospatial Consultant
{*} GIS Developer

   benducke at fastmail.fm


More information about the grass-user mailing list