I get an unexpected value from a PostGIS distance request, and I'm not sure why. I am trying to find the distance between two points on Earth.
SELECT ST_Distance(
ST_Point(50.7678,6.091499)::geography,
ST_Point(52.525592,13.369545)::geography
) as distance;
... returns 827757.672533206, or about 827.7 km.
However, if I calculate this distance using the open source library that I use, or using any of several online calculators, I get 538.6km. Something is clearly wrong.
What am I doing wrong?
source
share