Opened 9 years ago

Closed 2 years ago

#523 closed defect (fixed)

SymDifference between two valid geometries return an _invalid_ geometry [JTS fails too]

Reported by: strk Owned by: geos-devel@…
Priority: major Milestone: GEOS Fund Me
Component: Default Version: 3.3.2
Severity: Unassigned Keywords: jtsfail


Geometry A:


Geometry B:


They are both valid, but when running SymDifference? against them the result is invalid.

Attachments (1)

bug523.xml (1.2 KB) - added by strk 9 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 9 years ago by strk

The inputs are a larger polygon (first) and a very narrow polygon almost collapsed to a line which intersects with the former.



Overlay with original input fails: TopologyException?: found non-noded intersection between LINESTRING (1.72506e+06 4.81909e+06, 1.72506e+06 4.81909e+06) and LINESTRING (1.72506e+06 4.81909e+06, 1.72506e+06 4.81909e+06) at 1725064.1365604463 4819094.70235069

Common-bits remover result is refused due to invalidity of the output.

Snap heuristic is accepted no matter invalidity of the output. Invalidity is (in both cases): Self-intersection at or near point 1725064.1365604463 4819094.70235069 (1725064.1365604463499 4819094.7023506900296)

I guess it'd make more sense to throw a TopologyException? on invalid output.. but that's really something that shouldn't happen.

comment:2 Changed 9 years ago by strk

Keywords: jtsfail added
Summary: SymDifference between two valid geometries return an _invalid_ geometrySymDifference between two valid geometries return an _invalid_ geometry [JTS fails too]

I've tested JTS which also fails. Not easy to tell because JTS testrunner doesn't check output for validity, but it succeeds in returning the invalid geometry as result.

Changed 9 years ago by strk

Attachment: bug523.xml added

comment:3 Changed 9 years ago by strk


comment:4 Changed 9 years ago by strk

Milestone: 3.3.4GEOS Future

comment:5 Changed 4 years ago by strk

See also #838

comment:6 Changed 4 years ago by strk

This issue is reported to be fixed by the fix for #838 too:

comment:7 Changed 3 years ago by robe

Milestone: GEOS FutureGEOS Fund Me

Milestone renamed

comment:8 Changed 2 years ago by dbaston

Resolution: fixed
Status: newclosed

Added test confirming fix in cd3af0d40a9ab78fddf16abf29bd4d7bce099868/git

Note: See TracTickets for help on using tickets.