Turf design direction #2470
Replies: 1 comment 3 replies
-
Hi @smallsaucepan. Great questions and a couple thoughts from me as a fairly new and somewhat inactive maintainer. My sense is that there is no one active maintainer that knows exactly what type of algorithm/approach is used for each function. The docs don't/never covered it, and in many/most cases the code comments don't specify either. So what's the right approach here? I've pondered that the path out of this starts with:
In terms of offering a choice of the approach used for each function, I would look to how other projects tackle this in the geo space. I think this is a level up in complexity and is exactly what turf struggled to grow into.
|
Beta Was this translation helpful? Give feedback.
-
Hi all.
Have been using Turf for a few years now. Recently though have needed to come to grips with a few bugs, and would like to submit a PR or two. Fixing some of the bugs could have (positive) flow on effects in other areas as well e.g. #1726 . Had some questions for the community / maintainers first though.
Saw a comment along the line of Turf uses different approaches in different areas and it's not really defined anywhere which it should be. Note I'm paraphrasing here! Is that still generally true? What's the best way to determine the correct approach?
For example #1726 above might be because Turf uses great circle calculations for distance, and the other systems mentioned use an ellipsoid. Should Turf do the same? Offer both? And would we make the default the current one (so as not to break anything) or the more appropriate / accurate / widely accepted one (to avoid building up technical debt)?
Appreciate any insights you can provide :)
Thanks
James
Beta Was this translation helpful? Give feedback.
All reactions