<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style></head>
<body>
<style>
<!--
.EmailQuote
        {margin-left:1pt;
        padding-left:4pt;
        border-left:#800000 2px solid}
-->
</style><body>Cheers Paul, I have watched the mp4 of your presentation which has been helpful, but have noticed some extra detail in the power point, thankyou.<br><br>Regards <br><br>Craig <br><br><div id="htc_header" style="">----- Reply message -----<br>From: "Paul Ramsey" <pramsey@opengeo.org><br>To: "PostGIS Users Discussion" <postgis-users@postgis.refractions.net><br>Subject: [postgis-users] Using PostGIS to replicate ESRI Union Output<br>Date: Thu, Dec 8, 2011 11:42 pm<br><br></div><br><br></body>
<font size="2"><div class="PlainText"><a href="http://s3.opengeo.org/postgis-power.pdf">http://s3.opengeo.org/postgis-power.pdf</a><br>
<br>
On Thu, Dec 8, 2011 at 6:13 AM, Carpenter, Craig<br>
<Craig.Carpenter@dec.wa.gov.au> wrote:<br>
> Phil<br>
><br>
> Ive just had a look at your suggestion.<br>
><br>
> The output table is structured correctly, in that the geometry is unioned on a single row with the attribution from the 2 input datasets.<br>
><br>
> However the geometry isnt split correctly where overlaps occur, i.e. a new geometry record isnt created for the overlapping segments. In the case of the diagram attached the input has 3 records from 2x datasets and the final output from your suggestion  only has 3 records but now in 1x dataset. The desired outcome would be to have 5 records (2x additional records created for the overlapping segments) in 1x dataset.<br>
><br>
> So in summary you have helped solve a piece of the puzzle and it has brought me a lil closer to my answer of trying to replicate the ESRI Union Analysis.<br>
><br>
> Cheers Phil<br>
><br>
> Regards<br>
> Craig<br>
><br>
><br>
> ________________________________________<br>
> From: postgis-users-bounces@postgis.refractions.net [postgis-users-bounces@postgis.refractions.net] On Behalf Of Phil James [borntopedal@yahoo.co.uk]<br>
> Sent: Thursday, 8 December 2011 2:34 PM<br>
> To: PostGIS Users Discussion<br>
> Subject: Re: [postgis-users] Using PostGIS to replicate ESRI Union Output<br>
><br>
> How About<br>
><br>
> CREATE TABLE newtable AS(<br>
> SELECT a.col1, a.col2, b.col1, b.col2, ST_UNION(b.the_geom, b.the_geom) AS the_geom<br>
> FROM<br>
> table1 a, table2 b<br>
> WHERE<br>
><br>
> ST_INTERSECTS(a.the_geom, b.the_geom))<br>
><br>
> changing cols to the columns you want.<br>
><br>
> Phil<br>
><br>
> ________________________________<br>
> From: "Carpenter, Craig" <Craig.Carpenter@dec.wa.gov.au><br>
> To: "postgis-users@postgis.refractions.net" <postgis-users@postgis.refractions.net><br>
> Sent: Thursday, 8 December 2011, 5:51<br>
> Subject: [postgis-users] Using PostGIS to replicate ESRI Union Output<br>
><br>
> Hello All<br>
><br>
> I'm a new user to PostGIS and am trying to get my head around it. I come from an ESRI background and am currently trying to replicate the ESRI Union Analysis function, unfortunately I'm not having much luck.<br>
><br>
> I've read alot of proposed solutions but nothing comes close to providing the output that mimics the ESRI Union output.<br>
><br>
> Essentially what I'm trying to do is overlay 2x or more vector datasets over the top of each other and create new geometry where they overlap and cut each other, while combining the attributes of all input spatial datasets. The attached picture demonstrates what I'm trying to do. Its important that were overlap occurs a new polygon is created which combines the attribution of the overlapping layers in a single record / row.<br>
><br>
> "Union All" doesnt work very well as I have many differing columns.<br>
><br>
> I have managed to get the geometry overlapped and new polygons created where overlaps occur, however I havent managed to get the inner rings sorted. However the attributes from varying input datasets are split over seperate rows.<br>
><br>
> The process that I've currently worked on is summarised below:<br>
> 1) Combine input datasets into a single table using "Union All" and null spacers<br>
> 2) Dump multi polygon to single polygon<br>
> 3) Convert to exterior ring, union, and polygonize<br>
> 4) Do pointonsurface analysis to create point layer centroids of new polygonized polygons<br>
> 5) Create join table where pointonsurface point layer intersects with original data to extract attribution<br>
> 6) Join attributes from the join table to the pointonsurface point layer<br>
> 7) Create new table combining the polygonized geometry with the attribution of the point layer where intersects<br>
><br>
><br>
> Any help or advice would be appreciated, I've almost pulled all my hair out....<br>
> Regards<br>
> Craig<br>
><br>
><br>
> This email, together with any attachments, is intended for the<br>
> addressee only. It may contain confidential or privileged information.<br>
> If you are not the intended recipient of this email, please notify<br>
> the sender, delete the email and attachments from your system and<br>
> destroy any copies you may have taken of the email and its attachments.<br>
> Duplication or further distribution by hardcopy, by electronic means<br>
> or verbally is not permitted without permission.<br>
><br>
> _______________________________________________<br>
> postgis-users mailing list<br>
> postgis-users@postgis.refractions.net<mailto:postgis-users@postgis.refractions.net><br>
> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
><br>
><br>
><br>
> This email, together with any attachments, is intended for the<br>
> addressee only. It may contain confidential or privileged information.<br>
> If you are not the intended recipient of this email, please notify<br>
> the sender, delete the email and attachments from your system and<br>
> destroy any copies you may have taken of the email and its attachments.<br>
> Duplication or further distribution by hardcopy, by electronic means<br>
> or verbally is not permitted without permission.<br>
><br>
> _______________________________________________<br>
> postgis-users mailing list<br>
> postgis-users@postgis.refractions.net<br>
> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
><br>
_______________________________________________<br>
postgis-users mailing list<br>
postgis-users@postgis.refractions.net<br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</div></font>
</body>
</html>

<table><tr><td bgcolor=#ffffff><font color=#000000><pre>This email, together with any attachments, is intended for the
addressee only. It may contain confidential or privileged information.
If you are not the intended recipient of this email, please notify
the sender, delete the email and attachments from your system and
destroy any copies you may have taken of the email and its attachments.
Duplication or further distribution by hardcopy, by electronic means
or verbally is not permitted without permission.</pre></font></td></tr></table>