<!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">
    FWIW, I ran this data through JTS 1.11 using both union(geom, geom)
    and union(geom), and both operations completed without errors.<br>
    <br>
    Not sure what this says about the GEOS issue - other than more
    debugging required...!<br>
    <br>
    On 1/20/2011 3:31 PM, <a class="moz-txt-link-abbreviated" href="mailto:James.Sewell@lisasoft.com">James.Sewell@lisasoft.com</a> wrote:
    <blockquote
cite="mid:CB506E813C77E9498F043F1F951BB2768E3B9826FE@optimus.ms.a2end.com"
      type="cite">
      <pre wrap="">Right,

Once again thanks for the help on this.

Attached is a zip with the two geometries that I am having problems unioning (2.7mb I'll up to an FTP if it doesn't get through), when testing I have them both in a table called alw as separate rows. I realise that the linework is very dirty, but it is what we have to work with in this case.

The following commands will cause errors. If I don't include the snaptogrid there will not be an error in *this* case, but if I were to run the whole process with no snap there would be an error at some stage.

Any help appreciated! I am working on getting a smaller dataset which exhibits the problem.

--

CREATE TABLE alwunionxx AS
        SELECT 
                st_union(st_collect(st_snaptogrid(the_geom,10E-8)), ST_SetSRID('LINESTRINGEMPTY', 4283)) 
        AS the_geom 
        FROM alw;

NOTICE:  TopologyException: found non-noded intersection between LINESTRING (146.593 -37.2263, 146.593 -37.2263) and LINESTRING (146.593 -37.2263, 146.593 -37.2263) at 146.593 -37.2263
ERROR:  GEOS union() threw an error!


CREATE TABLE alwunionxx AS
        SELECT 
                st_union(st_snaptogrid(the_geom,10E-8)) 
        AS the_geom    
        FROM alw;

NOTICE:  TopologyException: found non-noded intersection between LINESTRING (146.593 -37.2263, 146.593 -37.2263) and LINESTRING (146.593 -37.2263, 146.593 -37.2263) at 146.593 -37.2263
ERROR:  GEOS union() threw an error!

--

Cheers,
James Sewell&nbsp;
Developer&nbsp;
LISAsoft&nbsp;

Ph:&nbsp;+61 3 8680 3250&nbsp;Fax:&nbsp;+61 3 8680 3299&nbsp;
Level 9, 601 Bourke St, Melbourne Vic 3000


LISAsoft is part of the A2end Group of Companies
<a class="moz-txt-link-freetext" href="http://www.ardec.com.au">http://www.ardec.com.au</a>
<a class="moz-txt-link-freetext" href="http://www.lisasoft.com">http://www.lisasoft.com</a>
<a class="moz-txt-link-freetext" href="http://www.terrapages.com">http://www.terrapages.com</a>

-----Original Message-----
From: <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>] On Behalf Of strk
Sent: Tuesday, 18 January 2011 2:48 AM
To: GEOS Development List
Subject: Re: [geos-devel] RE: GEOS errors from PostGIS

On Mon, Jan 17, 2011 at 11:05:42AM +1030, <a class="moz-txt-link-abbreviated" href="mailto:James.Sewell@lisasoft.com">James.Sewell@lisasoft.com</a> wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">The latest daily doesn't help the problem so I've reverted to 3.2.2 and performed some more testing.

I have a dataset where:

ST_Union(the_geom, ST_SetSRID('LINESTRING EMPTY', 4283))

Fails, yet

ST_Union(the_geom).

Works. There are other datasets which fail on both versions, and I have no doubt I can find one which works in the reverse manner.
</pre>
      </blockquote>
      <pre wrap="">
The latter uses CascadedUnion (the one UnaryUnion uses too).
The former uses normal union (non-cascaded).

--strk;

  ()   Free GIS &amp; Flash consultant/developer
  /\   <a class="moz-txt-link-freetext" href="http://strk.keybit.net/services.html">http://strk.keybit.net/services.html</a>
_______________________________________________
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>
      <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/3392 - Release Date:
        01/20/11</p>
    </blockquote>
  </body>
</html>