Choice of polygon clipping library #2886
smallsaucepan
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
There are a number of issues raised with Turf that relate to polygon operations - union, diff, clipping, etc. We recently moved away from polygon-clipping, which while fast had some correctness problems.
And while the new library polygon-ts works in many of the cases polygon-clipping didn't, it has its own issues. These seem to be related more to out of memory exceptions, or borking on certain data. Plus it's an order of magnitude slower.
Would like to discuss options going forward for which library we use.
Factors to consider:
Players
Have also looked at the different underlying clipping algorithms. Doesn't seem to a be a single one that handles all edge cases - degenerate polygons, self intersecting polygons, holes, etc.
https://en.wikipedia.org/w/index.php?search=polygon+clipping+algorithms
We're probably not going to find the perfect library, so putting it out there for commentary and thoughts. Do we pick a library and put effort into trying to get any problems fixed upstream? Make the clipping library pluggable by the user?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions