<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi Alain,<br>
<br>
your approach sounds good to me. I used a similar approach some
time ago. As for the creation of the bigger polygon during the 2nd
step, with my older PostGIS version, I sometimes came across
topology exceptions using the st_union function for this. Maybe
this is not a problem anymore, but if you meet problems with
topology exceptions, a possible solution could be to use
st_collect instead of st_union.<br>
Also, I want to address that your data might have polygons that
don't intersect. You might need to keep that in mind, so you don't
loose any polygons during the process.<br>
Just to be thorough, in my case, the operation became a little bit
complex because the data contained intersecting polygons within
the same table, causing multiple intersection and difference
results for the same space. Therefore, you might want to check
your data on selfintersection issues, if you're not sure there are
none.<br>
<br>
Regards,<br>
<br>
Birgit<br>
<pre class="moz-signature" cols="72">
</pre>
Am 05.02.2016 um 15:57 schrieb Alain Benard:<br>
</div>
<blockquote cite="mid:56B4B83D.6050805@nancy.inra.fr" type="cite">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
Hi,<br>
I would like to make an operation between two tables with geometry
(polygon) - user's GIS call this operation a UNION.<br>
<img src="cid:part1.09060400.03020905@ti.bund.de" alt=""><br>
I think this :<br>
<ul>
<li>Step1 : make st_intersection (where st_intersects) and
obtains the 4 little square with attributes from the two
table. I call the result layerintersect<br>
</li>
<li>Step 2 : make a unique polygon with the layerintersect (Step
1)</li>
<li>Step 3 : use this polygon with the two table and
st_difference</li>
<li>assembly the 3 result (layerintersect + the 2 difference)
with a classic union (SQL)</li>
</ul>
<p>The second step make a big polygon and for other data it can be
a problem ??<br>
Is there another way to make this job?<br>
Thanks in advance.<br>
</p>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/postgis-users">http://lists.osgeo.org/mailman/listinfo/postgis-users</a></pre>
</blockquote>
<br>
</body>
</html>