[postgis-users] Donut-Polygon

Stephen Woodbridge woodbri at swoodbridge.com
Thu Feb 5 10:24:44 PST 2009


Albert Krueger wrote:
> 
> Hi at all,
> 
> I have a Donut-Polygon with a number of Innerrings. Now I would like to 
> delete some Innerrings. For Example I have a polygon with five 
> Innerrings. ButI want to delete the second and the fourth Innerring. Has 
> anyone an idea how I can get a polygon with only three Innerrings 
> (1,3,5) then?

Albert,

In general the postGIS model does not support editing of geometry, so 
the you have to think of edits in terms of deconstruction and 
construction of new objects. There are various tools like dump() or 
st_dump(), ST_DumpRings(), ST_ExteriorRing(), ST_NumInteriorRings(), 
ST_NumInteriorRing(), ST_InteriorRingN(), ST_MakePolygon(linestring, 
[linestring[]]), ST_BuildArea(), etc.

-Steve



More information about the postgis-users mailing list