-
Notifications
You must be signed in to change notification settings - Fork 216
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
Incorrect union of polygons with shared vertices #1326
Comments
Thanks for the report! I can reproduce the issue and will work on a fix, hopefully in November. Yes, we removed rescaling - so a behaviour change can be there. For this particular case, if using |
Part of textual output: areas of a/b (inputs) and union, which looks like the double of b but that should never happen. |
Root cause: two consecutive turns (4 and 5 in the figure below) are nearly (but not 100% colocated) and have a rare combination of properties, they are classified as touch and touch_interior. Therefore one points to the next, which is fine, but it causes a travel over the whole polygon to go to the next one. That should be avoided. But in other cases with a touch, it should travel like that (in case of unions). There is a concept fix but it's not yet in the "ideal" place. To be continued. |
Thanks for the update, much appreciated! |
This can occur in a sequence of touch and then touch_interior
This can occur in a sequence of touch and then touch_interior
This can occur in a sequence of touch and then touch_interior
This can occur in a sequence of touch and then touch_interior
This can occur in a sequence of touch and then touch_interior
This can occur in a sequence of touch and then touch_interior
This can occur in a sequence of touch and then touch_interior
✅ merged. It might (probably) make it to |
Amazing!! Thanks a lot! |
This can occur in a sequence of touch and then touch_interior
This issue might be a duplicate of #1226 or #1179, and if we can confirm this, happy for this ticket to be closed of course. But the additional example might still be worth filing it. The following two polygons share common vertices:
When computing the
union_
, the result is intuitively correct when using Boost 1.77:With Boost 1.85 or 1.86, this becomes
The code to reproduce this is as follows (omitting includes etc. for brevity):
I hope this is enough context to make this reproducible. Let me know otherwise, then I will provide more information. Also, I understand that such algorithms don't always have a "right" or "wrong" result, and this might be an unfortunate edge case. Since it's a clear behavioural change compared to v1.77, I would appreciate your opinion on this one.
The text was updated successfully, but these errors were encountered: