[geos-devel] RE: GEOS errors from PostGIS

Martin Davis mtnclimb at telus.net
Thu Jan 13 22:51:16 EST 2011


James,

I suspect this may be caused by a known bug in the Unary union.  This 
was identified in this thread on the JTS list:

http://sourceforge.net/mailarchive/forum.php?thread_name=4C0FB4A5.2010304%40refractions.net&forum_name=jts-topo-suite-user

I fixed this in JTS, in the soon-to-be-released ver 1.12.  Perhaps this 
fix hasn't made it's way into GEOS and PostGIS yet.

The thing to do is to get this fixed in GEOS, rolled into PostGIS, and 
then you can retest your union case.

Martin

On 1/11/2011 6:23 PM, James.Sewell at lisasoft.com wrote:
>
> Sorry, I didn't include the actual error:
>
> An example is:
>
> 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
>
> This particular one is a two very small identical lines, this isn't 
> always the case but seems to be the majority of the time.
>
> Cheers,
>
> James Sewell
> Developer
> LISAsoft
>
> ------------------------------------------------------------------------
>
> *Ph: *+61 3 8680 3250 *Fax: *+61 3 8680 3299
> Level 9, 601 Bourke St, Melbourne Vic 3000
>
> ------------------------------------------------------------------------
>
>
> LISAsoft is part of the A2end Group of Companies
> http://www.ardec.com.au <http://www.ardec.com.au/>
> http://www.lisasoft.com <http://www.lisasoft.com/>
> http://www.terrapages.com <http://www.terrapages.com/>
>
> *From:*James.Sewell at lisasoft.com
> *Sent:* Wednesday, 12 January 2011 12:06 PM
> *To:* 'geos-devel at lists.osgeo.org'
> *Subject:* GEOS errors from PostGIS
>
> Hello All,
>
> I am currently creating an OSS Python app which uses PostGIS (and thus 
> GEOS) to combines multiple layers and carries through attributes.
>
> I am using a method derived from Paul Ramsey's 
> http://s3.opengeo.org/postgis-power.pdf document. The steps I am 
> taking are as follows:
>
> ·Take the left and right layers and split them into smaller segments
>
> ·Iterate through the segments doing the following:
>
> oUse the following to dump each side to linework
>
> SELECT ST_Collect(a.the_geom) AS the_geom
>
>                             FROM (SELECT
>
>                                 (ST_Dump
>
>                                 (ST_Exteriorring(
>
>                                 (ST_Dumprings(
>
>                                 
> (ST_Dump(the_geom)).geom)).geom))).geom AS the_geom
>
> oPut two resulting multi-polygons into a table, make sure they are 
> valid (and all encapsulated polys are valid),  and union to remove 
> overlap as follows
>
> SELECT ST_Union(ST_snaptogrid(the_geom,10E-10)) AS the_geom
>
> oBuild the polygons back up as follows
>
> SELECT a.the_geom AS the_geom,
>
>                                 ST_pointonsurface(a.the_geom) AS point,
>
>                                 0 AS leftgid, 0 AS rightgid
>
> FROM (SELECT (ST_Dump(ST_polygonize(the_geom))).geom AS the_geom
>
> oThen use an overlay to map the attributes back through from the left 
> and the right.
>
> The process works, however I am getting problems with GEOS Non Noded 
> Intersection ("GEOS union() threw an error!") 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...).
>
> 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.
>
> Unfortunately I can'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.
>
> 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?
>
> If anyone has any ideas they would be most appreciated.
>
> Cheers,
>
> James Sewell
> Developer
> LISAsoft
>
> ------------------------------------------------------------------------
>
> *Ph: *+61 3 8680 3250 *Fax: *+61 3 8680 3299
> Level 9, 601 Bourke St, Melbourne Vic 3000
>
> ------------------------------------------------------------------------
>
>
> LISAsoft is part of the A2end Group of Companies
> http://www.ardec.com.au <http://www.ardec.com.au/>
> http://www.lisasoft.com <http://www.lisasoft.com/>
> http://www.terrapages.com <http://www.terrapages.com/>
>
>
> _______________________________________________
> geos-devel mailing list
> geos-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geos-devel
>
>
> No virus found in this message.
> Checked by AVG - www.avg.com <http://www.avg.com>
> Version: 10.0.1191 / Virus Database: 1435/3373 - Release Date: 01/11/11
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geos-devel/attachments/20110113/a502a05d/attachment-0001.html


More information about the geos-devel mailing list