-
Notifications
You must be signed in to change notification settings - Fork 949
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/union gives 'RangeError: Maximum call stack size exceeded' error after upgrading #2317
Comments
I think this is an issue with the upstream polygon-clipping library, which was probably swapped in as the implementation for turf.union between the two versions you are using. See this related issue and feel free to add to it with your example -- mfogel/polygon-clipping#111. Resolving this would need to happen upstream it looks like so I can leave this issue open. When I hit this error, I can usually workaround it by breaking down the inputs into smaller chunks. In your case it might be sufficient to split the first or second input from one into two multipolygons, each with half the features. Then call I use this chunking technique for Here's an example of a chunk function (typescript) that takes an array of anything and returns an array of arrays with length no greater than chunkSize. The last chunk will have the remainder. Modify to suit your needs.
|
I've tried this both on |
This was resolved by #2729 and a test added based on the example data provided: packages/turf-union/test/in/maximum-callstack-size-exceeded-2317.geojson |
@turf/[email protected] gives 'RangeError: Maximum call stack size exceeded' error after upgrading from @turf/[email protected], with same input parameters.
Version 6.5.0 snippet of code that calls turf.union fails with the error:
Version 5.1.5 snippet of code that calls turf.union works:
The text was updated successfully, but these errors were encountered: