[postgis-users] Make Union between 2 layers

Alain Benard alain.benard at nancy.inra.fr
Fri Feb 5 06:57:01 PST 2016


Hi,
I would like to make an operation between two tables with geometry 
(polygon) - user's GIS call this operation a UNION.

I think this :

  * Step1 : make st_intersection (where st_intersects) and obtains the 4
    little square with attributes from the two table. I call the result
    layerintersect
  * Step 2 : make a unique polygon with the layerintersect (Step 1)
  * Step 3 : use this polygon  with the two table and st_difference
  * assembly the 3 result (layerintersect + the 2 difference) with a
    classic union (SQL)

The second step make a big polygon and for other data it can be a problem ??
Is there another way to make this job?
Thanks in advance.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20160205/77b71861/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aaicahee.png
Type: image/png
Size: 11720 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20160205/77b71861/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alain_benard.vcf
Type: text/x-vcard
Size: 292 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20160205/77b71861/attachment.vcf>


More information about the postgis-users mailing list