Opened 12 years ago

Closed 5 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 12 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 by strk, 12 years ago

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 by strk, 12 years ago

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.

by strk, 12 years ago

Attachment: bug523.xml added

comment:3 by strk, 12 years ago


comment:4 by strk, 12 years ago

Milestone: 3.3.4GEOS Future

comment:5 by strk, 7 years ago

See also #838

comment:6 by strk, 6 years ago

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

comment:7 by robe, 6 years ago

Milestone: GEOS FutureGEOS Fund Me

Milestone renamed

comment:8 by dbaston, 5 years ago

Resolution: fixed
Status: newclosed

Added test confirming fix in cd3af0d40a9ab78fddf16abf29bd4d7bce099868/git

Note: See TracTickets for help on using tickets.