Skip to content
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

Use Martinez-Rueda-Feito polygon clipping algorithm #3

Open
nighthawk opened this issue Sep 30, 2021 · 1 comment
Open

Use Martinez-Rueda-Feito polygon clipping algorithm #3

nighthawk opened this issue Sep 30, 2021 · 1 comment

Comments

@nighthawk
Copy link
Owner

nighthawk commented Sep 30, 2021

The current algorithm is comparably slow, can sometimes fail (known issues since fixed in #5), and doesn't handle things like interior polygons. Time to switch to another algorithm, such as Martinez-Rueda-Feito's sweep-line-algorithm, which is also used by TurfJS:

Other alternatives and further reading:

@nighthawk
Copy link
Owner Author

Note: This algorithm is best implemented using a priority queue. So might be easiest tackled once this is available: apple/swift-collections#3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant