Closed yivi closed 3 years ago
As an additional data-point, tried installing https://www.postgresql.org/docs/12/earthdistance.html, and got 24353.442403726403
when running:
SELECT earth_distance(ll_to_earth(40.5596,-3.6261), ll_to_earth(40.3518,-3.5362));
Putting these locations in a test (like here) I get a distance of about 24.326 km, so this seems perfectly fine.
I'm sorry, it's obviously something on my end. I'll try to figure it out later today.
My apologies, and thanks.
Can't figure this one out. I apologize in advance when it turns out I was being a moron. :(
For two given points:
The generated distance query (using
GEO_DISTANCE(40.3518,-3.5362,40.5596,-3.6261)
) is:Output for the above is 16.895781163873654
But actually the distance for these two points is ~24.3:![image](https://user-images.githubusercontent.com/1815039/121804160-4a856d00-cc45-11eb-8732-99328653ce82.png)
Caught this because the 7km difference is enough to show incorrect results in the query I'm working on.
Find hard to believe this is actually a bug on the package, yet I cannot see what else is going on here.