I try to calculate the distance between two geogprahical points, using st_distance
. The points are stored in a data frame, but for simplicity, I take one pair of points to show the problem.
Here are the two points (an example of a pair of points):
a <-st_sfc(st_point(c(70.321117, 22.896517)))
b <-st_sfc(st_point(c(68.743738549303, 17.0129893190695)))
st_distance(a,b)
Which returns 6.09
.
I understand this should be a distance in degrees, and to calculate the same in km I need to multiply by 111 km. But the distance seems to be too large (ca 666 km), compared to online calculators of great circle distance (I got 293 km).
Why is the difference so large? I do I calculate the distances in a wrong way?
m
. – Erik Aug 11 '20 at 15:00