# How to calculate large distance taking the Earth curvature into consideration

713
4
10-16-2012 09:50 AM
New Contributor
I want to calculate distance of two points that is far away and at different place on Earth, for example flight-distance between major cities around the world.  It will be desirable to take the Earth curvature into the calculation.  Dose the "Distance or Near" function in ArcGIS do this?  I don't believe so.  How to do this and is there a script exist to do this?

Tags (3)
1 Solution

Accepted Solutions
Occasional Contributor III
4 Replies
Frequent Contributor
Ming,

In the Nautical Solution Extension you can use the Production Feature Builder to create great circle distances:

http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//0106000001rr000000

Link to the extension site, not sure how much it is but you can download a 60 day trial:

http://www.esri.com/software/arcgis/extensions/nautical-solution/what-you-get

Regards

Anthony
Occasional Contributor III
New Contributor
Hi Anthony & dmhoneycutt,

From Anthony's replay I learned that the problem is referring as "great circle distances".  I did further Google search and found the math formula for solve it in this site: http://en.wikipedia.org/wiki/Great-circle_distance.

Because I plan to do the calculation with c# code anyway (for special selection and post processing), I can use the formula to calculate the great-circle distance.

dmhoneycutt's replay prompt me to do a search in the ESRI SDK help, I found there is some interface to get the great-circle distance of two points.  So I can skip the formula and direct use the interface.

Thanks both of you for opening the door for me!

Ming
Frequent Contributor
Ming,

You can use the Haversine formula to calculate the distance, here is a site that has the code in various languages:

http://www.codecodex.com/wiki/Calculate_Distance_Between_Two_Points_on_a_Globe

You will find that the haversine formula can have an error of nearly 3%.

A better formula to use is the Vincenty formula which is more accurate, there are loads of examples out there: