Replies: 1 comment
-
Thanks for asking this question @radi2015. Wonder if you can provide a bit more background please.
I'm not sure you can make this assertion on behalf of all Turf users. If some users want to measure from New York to London, Turf needs to cater to that.
If we're talking about the same thing, that is how the Haversine approach works behind the scenes. It converts the lat/lng into angular values and uses trig functions to calculate the distance on the surface of a 3D sphere. Does that run counter to what you're suggesting?
When you say "straight line" do you mean a line that ignores the curvature of the earth? Like shooting a laser through the dirt between one point on the surface and another? Also, are you able to quantify "more appropriate"? Quicker to calculate? More accurate? If you provide a bit more info that will help us answer your question. |
Beta Was this translation helpful? Give feedback.
-
I noticed that all the angles and distances in Turf.js are calculated based on the spherical surface. Is this really appropriate? Most geometric lines and surfaces in reality are only a few meters or tens of meters in size. There aren't that many scenarios where we need to calculate the distance and angle between New York and London. therefore, converting geographic coordinates to a 3D geocentric coordinate system and directly calculating the straight-line distance between two points might be more appropriate.
Beta Was this translation helpful? Give feedback.
All reactions