Hello, i am trying to figure out how to calculate the distance between set sets of lat / longs. In excel i would use the following formula. C2,G2 (Y Coord), D2,H2 (X Coord) are cell references, and i'm calculating distance in nautical miles hence the 3440.65.
=ACOS(COS(RADIANS(90-C2))*COS(RADIANS(90-G2))+SIN(RADIANS(90-C2))*SIN(RADIANS(90-G2))*COS(RADIANS(D2-H2)))*3440.65
How would i go about doing this in alteryx?
Thanks in advance!
Solved! Go to Solution.
Both replies are really useful, i'm going to look at these today and i'll let you know if I have managed to get my data sorted out. Thanks!
Thanks very much, using these examples i was able to make my two sets of lat/longs spatial points, and then convert to nautical miles using a simple formula. Thanks!
I found a really simple way to do this, and just turned my two sets of lat/longs into centroids, join them back into the data, use the distance tool and its done! The formula converts miles into mautical miles for what i'm doing as nautical miles is not a standard measure in the distance tool.
Using latitude and longitude to get the distance between the two regions gives point to point distance rather than the by road distance. So is there a way to get the by road distance between two points.
User | Count |
---|---|
17 | |
15 | |
15 | |
8 | |
6 |