Opened 12 years ago

Closed 6 years ago

#1733 closed defect (fixed)

ST_Difference fails with two valid geometries

Reported by: pracine Owned by: pramsey
Priority: medium Milestone: PostGIS GEOS
Component: postgis Version: master
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 (3)

comment:1 by strk, 12 years ago

Milestone: PostGIS 2.0.0PostGIS 2.0.1

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

comment:2 by strk, 12 years ago

Milestone: PostGIS 2.0.1PostGIS GEOS

comment:3 by komzpa, 6 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.