I am quite confused the way PostGIS is returning the result for this basic query.
So I am trying to find the distance between two points 45.2714,71.2087 and 42.3739,66.39
and the distance should be ~505 km
but when I ran the query (considering 1 degree = 111km)
select st_distance (st_setsrid(st_makepoint(71.2087,45.2714),4326),
st_setsrid(st_makepoint(66.39,42.3739),4326))*111 as d
I get the result as 624 km.
Can anyone please tell what I am doing wrong here ?
Thanks.