Distance between almost antipodes cities

1457
16
09-16-2017 01:54 AM
GB
by
New Contributor

Hello!

I would like to calculate distances between different pairs of cities that are almost at their antipodes. I was wondering if ArcGIS takes into account that given that the globe is not flat, there is two ways to reach the antipodes and one option is shortest of the other. For example I can calculate the distance from Lisbon to Auckland with a line that crosses Asia, or via a line that crosses America. I believe that the distance calculated via Asia, in this case, is longer that the one I would have via America. Does ArcGIS take into account this issue? And how can I address this issue in my analysis? Thank you.

0 Kudos
16 Replies
DanPatterson_Retired
MVP Emeritus

Great circle distance calculations can be done within ArcMap or Pro.

It you want to incorporate code into your analysis, then I have an example of implementing Vincenty's calculation on GitHub, and discussed here.  If your data are in tabular form then you can use the 'geodesic' option for the Add Geometry Attributes tool in ArcToolbox

GB
by
New Contributor

Thank you for your reply.

My original data come from excel, basically I have a table with the lat lon of a series of locations (more than 1000). I would like to calculate the distances of these locations with a specific european capital (which I can identify with lat lon coordinates).

Do I need any special shapefile when using the Add Geometry Attributes toolbox? If yes, where can I find them? I would like to add that as I have to calculate Great circle distance distances between this benchmark european capital and some locations in Antarctica. Your help is appreciated!

0 Kudos
DanPatterson_Retired
MVP Emeritus

make a featureclass by using the Excel to Table tool then use the X Y to Line tool to get geodesic distances

your excel table needs to be generically set up as

FromX  FromY  ToX ToY

that is, the X, Y (longitude latitudes) of each pair needs to form a column

0 Kudos
GB
by
New Contributor

I followed your advice but I have a problem: it is not calculating the lines between my reference point and the locations that are in its left (all the cities in the Americas are not considered). Why does it happen?

0 Kudos
GB
by
New Contributor

With reference to my previous question - I solved. I don't know why it happened, but in order to obtain the distances for all the locations, I have to put in the FROM X and FROM Y column the coordinates of the reference european capital, and in the column TO X and TO Y the coordinates of the other cities I had in my database. I was doing the opposite.

0 Kudos
DanPatterson_Retired
MVP Emeritus

So the suggestion worked, but you switched up the from to.  Shouldn't matter however,  'not calculating' means it returned an error? a zero?  a negative distance?  Use the Vincenty suggestion then

0 Kudos
GB
by
New Contributor

Can I add a new question? I would like to create straight lines between point, it is just a graphical issue, I am not interested in the accurateness of the distance now. Do you have any solutions? I think that xy to line doesn't allow me to do that.

0 Kudos
DanPatterson_Retired
MVP Emeritus

Did the previous solution work? you gave no indication

0 Kudos
GB
by
New Contributor

Hi,

I tried all the  options that xy to line permits, they work but I cannot obtain straight (Euclidian) lines. The problem is expecially for the line from a place in France and Fiji, If I am not wrong, as I would like to have a line crossing Asia, while xy to line creates a line that crosses the Atlantic Ocean. Thank you.

0 Kudos