I have longtitude and lattitude coordinates of one point and spherical distance between this and another point on Earth in kilometers (the shortest distance over the earth’s surface). I need to calculate what is the distance between these points in straight line. Can anybody help?

  • 1
    Do you have those two points or just the distance-value?
    – Matte
    Commented Oct 20, 2016 at 14:45
  • I have one of them and the distance. Commented Oct 20, 2016 at 15:25

1 Answer 1


Thanks to trigonometric functions we know that


where d is your spherical distance, r is the earth radius in km, and e stands for "euclidian".

Since the earth is only approximately spherical, you should consider Matte's comment. Indeed,

Distances from points on the surface to the center range from 6,353 km to 6,384 km (3,947–3,968 mi). Several different ways of modeling the Earth as a sphere each yield a mean radius of 6,371 km (3,959 mi).
  • Depending on the needed accuracy and position of the points the radius is for example 6378 on equator of the wgs84 spheroid. It depends on what formula was used to calculate the original distance (haversine vs vincenty). As a rough estimation it is commonly said that it may have an error up to 0,5% if you use earth as a sphere.
    – Matte
    Commented Oct 20, 2016 at 16:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.