[postgis-users] Union fails on 2389 linestrings.

Jeff Adams jadams at azavea.com
Tue Jul 27 07:16:35 PDT 2010


ST_IsValid returns true for all of them.  I'll try reducing the
precision slightly, though I'm later going to do point-in-poly checks
against some other original input data and the reduced precision will
increase the chances of inaccurate results.

Thanks,
Jeff

On Tue, Jul 27, 2010 at 10:13 AM, Nicolas Ribot <nicolas.ribot at gmail.com> wrote:
>> I have a layer with 2389 linestrings which intersect a lot.  I'm
>> trying to create a polygon overlay, so I want to union the linestrings
>> together so I can then call polygonize.
>>
>> However, when I try to union them, it runs for about 25 minutes then
>> fails claiming it found a non-noded intersection between two lines
>> that appear identical and 0-length (though it may be the precision is
>> lost when printing the WKT in the error message).
>>
>>        create table noded_lines as
>>        select ST_Union(boundary) as noded_boundary from boundary_lines;
>>
>> NOTICE:  TopologyException: found non-noded intersection between
>> LINESTRING (-118.296 34.1185, -118.296 34.1185) and LINESTRING
>> (-118.296 34.1185, -118.296 34.1185) at -118.296 34.1185
>>
>>
>> ERROR:  GEOS union() threw an error!
>>
>> Anyone know how I could get around this?
>>
>
> Hi,
> Are all your linestrings valid ?
> Could you reduce coordinate precision with st_snapToGrid ?
>
> Nicolas
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>



-- 
Jeff Adams
Azavea (formerly Avencia)  |  T: 215.701.7717  |  F: 215.925.2663
www.azavea.com



More information about the postgis-users mailing list