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
Cc:

Description

Geometry A:

010300000001000000080000000000000087523A41000000402C62524100000000B0523A41000000C01E6252410000000084523A41000000C023625241858C4F2488523A4151F8EEAC2562524111A0F52288523A414F50F3AC25625241D59FF52288523A414F50F3AC25625241000000007F523A4100000080256252410000000087523A41000000402C625241

Geometry B:

01030000000100000004000000A871502388523A4158FEF2AC2562524100A0F52288523A414F50F3AC2562524111A0F52288523A414F50F3AC25625241A871502388523A4158FEF2AC25625241

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.

Areas:

     839.745285423078
 3.86746841149477e-14

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

Milestone: 3.3.33.3.4

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: https://github.com/locationtech/jts/issues/107#issuecomment-361962900

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.