<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    In the case of lines, I think GEOS Unary Union just delegates to
    union(lines, empty point).&nbsp; So you could try running st_union(lines,
    empty point) and see if that works.<br>
    <br>
    If this doesn't work, it could just be a case where the snapping
    heuristic tolerances aren't being set large enough to handle the
    linework.&nbsp; Or, it could be some other limitation...&nbsp; <br>
    <br>
    If the problem persists, if you can send me a sample dataset (as
    shapefile or WKB file) which shows the problem, I can try and see if
    JTS has the same problem and if there's an obvious fix.<br>
    <br>
    Martin<br>
    <br>
    On 1/13/2011 9:54 PM, <a class="moz-txt-link-abbreviated" href="mailto:James.Sewell@lisasoft.com">James.Sewell@lisasoft.com</a> wrote:
    <blockquote
cite="mid:CB506E813C77E9498F043F1F951BB2768E3B982662@optimus.ms.a2end.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <meta name="Generator" content="Microsoft Word 12 (filtered
        medium)">
      <!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
      <style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
p.avgcert, li.avgcert, div.avgcert
        {mso-style-name:avgcert;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
span.EmailStyle25
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Thanks
            Martin,<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">I&#8217;ll
            install the latest nightly build of GEOS, recompile PostGIS
            and hope for the best.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Reading
            the thread does that mean that st_union(geom, geom) should
            work in this case? I had previously done some testing and it
            didn&#8217;t seem to, I&#8217;ll test again though.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
        <div>
          <p class="MsoNormal" style="margin-bottom: 12pt;"><span
              style="font-size: 9pt; font-family:
              &quot;Verdana&quot;,&quot;sans-serif&quot;; color: rgb(31,
              73, 125);">Cheers,<o:p></o:p></span></p>
          <p class="MsoNormal" style="margin-bottom: 12pt;"><span
              style="font-size: 9pt; font-family:
              &quot;Verdana&quot;,&quot;sans-serif&quot;; color:
              rgb(153, 153, 153);">James Sewell&nbsp;</span><span
              style="font-size: 9pt; font-family:
              &quot;Verdana&quot;,&quot;sans-serif&quot;; color:
              rgb(153, 153, 153);"><br>
            </span><span style="font-size: 9pt; font-family:
              &quot;Verdana&quot;,&quot;sans-serif&quot;; color:
              rgb(153, 153, 153);">Developer&nbsp;</span><span
              style="font-size: 9pt; font-family:
              &quot;Verdana&quot;,&quot;sans-serif&quot;; color:
              rgb(153, 153, 153);"><br>
            </span><span style="font-size: 9pt; font-family:
              &quot;Verdana&quot;,&quot;sans-serif&quot;; color:
              rgb(153, 153, 153);">LISAsoft&nbsp;</span><span
              style="font-size: 9pt; font-family:
              &quot;Verdana&quot;,&quot;sans-serif&quot;; color:
              rgb(153, 153, 153);"><o:p></o:p></span></p>
          <div>
            <div>
              <div>
                <div class="MsoNormal"><span style="font-size: 9pt;
                    font-family:
                    &quot;Verdana&quot;,&quot;sans-serif&quot;; color:
                    rgb(153, 153, 153);">
                    <hr style="width: 315pt;" align="left" width="420"
                      size="2"></span></div>
              </div>
            </div>
          </div>
          <p class="MsoNormal"><b><span style="font-size: 9pt;
                font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;
                color: rgb(153, 153, 153);">Ph:&nbsp;</span></b><span
              style="font-size: 9pt; font-family:
              &quot;Verdana&quot;,&quot;sans-serif&quot;; color:
              rgb(153, 153, 153);">+61 3 8680 3250&nbsp;<b>Fax:&nbsp;</b>+61 3
              8680 3299&nbsp;</span><span style="font-size: 9pt; font-family:
              &quot;Verdana&quot;,&quot;sans-serif&quot;; color:
              rgb(153, 153, 153);"><br>
            </span><span style="font-size: 9pt; font-family:
              &quot;Verdana&quot;,&quot;sans-serif&quot;; color:
              rgb(153, 153, 153);">Level 9, 601 Bourke St, Melbourne Vic
              3000<o:p></o:p></span></p>
          <div>
            <div>
              <div>
                <div class="MsoNormal"><span style="font-size: 9pt;
                    font-family:
                    &quot;Verdana&quot;,&quot;sans-serif&quot;; color:
                    rgb(153, 153, 153);">
                    <hr style="width: 315pt;" align="left" width="420"
                      size="2"></span></div>
              </div>
            </div>
          </div>
          <p class="MsoNormal"><span style="font-size: 9pt; font-family:
              &quot;Verdana&quot;,&quot;sans-serif&quot;; color:
              rgb(153, 153, 153);"><br>
            </span><span style="font-size: 9pt; font-family:
              &quot;Verdana&quot;,&quot;sans-serif&quot;; color:
              rgb(153, 153, 153);">LISAsoft is part of the A2end Group
              of Companies</span><span style="font-size: 9pt;
              font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;
              color: rgb(153, 153, 153);"><br>
            </span><span style="font-size: 9pt; font-family:
              &quot;Verdana&quot;,&quot;sans-serif&quot;; color: rgb(79,
              129, 189);"><a moz-do-not-send="true"
                href="http://www.ardec.com.au/"><span style="color:
                  rgb(79, 129, 189); text-decoration: none;">http://www.ardec.com.au</span></a></span><span
              style="font-size: 9pt; font-family:
              &quot;Verdana&quot;,&quot;sans-serif&quot;; color: rgb(79,
              129, 189);"><br>
            </span><span style="font-size: 9pt; font-family:
              &quot;Verdana&quot;,&quot;sans-serif&quot;; color: rgb(79,
              129, 189);"><a moz-do-not-send="true"
                href="http://www.lisasoft.com/"><span style="color:
                  rgb(79, 129, 189); text-decoration: none;">http://www.lisasoft.com</span></a></span><span
              style="font-size: 9pt; font-family:
              &quot;Verdana&quot;,&quot;sans-serif&quot;; color: rgb(79,
              129, 189);"><br>
            </span><span style="font-size: 9pt; font-family:
              &quot;Verdana&quot;,&quot;sans-serif&quot;; color: rgb(79,
              129, 189);"><a moz-do-not-send="true"
                href="http://www.terrapages.com/"><span style="color:
                  rgb(79, 129, 189); text-decoration: none;">http://www.terrapages.com</span></a></span><span
              style="color: rgb(31, 73, 125);"><o:p></o:p></span></p>
        </div>
        <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
        <div>
          <div style="border-right: medium none; border-width: 1pt
            medium medium; border-style: solid none none; border-color:
            rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color;
            padding: 3pt 0cm 0cm;">
            <p class="MsoNormal"><b><span style="font-size: 10pt;
                  font-family:
                  &quot;Tahoma&quot;,&quot;sans-serif&quot;; color:
                  windowtext;" lang="EN-US">From:</span></b><span
                style="font-size: 10pt; font-family:
                &quot;Tahoma&quot;,&quot;sans-serif&quot;; color:
                windowtext;" lang="EN-US">
                <a class="moz-txt-link-abbreviated" href="mailto:geos-devel-bounces@lists.osgeo.org">geos-devel-bounces@lists.osgeo.org</a>
                [<a class="moz-txt-link-freetext" href="mailto:geos-devel-bounces@lists.osgeo.org">mailto:geos-devel-bounces@lists.osgeo.org</a>] <b>On
                  Behalf Of </b>Martin Davis<br>
                <b>Sent:</b> Friday, 14 January 2011 2:51 PM<br>
                <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:geos-devel@lists.osgeo.org">geos-devel@lists.osgeo.org</a><br>
                <b>Subject:</b> Re: [geos-devel] RE: GEOS errors from
                PostGIS<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
        <p class="MsoNormal">James,<br>
          <br>
          I suspect this may be caused by a known bug in the Unary
          union.&nbsp; This was identified in this thread on the JTS list:<br>
          <br>
          <a moz-do-not-send="true"
href="http://sourceforge.net/mailarchive/forum.php?thread_name=4C0FB4A5.2010304%40refractions.net&amp;forum_name=jts-topo-suite-user">http://sourceforge.net/mailarchive/forum.php?thread_name=4C0FB4A5.2010304%40refractions.net&amp;forum_name=jts-topo-suite-user</a><br>
          <br>
          I fixed this in JTS, in the soon-to-be-released ver 1.12.&nbsp;
          Perhaps this fix hasn't made it's way into GEOS and PostGIS
          yet.<br>
          <br>
          The thing to do is to get this fixed in GEOS, rolled into
          PostGIS, and then you can retest your union case.<br>
          <br>
          Martin<br>
          <br>
          On 1/11/2011 6:23 PM, <a moz-do-not-send="true"
            href="mailto:James.Sewell@lisasoft.com">James.Sewell@lisasoft.com</a>
          wrote: <o:p></o:p></p>
        <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Sorry,
            I didn&#8217;t include the actual error:</span><o:p></o:p></p>
        <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">&nbsp;</span><o:p></o:p></p>
        <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">An
            example is:</span><o:p></o:p></p>
        <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">&nbsp;</span><o:p></o:p></p>
        <p class="MsoNormal">NOTICE: TopologyException: found non-noded
          intersection between LINESTRING (143.861 -36.881, 143.861
          -36.881) and LINESTRING (143.861 -36.881, 143.861 -36.881) at
          143.861 -36.881<o:p></o:p></p>
        <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">&nbsp;</span><o:p></o:p></p>
        <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">This
            particular one is a two very small identical lines, this
            isn&#8217;t always the case but seems to be the majority of the
            time.</span><o:p></o:p></p>
        <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">&nbsp;</span><o:p></o:p></p>
        <div>
          <p class="MsoNormal" style="margin-bottom: 12pt;"><span
              style="font-size: 9pt; font-family:
              &quot;Verdana&quot;,&quot;sans-serif&quot;;">Cheers,</span><o:p></o:p></p>
          <p class="MsoNormal" style="margin-bottom: 12pt;"><span
              style="font-size: 9pt; font-family:
              &quot;Verdana&quot;,&quot;sans-serif&quot;; color:
              rgb(153, 153, 153);">James Sewell&nbsp;<br>
              Developer&nbsp;<br>
              LISAsoft&nbsp;</span><o:p></o:p></p>
          <div>
            <div>
              <div>
                <div>
                  <div>
                    <div class="MsoNormal"><span style="font-size: 9pt;
                        font-family:
                        &quot;Verdana&quot;,&quot;sans-serif&quot;;
                        color: rgb(153, 153, 153);">
                        <hr style="width: 315pt;" align="left"
                          width="420" size="2"></span></div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <p class="MsoNormal"><b><span style="font-size: 9pt;
                font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;
                color: rgb(153, 153, 153);">Ph:&nbsp;</span></b><span
              style="font-size: 9pt; font-family:
              &quot;Verdana&quot;,&quot;sans-serif&quot;; color:
              rgb(153, 153, 153);">+61 3 8680 3250&nbsp;<b>Fax:&nbsp;</b>+61 3
              8680 3299&nbsp;<br>
              Level 9, 601 Bourke St, Melbourne Vic 3000</span><o:p></o:p></p>
          <div>
            <div>
              <div>
                <div>
                  <div>
                    <div class="MsoNormal"><span style="font-size: 9pt;
                        font-family:
                        &quot;Verdana&quot;,&quot;sans-serif&quot;;
                        color: rgb(153, 153, 153);">
                        <hr style="width: 315pt;" align="left"
                          width="420" size="2"></span></div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <p class="MsoNormal"><span style="font-size: 9pt; font-family:
              &quot;Verdana&quot;,&quot;sans-serif&quot;; color:
              rgb(153, 153, 153);"><br>
              LISAsoft is part of the A2end Group of Companies<br>
            </span><span style="font-size: 9pt; font-family:
              &quot;Verdana&quot;,&quot;sans-serif&quot;;"><a
                moz-do-not-send="true" href="http://www.ardec.com.au/"><span
                  style="color: rgb(79, 129, 189); text-decoration:
                  none;">http://www.ardec.com.au</span></a><br>
              <a moz-do-not-send="true" href="http://www.lisasoft.com/"><span
                  style="color: rgb(79, 129, 189); text-decoration:
                  none;">http://www.lisasoft.com</span></a><br>
              <a moz-do-not-send="true"
                href="http://www.terrapages.com/"><span style="color:
                  rgb(79, 129, 189); text-decoration: none;">http://www.terrapages.com</span></a></span><o:p></o:p></p>
        </div>
        <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">&nbsp;</span><o:p></o:p></p>
        <div>
          <div style="border-right: medium none; border-width: 1pt
            medium medium; border-style: solid none none; padding: 3pt
            0cm 0cm; border-color: -moz-use-text-color;">
            <p class="MsoNormal"><b><span style="font-size: 10pt;
                  font-family:
                  &quot;Tahoma&quot;,&quot;sans-serif&quot;;"
                  lang="EN-US">From:</span></b><span style="font-size:
                10pt; font-family:
                &quot;Tahoma&quot;,&quot;sans-serif&quot;;" lang="EN-US">
                <a moz-do-not-send="true"
                  href="mailto:James.Sewell@lisasoft.com">James.Sewell@lisasoft.com</a>
                <br>
                <b>Sent:</b> Wednesday, 12 January 2011 12:06 PM<br>
                <b>To:</b> '<a moz-do-not-send="true"
                  href="mailto:geos-devel@lists.osgeo.org">geos-devel@lists.osgeo.org</a>'<br>
                <b>Subject:</b> GEOS errors from PostGIS</span><o:p></o:p></p>
          </div>
        </div>
        <p class="MsoNormal">&nbsp;<o:p></o:p></p>
        <p class="MsoNormal">Hello All,<o:p></o:p></p>
        <p class="MsoNormal">&nbsp;<o:p></o:p></p>
        <p class="MsoNormal">I am currently creating an OSS Python app
          which uses PostGIS (and thus GEOS) to combines multiple layers
          and carries through attributes.<o:p></o:p></p>
        <p class="MsoNormal">&nbsp;<o:p></o:p></p>
        <p class="MsoNormal">I am using a method derived from Paul
          Ramsey&#8217;s <a moz-do-not-send="true"
            href="http://s3.opengeo.org/postgis-power.pdf">http://s3.opengeo.org/postgis-power.pdf</a>
          document. The steps I am taking are as follows:<o:p></o:p></p>
        <p class="MsoNormal">&nbsp;<o:p></o:p></p>
        <p class="MsoListParagraph" style="text-indent: -18pt;">Take the
          left and right layers and split them into smaller segments<o:p></o:p></p>
        <p class="MsoListParagraph" style="text-indent: -18pt;">Iterate
          through the segments doing the following:<o:p></o:p></p>
        <p class="MsoListParagraph" style="margin-left: 72pt;
          text-indent: -18pt;">Use the following to dump each side to
          linework<o:p></o:p></p>
        <p class="MsoListParagraph" style="margin-left: 72pt;">&nbsp;<o:p></o:p></p>
        <p class="MsoNormal" style="margin-left: 72pt;">SELECT
          ST_Collect(a.the_geom) AS the_geom <o:p></o:p></p>
        <p class="MsoNormal" style="margin-left: 36pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FROM
          (SELECT <o:p></o:p></p>
        <p class="MsoNormal" style="margin-left: 36pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(ST_Dump<o:p></o:p></p>
        <p class="MsoNormal" style="margin-left: 36pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          (ST_Exteriorring(<o:p></o:p></p>
        <p class="MsoNormal" style="margin-left: 36pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          (ST_Dumprings(<o:p></o:p></p>
        <p class="MsoNormal" style="margin-left: 36pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          (ST_Dump(the_geom)).geom)).geom))).geom AS the_geom<o:p></o:p></p>
        <p class="MsoNormal">&nbsp;<o:p></o:p></p>
        <p class="MsoListParagraph" style="margin-left: 72pt;
          text-indent: -18pt;">Put two resulting multi-polygons into a
          table, make sure they are valid (and all encapsulated polys
          are valid), &nbsp;and union to remove overlap as follows<o:p></o:p></p>
        <p class="MsoNormal">&nbsp;<o:p></o:p></p>
        <p class="MsoNormal" style="margin-left: 72pt;">SELECT
          ST_Union(ST_snaptogrid(the_geom,10E-10)) AS the_geom <o:p></o:p></p>
        <p class="MsoNormal" style="margin-left: 72pt;">&nbsp;<o:p></o:p></p>
        <p class="MsoListParagraph" style="margin-left: 72pt;
          text-indent: -18pt;">Build the polygons back up as follows<o:p></o:p></p>
        <p class="MsoNormal" style="margin-left: 36pt;">&nbsp;<o:p></o:p></p>
        <p class="MsoNormal" style="margin-left: 72pt;">SELECT
          a.the_geom AS the_geom, <o:p></o:p></p>
        <p class="MsoNormal" style="margin-left: 72pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ST_pointonsurface(a.the_geom)
          AS point, <o:p></o:p></p>
        <p class="MsoNormal" style="margin-left: 72pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0
          AS leftgid, 0 AS rightgid <o:p></o:p></p>
        <p class="MsoNormal" style="margin-left: 72pt; text-indent:
          36pt;">FROM (SELECT (ST_Dump(ST_polygonize(the_geom))).geom AS
          the_geom<o:p></o:p></p>
        <p class="MsoNormal" style="margin-left: 72pt;">&nbsp;<o:p></o:p></p>
        <p class="MsoNormal" style="margin-left: 72pt;">&nbsp;<o:p></o:p></p>
        <p class="MsoListParagraph" style="margin-left: 72pt;
          text-indent: -18pt;">Then use an overlay to map the attributes
          back through from the left and the right.<o:p></o:p></p>
        <p class="MsoNormal">&nbsp;<o:p></o:p></p>
        <p class="MsoNormal">&nbsp;<o:p></o:p></p>
        <p class="MsoNormal">The process works, however I am getting
          problems with GEOS Non Noded Intersection <span style="color:
            rgb(31, 73, 125);">(&#8220;GEOS union() threw an error!&#8221;) </span>crashes
          in some areas. These can often be fixed by rearranging the
          data (importing in a different order, snapping to a slightly
          different grid etc...). <o:p></o:p></p>
        <p class="MsoNormal">&nbsp;<o:p></o:p></p>
        <p class="MsoNormal">When a failure occurs I am given two
          linestrings and a point, however these usually bear no
          relationship to the lines in either the expected output, the
          left or the right side other than being in the same area.<o:p></o:p></p>
        <p class="MsoNormal">&nbsp;<o:p></o:p></p>
        <p class="MsoNormal">Unfortunately I can&#8217;t provide data at the
          moment as any attempt to reduce the size of the dataset seems
          to remove (or relocate) the problem. I will try and get
          permission to release some data from the customer, but this
          will take some time.<o:p></o:p></p>
        <p class="MsoNormal">&nbsp;<o:p></o:p></p>
        <p class="MsoNormal">One thing to note is that the layers I am
          combining contain very complex and very similar linework. It
          would not be unexpected to get 10 sets of similar but not
          identical linework all running around an area. This is
          acceptable for the end product, but I am wondering if it is
          upsetting the Union somehow?<o:p></o:p></p>
        <p class="MsoNormal">&nbsp;<o:p></o:p></p>
        <p class="MsoNormal">If anyone has any ideas they would be most
          appreciated.<o:p></o:p></p>
        <p class="MsoListParagraph" style="margin-left: 108pt;">&nbsp;<o:p></o:p></p>
        <p class="MsoNormal" style="margin-left: 72pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <o:p></o:p></p>
        <p class="MsoNormal">&nbsp;<o:p></o:p></p>
        <p class="MsoNormal" style="margin-bottom: 12pt;"><span
            style="font-size: 9pt; font-family:
            &quot;Verdana&quot;,&quot;sans-serif&quot;;">Cheers,</span><o:p></o:p></p>
        <p class="MsoNormal" style="margin-bottom: 12pt;"><span
            style="font-size: 9pt; font-family:
            &quot;Verdana&quot;,&quot;sans-serif&quot;;">James Sewell&nbsp;<br>
            Developer&nbsp;<br>
            LISAsoft&nbsp;</span><o:p></o:p></p>
        <div>
          <div>
            <div>
              <div>
                <div>
                  <div>
                    <div>
                      <div class="MsoNormal"><span style="font-size:
                          9pt; font-family:
                          &quot;Verdana&quot;,&quot;sans-serif&quot;;
                          color: rgb(153, 153, 153);">
                          <hr style="width: 315pt;" align="left"
                            width="420" size="2"></span></div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <p class="MsoNormal"><b><span style="font-size: 9pt;
              font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;
              color: rgb(153, 153, 153);">Ph:&nbsp;</span></b><span
            style="font-size: 9pt; font-family:
            &quot;Verdana&quot;,&quot;sans-serif&quot;;">+61 3 8680
            3250&nbsp;<b>Fax:&nbsp;</b>+61 3 8680 3299&nbsp;<br>
            Level 9, 601 Bourke St, Melbourne Vic 3000</span><o:p></o:p></p>
        <div>
          <div>
            <div>
              <div>
                <div>
                  <div>
                    <div>
                      <div class="MsoNormal"><span style="font-size:
                          9pt; font-family:
                          &quot;Verdana&quot;,&quot;sans-serif&quot;;
                          color: rgb(153, 153, 153);">
                          <hr style="width: 315pt;" align="left"
                            width="420" size="2"></span></div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <p class="MsoNormal"><span style="font-size: 9pt; font-family:
            &quot;Verdana&quot;,&quot;sans-serif&quot;;"><br>
            LISAsoft is part of the A2end Group of Companies<br>
            <a moz-do-not-send="true" href="http://www.ardec.com.au/"><span
                style="color: rgb(79, 129, 189); text-decoration: none;">http://www.ardec.com.au</span></a><br>
            <a moz-do-not-send="true" href="http://www.lisasoft.com/"><span
                style="color: rgb(79, 129, 189); text-decoration: none;">http://www.lisasoft.com</span></a><br>
            <a moz-do-not-send="true" href="http://www.terrapages.com/"><span
                style="color: rgb(79, 129, 189); text-decoration: none;">http://www.terrapages.com</span></a></span><o:p></o:p></p>
        <p class="MsoNormal">&nbsp;<o:p></o:p></p>
        <pre><o:p>&nbsp;</o:p></pre>
        <pre><o:p>&nbsp;</o:p></pre>
        <pre>_______________________________________________<o:p></o:p></pre>
        <pre>geos-devel mailing list<o:p></o:p></pre>
        <pre><a moz-do-not-send="true" href="mailto:geos-devel@lists.osgeo.org">geos-devel@lists.osgeo.org</a><o:p></o:p></pre>
        <pre><a moz-do-not-send="true" href="http://lists.osgeo.org/mailman/listinfo/geos-devel">http://lists.osgeo.org/mailman/listinfo/geos-devel</a><o:p></o:p></pre>
        <p class="MsoNormal"><span style="font-size: 12pt; font-family:
            &quot;Times New Roman&quot;,&quot;serif&quot;;"><br>
            <br>
            <br>
            <o:p></o:p></span></p>
        <p class="avgcert">No virus found in this message.<br>
          Checked by AVG - <a moz-do-not-send="true"
            href="http://www.avg.com">www.avg.com</a><br>
          Version: 10.0.1191 / Virus Database: 1435/3373 - Release Date:
          01/11/11<o:p></o:p></p>
      </div>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
geos-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:geos-devel@lists.osgeo.org">geos-devel@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/geos-devel">http://lists.osgeo.org/mailman/listinfo/geos-devel</a></pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <p class="avgcert" color="#000000" align="left">No virus found in
        this message.<br>
        Checked by AVG - <a moz-do-not-send="true"
          href="http://www.avg.com">www.avg.com</a><br>
        Version: 10.0.1191 / Virus Database: 1435/3377 - Release Date:
        01/13/11</p>
    </blockquote>
  </body>
</html>