4

Given a SINGLE longitude coordinate in decimal degrees, how do I calculate the distance in miles or km between latitude 0 and 1 at that longitude? ie what is the formula?

For example, given 51.43567 longitude, what is the distance between 0 latitude and 1 latitude at that longitude?

Note, that I do not want any radius around the point. Just a single number in miles or km.


EDIT: I posed the wrong question above. The correct one is below. I recognise the mkenndy's answer still points to the correct formula in one way or another, however, I need the point in bold below clearly set out.


Given a SINGLE latitude coordinate in decimal degrees, how do I calculate the distance in miles or km between any longitude at that latitude? ie what is the formula?

For example, without any concept of distance *, given 51.43567 latitude, what is the distance between 1 and 2 longitiude at that latitude?

.* known distances between longitude decimal degrees are only the equator and the poles.

The answer should just be a single number in miles or km.

Please use my example and show clear workings out in your answer to give the answer in miles or km.

4

5 Answers 5

6

Marc's answer and its linked answers assume the earth is a sphere. Simplified equations for a sphere are:

Length of a radian of latitude = R
Length of a radian of longitude = R * cos (lat)

where R = radius of earth model, lat = latitude is in radians.

The equations on an ellipsoid are:

Length of a radian of latitude = a*(1.0 - e*e) / (1.0 - e*e*sin(lat)*sin(lat))**(3/2)

a = semimajor axis (use the unit that you want the answer in)
b = semiminor axis
e = sqrt(2*f - f*f) = (a*a - b*b)/(a*a)
f = flattening
** = raised to the power of

Length of a radian of longitude = a*cos(lat) / (1.0 - e*e*sin(lat)*sin(lat))**(1/2)

Note: If you want the answer in miles or any other linear unit, define the a (and b if used) values in the same unit OR convert after the calculation. Default is usually to use 6378137.0 meters for 'a' which would give a length in meters.

The equations as given return the length of a radian of longitude or latitude, respectively. To get the length of a degree instead, multiple each equation by:

PI/180.0

As a check, the approximate length of a degree of longitude at the equator is 111 km as is the length of a degree of latitude everywhere (varies from about 110.5 to 111.7). The length of a degree of longitude will shorten as the latitude increases. At 45 N or S, the length is under 80 km, for instance.

See John P. Snyder's Map Projections: A Working Manual (PDF), PDF pages 36-37 or actual document pages 24-25.

5
  • Guilty of overthinking the problem! Aug 10, 2017 at 19:17
  • Thx. Are you able to use my example with your formula to give the answer in miles, including working out?
    – dewd
    Aug 10, 2017 at 23:07
  • Defining the a and b values in miles will give an output in miles of a radian or latitude or longitude. To get the linear equivalent of a degree, add *(PI/180) to the equations.
    – mkennedy
    Aug 10, 2017 at 23:11
  • @mkennedy Please see my amended question. Apologies that I'm not a trig or algebra man, so as simplified an answer you can give, I'd appreciate it. I'm a stackoverflow veteran so I'm a bit like a fish out of water here.
    – dewd
    Aug 11, 2017 at 18:39
  • 1
    I've added more more info and incorporated the comments, but you need to help with what you're having problems with. If you put together your own code, but the answers don't look right, post the code and what you're getting and we can check it.
    – mkennedy
    Aug 11, 2017 at 18:52
2

To convert a given latitude into the approximate distance in miles between 1 longitude at that point:

(90 - Decimal degrees) * Pi / 180 * 69.172

Note: if the answer is a minus number, multiply it by -1

In the example given the calculation is as follows:

(90 - 51.43567) * 3.1415927 / 180 * 69.172 with the answer being ~47 miles.

1

I think the Haversine formula would work, just set the two longitude variables to the same value.

Here's another SE discussion of the formula in Javascript.

You could also use the Law of Cosines.

0

Taken from: Navigation by a.c. gardner example: at Lat 50 degrees 10deg Long w to 20 deg Long w = 600 miles cosine 50 degrees-.6428 x 600 = 385 nautical miles.

0

To calculate the number of nautical miles in one degree of longitude at a given latitude, take the cosine of the latitude then multiply by 60. If you want the answer to be in other units, convert the desired unit to nm then multiply. One nm equals 1.852 km. 1.852 km x 60=111.12 km. So, cosine of latitude x 111.12= km in 1 degree of longitude. Example cos(35)° latitude x 60=49.149 nautical miles. OR - cos(35)° latitude x 111.12=91.024 km. I have tested this a lot and it seems to give good results.

Your Answer

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

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