Geographical distance explained

Geographical distance or geodetic distance is the distance measured along the surface of the Earth, or the shortest arch length.

The formulae in this article calculate distances between points which are defined by geographical coordinates in terms of latitude and longitude. This distance is an element in solving the second (inverse) geodetic problem.

Introduction

Calculating the distance between geographical coordinates is based on some level of abstraction; it does not provide an exact distance, which is unattainable if one attempted to account for every irregularity in the surface of the Earth.[1] Common abstractions for the surface between two geographic points are:

All abstractions above ignore changes in elevation. Calculation of distances which account for changes in elevation relative to the idealized surface are not discussed in this article.

Classification of Formulae based on Approximation

|\DeltaDerror|\proptoD3

|\DeltaDerror|\proptoD

f1

: Andoyer(1932); Andoyer-Lambert(1942),

f2

: Andoyer-Lambert-Thomas(1970),

f3

: Vincenty(1975),

f6

: Kaney(2011);

\Delta|Derror|\proptoD

on the hemisphere

The theoretical estimations of error are added in above and

f

is the flattening of the Earth.

Nomenclature

Arc distance,

D,

is the minimum distance along the surface of sphere/ellipsoid calculated between two points,

P1

and

P2

. Whereas, the tunnel distance, or chord length,

Drm{t}

, is measured along Cartesian straight line. The geographical coordinates of the two points, as (latitude, longitude) pairs, are

(\phi1,λ1)

and

(\phi2,λ2),

respectively. Which of the two points is designated as

P1

is not important for the calculation of distance.

Latitude

\phi

and longitude

λ

coordinates on maps are usually expressed in degrees. In the given forms of the formulae below, one or more values must be expressed in the specified units to obtain the correct result. Where geographic coordinates are used as the argument of a trigonometric function, the values may be expressed in any angular units compatible with the method used to determine the value of the trigonometric function. Many electronic calculators allow calculations of trigonometric functions in either degrees or radians. The calculator mode must be compatible with the units used for geometric coordinates.

Differences in latitude and longitude are labeled and calculated as follows:

\begin{align} \Delta\phi&=\phi2-\phi1;\\ \Deltaλ&2-λ1. \end{align}

It is not important whether the result is positive or negative when used in the formulae below.

"Mean latitude" is labeled and calculated as follows:

\phi
m=\phi1+\phi2
2

.

Unless specified otherwise, the radius of the Earth for the calculations below is:

R

= 6,371.009 kilometers = 3,958.761 statute miles = 3,440.069 nautical miles.

D

= Distance between the two points, as measured along the surface of the Earth and in the same units as the value used for radius unless specified otherwise.

Singularities and discontinuity of latitude/longitude

The approximation of sinusoidal functions of

\Deltaλ

, appearing in some flat-surface formulae below, may induce singularity and discontinuity. It may also degrade the accuracy in the case of higher latitude.

Longitude has singularities at the Poles (longitude is undefined) and a discontinuity at the ±180° meridian. Also, planar projections of the circles of constant latitude are highly curved near the Poles. Hence, the above equations for delta latitude/longitude (

\Delta\phi

,

\Deltaλ

) and mean latitude (

\phim

) may not give the expected answer for positions near the Poles or the ±180° meridian. Consider e.g. the value of

\Deltaλ

("east displacement") when

λ1

and

λ2

are on either side of the ±180° meridian, or the value of

\phim

("mean latitude") for the two positions (

\phi1

=89°,

λ1

=45°) and (

\phi2

=89°,

λ2

=−135°).

If a calculation based on latitude/longitude should be valid for all Earth positions, it should be verified that the discontinuity and the Poles are handled correctly. Another solution is to use n-vector instead of latitude/longitude, since this representation does not have discontinuities or singularities.

Flat-surface approximation formulae for very short distance

A planar approximation for the surface of the Earth may be useful over very small distances. It approximates the arc length,

D

, to the tunnel distance,

Drm{t}

, or omits the conversion between arc and chord lengths shown below.

The shortest distance between two points in plane is a Cartesian straight line. The Pythagorean theorem is used to calculate the distance between points in a plane.

Even over short distances, the accuracy of geographic distance calculations which assume a flat Earth depend on the method by which the latitude and longitude coordinates have been projected onto the plane. The projection of latitude and longitude coordinates onto a plane is the realm of cartography.

The formulae presented in this section provide varying degrees of accuracy.

Spherical Earth approximation formulae

This formula takes into account the variation in distance between meridians with latitude:

\begin{align} D&=R\sqrt{\left(2\sin

\Delta\phi
2

\cos

\Deltaλ
2

\right)2+\left(2\cos\phirm{m}\sin

\Deltaλ
2

\right)2}\\ &R\sqrt{\left(\Delta\phi\cos

\Deltaλ
2

\right)2+\left(2\cos\phirm{m}\sin

\Deltaλ
2

\right)2}. \end{align}

In the case of medium or low latitude

The above is furthermore simplified by approximating sinusoidal functions of

\Deltaλ
2
, justified except for high latitude:
2}
D=R\sqrt{(\Delta\phi)
m)\Deltaλ)
.

This approximation is very fast and produces fairly accurate result for small distances . Also, when ordering locations by distance, such as in a database query, it is faster to order by squared distance, eliminating the need for computing the square root.

Ellipsoidal Earth approximation formulae

The above formula is extended for ellipsoidal Earth:

D=\sqrt{\left(M\left(\phirm{m}\right)\Delta\phi\cos

\Deltaλ
2

\right)2+\left(2N\left(\phirm{m}\right)\cos\phirm{m}\sin

\Deltaλ
2

\right)2}

,where

M

and

N

are the meridional and its perpendicular, or "normal", radii of curvature of Earth (See also "Geographic coordinate conversion" for their formulas).

It is derived by the approximation of

\left(\cos

\phi
rm{m}\sin\Deltaλ
2

\Delta\phi\right)20

in the square root.

In the case of medium or low latitude

The above is furthermore simplified by approximating sinusoidal functions of

\Deltaλ
2
, justified except for high latitude:[2] [3]
2+(N(\phi
D=\sqrt{(M(\phi
m)\cos\phi
2}.
m\Deltaλ)

FCC's formula

The FCC prescribes the following formulae for distances not exceeding 475km (295miles):[4]

2},
D=\sqrt{(K
2\Deltaλ)

where

D

= Distance in kilometers;

\Delta\phi

and

\Deltaλ

are in degrees;

\phim

must be in units compatible with the method used for determining

\cos\phim;

\begin{align} K1&=111.13209-0.56605\cos(2\phim)+0.00120\cos(4\phim);\\ K2&=111.41513\cos(\phim)-0.09455\cos(3\phim)+0.00012\cos(5\phim).\end{align}

Where

K1

and

K2

are in units of kilometers per arc degree. They are derived from radii of curvature of Earth as follows:

K1=M(\phi

m)\pi
180

= kilometers per arc degree of latitude difference;

K2=\cos(\phim)N(\phi

m)\pi
180

= kilometers per arc degree of longitude difference;

Note that the expressions in the FCC formula are derived from the truncation of the binomial series expansion form of

M

and

N

, set to the Clarke 1866 reference ellipsoid. For a more computationally efficient implementation of the formula above, multiple applications of cosine can be replaced with a single application and use of recurrence relation for Chebyshev polynomials.

Polar coordinate flat-Earth formula

2
D=R\sqrt{\theta
2 - 2\theta

1\theta2\cos(\Deltaλ)},

where the colatitude values are in radians:

\theta=\pi
2

-\phi.

For a latitude measured in degrees, the colatitude in radians may be calculated as follows:

\theta=\pi
180

(90\circ-\phi).

Spherical-surface formulae

See main article: Great-circle distance. If one is willing to accept a possible error of 0.5%, one can use formulas of spherical trigonometry on the sphere that best approximates the surface of the Earth.

The shortest distance along the surface of a sphere between two points on the surface is along the great-circle which contains the two points.

The great-circle distance article gives the formula for calculating the shortest arch length

D

on a sphere about the size of the Earth. That article includes an example of the calculation. For example, from tunnel distance

Drm{t}

,

D=2R\arcsin

Drm{t
}.

For short distances (

D\llR

),

D=Drm{t}\left(1+

1\left(
24
Drm{t
}\right)^2 + \cdots \right).

Tunnel distance

A tunnel between points on Earth is defined by a Cartesian line through three-dimensional space between the points of interest.The tunnel distance

Drm{t}=2R\sin

D
2R
is the great-circle chord length and may be calculated as follows for the corresponding unit sphere:

\begin{align} \Delta{X}&=\cos(\phi2)\cos(λ2)-\cos(\phi1)\cos(λ1);\\ \Delta{Y}&=\cos(\phi2)\sin(λ2)-\cos(\phi1)\sin(λ1);\\ \Delta{Z}&=\sin(\phi2)-\sin(\phi1);\\ D

2
rm{t}&=R\sqrt{(\Delta{X})

+(\Delta{Y})2+(\Delta{Z})2}\\ &=2R

2\Delta\phi
2
\sqrt{\sin

+

2\Delta\phi
2
\left(\cos

-

2\Deltaλ
2
\sin
rm{m}\right)\sin
} \\&= 2 R \sqrt.\end

Ellipsoidal-surface formulae

See main article: Geodesics on an ellipsoid.

An ellipsoid approximates the surface of the Earth much better than asphere or a flat surface does. The shortest distance along the surfaceof an ellipsoid between two points on the surface is along thegeodesic. Geodesics follow more complicated paths than greatcircles and in particular, they usually don't return to their startingpositions after one circuit of the Earth. This is illustrated in thefigure on the right where f is taken to be 1/50 to accentuate theeffect. Finding the geodesic between two points on the Earth, theso-called inverse geodetic problem, was the focus of manymathematicians and geodesists over the course of the 18th and 19thcenturies with major contributions byClairaut,[5] Legendre,[6] Bessel,[7] and Helmert English translation of Astron. Nachr. 4, 241–254 (1825). Errata.[8] Rapp[9] provides a good summary of this work.

Methods for computing the geodesic distance are widely available ingeographical information systems, software libraries, standaloneutilities, and online tools. The most widely used algorithm is byVincenty,[10] who uses a series which is accurate to third order in the flattening ofthe ellipsoid, i.e., about 0.5 mm; however, the algorithm fails toconverge for points that are nearly antipodal. (Fordetails, see Vincenty's formulae.) This defect is cured in thealgorithm given byKarney,[11] who employs series which are accurate to sixth order in the flattening.This results in an algorithm which is accurate to full double precisionand which converges for arbitrary pairs of points on the Earth. Thisalgorithm is implemented in GeographicLib.[12]

The exact methods above are feasible when carrying out calculations on acomputer. They are intended to give millimeter accuracy on lines of anylength; one can use simpler formulas if one doesn't need millimeteraccuracy, or if one does need millimeter accuracy but the line is short.

The short-line methods have been studied by several researchers. Rapp,[13] Chap. 6, describes the Puissant method,the Gauss mid-latitude method, and the Bowring method.[14] Karl Hubeny[15] got the expanded series of Gauss mid-latitude one represented as the correction to flat-surface one.

Lambert's formula for long lines

f

.[16] [17]

Lambert's formulae[18] use the first-order correction and reduced latitude,

\beta=\arctan\left((1-f)\tan\phi\right)

, for better accuracy. They give accuracy on the order of 10 meters over thousands of kilometers.

First convert the latitudes

\scriptstyle\phi1

,

\scriptstyle\phi2

of the two points to reduced latitudes

\scriptstyle\beta1

,

\scriptstyle\beta2

.Then calculate the central angle

\sigma

in radians between two points

(\beta1,λ1)

and

(\beta2,λ2)

on a sphere using the Great-circle distance method (haversine formula), with longitudes

λ1

and

λ2

being the same on the sphere as on the spheroid.

P=

\beta1+\beta2
2

   Q=

\beta2-\beta1
2

X=(\sigma-\sin\sigma)

\sin2P\cos2Q
\cos2
\sigma
2

      Y=(\sigma+\sin\sigma)

\cos2P\sin2Q
\sin2
\sigma
2

D = a \bigl(\sigma - \tfrac f2 (X + Y) \bigr) ,

where

a

is the equatorial radius of the chosen spheroid.

On the GRS 80 spheroid Lambert's formula is off by

0 North 0 West to 40 North 120 West, 12.6 meters

0N 0W to 40N 60W, 6.6 meters

40N 0W to 40N 60W, 0.85 meter

Gauss mid-latitude method for short lines

It has the similar form of the arc length converted from tunnel distance. Detailed formulas are given by Rapp,[13] §6.4. It is consistent with the above-mentioned flat-surface formulae apparently.

D=2N\left(\phirm{m}\right)\arcsin\sqrt{\left(\sin

\Deltaλ
2
2
\cos\phi
rm{m}\right)

+\left(\cos

\Deltaλ
2

\sin\left(

\Delta\phi
2
M\left(\phirm{m
\right)}{N\left(\phi
2}.
rm{m}\right)}\right)\right)

Bowring's method for short lines

Bowring maps the points to a sphere of radius R′, with latitude and longitude represented as φ′ and λ′. Define

A=\sqrt{1+e'2\cos4\phi1},B=\sqrt{1+e'2\cos2\phi1},

where the second eccentricity squared is

e'2=

a2-b2
b2

=

f(2-f)
(1-f)2

.

The spherical radius is

R'=

\sqrt{1+e'2
} a.(The Gaussian curvature of the ellipsoid at φ1 is 1/R′2.)The spherical coordinates are given by

\begin{align} \tan\phi1'&=

\tan\phi1
B,\\ \Delta\phi'

&=

\Delta\phi
B

l[1+

3e'2
4B2

(\Delta\phi)\sin(2\phi1+\tfrac23\Delta\phi)r],\\ \Deltaλ'&=A\Deltaλ, \end{align}

where

\Delta\phi=\phi2-\phi1

,

\Delta\phi'=\phi2'-\phi1'

,

\Deltaλ=λ2-λ1

,

\Deltaλ'2'1'

. The resulting problem on the sphere may be solved using the techniques for great-circle navigation to give approximations for the spheroidal distance and bearing. Detailed formulas are given by Rapp[13] §6.5, Bowring,[14] and Karney.[19]

Altitude correction

The variation in altitude from the topographical or ground level down to the sphere's or ellipsoid's surface, also changes the scale of distance measurements.[20] The slant distance s (chord length) between two points can be reduced to the arc length on the ellipsoid surface S as:[21]

S-s=-0.5(h1+h2)s/R-0.5(h1-h

2/s
2)
where R is evaluated from Earth's azimuthal radius of curvature and h are ellipsoidal heights are each point. The first term on the right-hand side of the equation accounts for the mean elevation and the second term for the inclination.A further reduction of the above Earth normal section length to the ellipsoidal geodesic length is often negligible.[21]

See also

External links

Notes and References

  1. Web site: The British Cartographic Society > How long is the UK coastline? . 2008-12-06 . 2012-05-22 . https://web.archive.org/web/20120522042745/http://www.cartography.org.uk/default.asp?contentID=749 . dead .
  2. Web site: Aviation Formulary. . Williams . E. . 2013. 2024-06-23.
  3. Web site: Navigation on the spheroidal earth. . Williams . E. . 2002. 2023-11-28.
  4. Reference points and distance computations. Code of Federal Regulations (Annual Edition). Title 47: Telecommunication.. October 1, 2016. 73. 208. 8 November 2017.
  5. Clairaut. A. C.. 1735. Détermination géometrique de la perpendiculaire à la méridienne tracée par M. Cassini. Geometrical determination of the perpendicular to the meridian drawn by Jacques Cassini. fr. Mémoires de l'Académie Royale des Sciences de Paris 1733. 406 - 416. Alexis Claude Clairaut.
  6. Legendre. A. M.. 1806. Analyse des triangles tracées sur la surface d'un sphéroïde. Analysis of spheroidal triangles. fr. Mémoires de l'Institut National de France. 1st semester. 130 - 161. Adrien-Marie Legendre.
  7. . Bessel . F. W.. Friedrich Bessel. 2010. 10.1002/asna.201011352. The calculation of longitude and latitude from geodesic measurements. Astronomische Nachrichten. 331 . 8 . 852 - 861. 0908.1824. 1825. . Translated by C. F. F. Karney & R. E. Deakin. . . 2010AN....331..852K. 118760590 .
  8. Book: Helmert , F. R. . . 1964. 1880. Mathematical and Physical Theories of Higher Geodesy. 1. Aeronautical Chart and Information Center. St. Louis. Friedrich Robert Helmert. . . English translation of Die Mathematischen und Physikalischen Theorieen der Höheren Geodäsie, Vol. 1 (Teubner, Leipzig, 1880).
  9. R. H. . Rapp . Geometric Geodesy, Part II . Ohio State University . March 1993 . 2011-08-01.
  10. T. . Vincenty . Thaddeus Vincenty . Direct and Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations . Survey Review . 23 . 176 . April 1975 . 88 - 93 . 10.1179/sre.1975.23.176.88 . 2009-07-11 . . Addendum: Survey Review 23 (180): 294 (1976)..
  11. Karney . C. F. F. . 10.1007/s00190-012-0578-z . Algorithms for geodesics . Journal of Geodesy . 87 . 43–55. 2013. 1. 1109.4448 . 2013JGeod..87...43K . 119310141 . – (open access). Addenda.
  12. Web site: GeographicLib. Karney. C. F. F.. 1.32. 2013.
  13. Rapp. R, H. Geometric Geodesy, Part I. 1991. Ohio Start Univ.. 1811/24333.
  14. Bowring. B. R.. The direct and inverse problems for short geodesic lines on the ellipsoid. Surveying and Mapping. 41. 2. 1981. 135 - 141.
  15. Hubeny, K. (1954). Entwicklung der Gauss'schen Mittelbreitenformeln, Österreichische Zeitschrift für Vermessungswesen.
  16. Book: Forsyth, A. R. . 1927. Andrew Forsyth. Calculus of Variations. Cambridge Univ. Press. 978-1-107-64083-2. 250050479. .
  17. [Marie_Henri_Andoyer|Henri Andoyer]
  18. Lambert. W. D. The distance between two widely separated points on the surface of the earth. J. Washington Academy of Sciences. 1942. 32. 5. 125 - 130.
  19. Web site: GeographicLib: Geodesics on an ellipsoid of revolution . 2024-08-04 . geographiclib.sourceforge.io . en-US.
  20. Web site: Archived copy . 2014-08-26 . dead . https://web.archive.org/web/20140827072956/http://www.tech.mtu.edu/courses/su3150/Reference%20Material/Vincenty.pdf . 2014-08-27 .
  21. Torge & Müller (2012) Geodesy, De Gruyter, p.249