Ticket #1733 (new defect)

Opened 14 months ago

Last modified 11 months ago

ST_Difference fails with two valid geometries

Reported by: pracine Owned by: pramsey
Priority: medium Milestone: PostGIS GEOS
Component: postgis Version: trunk
Keywords: Cc:

Description

SELECT ST_Difference(ageom, bgeom), 
       ST_IsValid(ageom) a_isvalid, 
       ST_IsValid(bgeom) b_isvalid,
       ST_AsText(ageom) a_text,
       ST_AsText(bgeom) b_text,
       ST_GeometryType(ageom) a_type,
       ST_GeometryType(bgeom) b_type,
       ST_Summary(ageom) a_sum,
       ST_Summary(bgeom) b_sum,
       ageom::text a_ewkb,
       bgeom::text b_ewkb
FROM 
(SELECT a.geom ageom,
        b.geom bgeom 
FROM
(SELECT '010300002040A5000001000000050000001D020000F41831C1E399231EE6F729411C020000F41831C1B992E9C61EFB29411C020000F41831C156E1297A1CFB29411A493FC38F1831C1D8C6FEFCFEF929411D020000F41831C1E399231EE6F72941'::geometry geom 
) a
, 
(SELECT '010300002040A5000001000000040000001D020000F41831C1056DF2EC6AFA29411C020000F41831C1D1D1C8A2C7FA2941D6FA5B26EC1831C1C8F5FEAEBBFA29411D020000F41831C1056DF2EC6AFA2941'::geometry geom 
) b) foo

fails with this message:

ERROR: GEOSDifference: TopologyException?: found non-noded intersection between LINESTRING (-1.1205e+06 851294, -1.1205e+06 851343) and LINESTRING (-1.1205e+06 851343, -1.1205e+06 851342) at -1120500.0000001257 851343.3885007716

geom a has 5 points and geom b has 4 points. Both are valid.

Change History

Changed 14 months ago by strk

  • milestone changed from PostGIS 2.0.0 to PostGIS 2.0.1

The bug is in GEOS, filed:  http://trac.osgeo.org/geos/ticket/522

Changed 11 months ago by strk

  • milestone changed from PostGIS 2.0.1 to PostGIS GEOS
Note: See TracTickets for help on using tickets.