[postgis-users] Simplify borders

John Abraham jabraham at ucalgary.ca
Thu Dec 9 15:04:47 PST 2010


I'm sure this is a common problem, but I haven't been able to figure out how to do it in PostGIS.

I want to simplify a representation of borders.  Specifically, we have divided an area into "zones", and we currently have a polygon* for each zone.  The zones cover 100% of the "region", i.e. they divide the "region."  The whole region is divided into zones.

The polygons are stored independently, as a polygon geometry.  My first question is how to ensure the border of one polygon matches the border of the adjacent polygon?  That is, there should be no overlap or underlap (slivers).  I think there's a system with buffering (to remove underlap a.k.a. slivers) and then ST_Intersection (to remove overlap).  But I'm not sure of the right sequence or if there's a better system.  Isn't there a geometry class (or something) that stores the border once instead of for each polygon separately? 

The second question is how to simply the borders.   I'd like a simplification algorithm that retains the points where 3 (or more) polygons meet but simplifies the borders between two adjacent polygons.  Failing that, I could use ST_Simplify on each polygon independently, and then afterwards remove the (now much larger) slivers and overlaps using whatever approach is best for removing slivers and overlaps.

--
John Abraham

* to complicate the matter a little bit, sometimes the underlying land isn't continuous because there is an ocean with islands.  In this case, some "zones" contain some land on the mainland, and also one or more islands.  So some "zones" are actually multipolygons, and the zones cover 100% of the land in the region, but not 100% of the region since some of the region is water, not land.  But I can process the islands separately, manually, using ST_Simplify, and then combine them with their mainland counterparts afterwards, again manually.  So don't worry about this complication... 


More information about the postgis-users mailing list