[postgis-users] Transform overlapping polygons to non-overlapping?

Brent Fraser bfraser at geoanalytic.com
Tue Jul 8 10:58:21 PDT 2008


PostGIS'ers,

  I've got a table of overlapping polygons.  How can I make it a table of non-overlapping polygons?

For example, if table "polys2" contains two polygons A1 and B1 which overlap.  I'd like to create table "polys3" with polygons A2, B2, C2, where C2 is the overlap region of A1 and B1, and A2 = A1 - C2, and B2 = B1 - C2.

Looking at the overlay operations in the JTS doc it looks like doing an Intersection (to get only the overlapping area) then adding the Symmetric Difference (to get the non-overlapping areas) might work.

Am I on the right track or is there an easier way (since all the polygons are in one table)?

Thanks!
Brent Fraser



More information about the postgis-users mailing list