Open brendan-ward opened 1 year ago
Confirmed this is also a bug in JTS. I'll investigate there.
Here is an XML test to help with diagnosing the issue. geos-gh-827.xml.txt](https://github.com/libgeos/geos/files/10845933/issue-geos-gh-827.xml.txt) (added .txt so GitHub will allow it)
I looked into it a bit and found the breaking commit in GEOS is 3320d96a88a1d8492016c37f23983de164470670. In JTS, changing the corresponding object from a HashMap
to a TreeMap
also makes the test pass. I am suspicious that there is a bug in how the overlay labels are being propagated in OverlayLabeller
, such that the order in which the edges are processed affects the final labeling. In particular, two edges are labeled interior-right or exterior-right depending on the order in which they are processed.
Is there any outlook on this being fixed? Thank you!
Possibly related to #741 ?
First reported at Shapely #1767.
Given the attached WKB geometries: wkbs.zip
Intersection should produce a polygon output.
The first polygon has clockwise winding order, the second is counterclockwise. Intersection used to work as expected for GEOS 3.9, and only works properly for GEOS >= 3.10 if both polygons are oriented the same way.
Reversing the first so they have the same winding order produces valid results:
Note that testing with WKT does not work, because it slightly modifies the precision and produces expected outputs rather than the errors above.