Closed Amalio769 closed 2 months ago
Hi @Amalio769 , thank you for your report. I've confirmed that the geometry is invalid via QGIS, and I've been able to reproduce the bug in simplefeatures where it's erroneously indicating that it's valid. I'll look into a fix (I've got an intuitive understanding of where I think the problem most likely is).
I've got the bug reproduction and fix in this branch: https://github.com/peterstace/simplefeatures/compare/master...polygon_validation_bug
(I'm going to get some eyes on it before merging it in)
I've compile my repo with the new brach and all my tests work properly. Good job. Thank you very much.
FYI the fix is in the v0.51.0 release. https://github.com/peterstace/simplefeatures/releases/tag/v0.51.0
With a wrong Polygon (the internal ring is bigger that external one, and the internal one intersect with the external one in more than one point) the function Validate() work properly.
But if the internal ring intersect in only one point with the external ring, the function Validate don't work properly. Please, check this Polygon with the following coordinates: [[[1,1],[5,1],[5,5],[1,5],[1,1]],[[3,1],[6,0],[6,6],[0,6],[0,0],[3,1]]]