-
Notifications
You must be signed in to change notification settings - Fork 943
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
Feature request: iterate over flattened features #692
Comments
👍 Agreed having callback functionality, however One option that won't break any backwards compatibility is:
@morganherlocker What's your opinion on including an optional |
Just to be clear, I meant adding |
Adding the current implementation of I'm 👍 adding a callback param directly in |
I didn't have in mind simply moving the If I understand flatten correctly, the new implementation would make the |
👍 Sounds like a plan! I completely agree that @dpmcmlxxvi Feel free to send a PR to the |
Implemented in Turf v4.3 |
I still plan on updating |
Turf has a flatten method that creates a feature collection. It would be helpful to have a
flattenEach
method that traverses them with a callback without allocating them and consuming memory. I can submit a PR if there is interest in this feature.Note, this would likely introduce
helpers
as a dependency. Thehelpers
module in turn has no dependencies. So, this shouldn't be a problem unless it is desired to keep all these low level modules free of any dependencies.The text was updated successfully, but these errors were encountered: