-
Notifications
You must be signed in to change notification settings - Fork 954
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
turf-mask crashes when creating a mask of 11 or more geometries #1917
Comments
This may be the same issue as reported on #1537? |
Hi @arahansen Thanks for the report. We're hoping to release a new version of turf following the merge of #1916 which uses a more robust union algorithm which gets used consequently in mask so I suspect that will resolve it. I'll keep this issue open and will recheck after that release. |
I pulled the code from that PR into my local environment and it seems to help quite a bit. Though notably, I also had to also add the fix referenced in this comment. I can't really tell if this fix is robust enough for all edge cases or not, but it has been working pretty well in my testing so far. I also added this, which feels pretty hacky but the combination of the two has led to predictable performance:
|
Unfortunatly, this is still a problem @rowanwins The suggested edit from @arahansen works (for less than 600 geometries). Is there a reason why this fix is not in the repo? |
I am finding when I try to create a mask using 11 or more geometries, the function completely locks up and never completes.
From my testing, it does not appear to matter what geometries are used, but I'm consistently reproducing this locking behavior when adding 11 or more geometries.
Here is a link to a repro: https://codesandbox.io/s/mystifying-bush-y8vvv. Just uncomment the commented coordinates in the example.
Full code in example:
The text was updated successfully, but these errors were encountered: