Monday 11 April 2016

How to calculate straight line distance from spherical distance


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?



Answer



Thanks to trigonometric functions we know that


d=2sin2


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).




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...