-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange behavior when polygon is closed #8
Comments
I exactly face the same issue. The following code (should) computes the intersection between two basic squares.
And instead of returning
which corresponds to the first square... |
Ditto, I've run into this as well. |
I think what you guys are facing is a Leaflet issue. From the docs (https://leafletjs.com/reference-1.4.0.html#polygon)
|
I'd go as far as to say that this is how other polygon clipping algorithms work to be honest. For example, in Clipper you can add both polygons (closed) and polylines (open), and this is explicitly distinguished via |
When polygon is not closed, everything is OK
When polygon is closed (firstPoint==lastPoint), the intersection is weird. Weird means
The text was updated successfully, but these errors were encountered: