3 ms·
I've actually implemented Haversine in a SQL query to find what can be summed up as "which of these moving things is closest to this thing right now". It's not
by ErroneousBosh 2mo ago
I've actually implemented Haversine in a SQL query to find what can be summed up as "which of these moving things is closest to this thing right now". It's not the tidiest, and I had to ask someone better at SQL than I am to make it entirely work, but it looks like it is easier than doing Vincenty.
I should try it, right?
Edit: I also wonder what's to be gained by being accurate to nanometres over the surface of a fairly inaccurate planet.
My application was to locate movable things to identify which was nearest to a moorland wildfire, where you need to be accurate to within about 1km at best - you don't need to drop the pin right on it, you'll know where you're going when you see it ;-)
- srean 2mo agoFor that application you needn't have bothered. On a sphere arc-length and Euclidean distance are monotonically related, so the minimizer would not have changed.