[postgis-users] ST_Union (8.4) and TopologyException

Kevin Neufeld kneufeld at refractions.net
Tue Aug 4 22:23:19 PDT 2009

Hi Simon,

I've found that such errors in the past are usually related to the 
precision of the coordinates.  Try putting your geometries through 
ST_SnapToGrid(), snapping them to some reasonable grid.  Ensure they are 
still valid and try ST_Union again.

In any case, TopologyExceptions are getting fewer and farther between as 
the JTS and GEOS codebases are continually enhanced and improved upon.  
Can you provide a concrete example?


Simon Greener wrote:
> I have been trying out the new ST_Union in 1.4 and have a question.
> I note that, whenever I hit an error like this:
> NOTICE:  TopologyException: found non-noded intersection between 5.74214e+006 7.36573e+006, 5.74304e+006 7.36666e+006 and 5.74339e+006 7.36629e+006, 5.74304e+006 7.36666e+006 5.74304e+006 7.36666e+006
> ST_Union fails to produce a result.
> Is there anything I can do to address this TopologyException issue within PostGIS.
> regards
> Simon

More information about the postgis-users mailing list