[postgis-users] Separate polygons based on intersection

Aaron Ogle atogle at gmail.com
Thu Jul 22 14:53:29 PDT 2010


Hey all,
I have a table of polygons where some intersect with one another. This is
what I'm trying to do:

    * For a given polygon selected by id, give me all of the polygons that
intersect. Basically, select the_geom from the_table where
ST_Intersects(the_geom, (select the_geom from the_table where source_id =
'123'))
    * From these polygons, I need to create a new polygons such that
intersection becomes a new polygon. So if polygon A intersects with polygon
B, I will get 3 new polygons: A minus AB, AB, and B minus AB.

Any ideas?

Thanks!
Aaron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20100722/c29f84b6/attachment.html>


More information about the postgis-users mailing list