distVincentyEllipsoid function

'Vincenty' (ellipsoid) great circle distance

'Vincenty' (ellipsoid) great circle distance

The shortest distance between two points (i.e., the 'great-circle-distance' or 'as the crow flies'), according to the 'Vincenty (ellipsoid)' method. This method uses an ellipsoid and the results are very accurate. The method is computationally more intensive than the other great-circled methods in this package. 1.1

distVincentyEllipsoid(p1, p2, a=6378137, b=6356752.3142, f=1/298.257223563)

Arguments

  • p1: longitude/latitude of point(s), in degrees 1; can be a vector of two numbers, a matrix of 2 columns (first one is longitude, second is latitude) or a SpatialPoints* object
  • p2: as above; or missing, in which case the sequential distance between the points in p1 is computed
  • a: Equatorial axis of ellipsoid
  • b: Polar axis of ellipsoid
  • f: Inverse flattening of ellipsoid

Details

The WGS84 ellipsoid is used by default. It is the best available global ellipsoid, but for some areas other ellipsoids could be preferable, or even necessary if you work with a printed map that refers to that ellipsoid. Here are parameters for some commonly used ellipsoids:

ellipsoidabf
WGS8463781376356752.31421/298.257223563
GRS8063781376356752.31411/298.257222101
GRS6763781606356774.7191/298.25
Airy 18306377563.3966356256.9091/299.3249646
Bessel 18416377397.1556356078.9651/299.1528434
Clarke 18806378249.1456356514.869551/293.465
Clarke 18666378206.46356583.81/294.9786982
International 192463783886356911.9461/297
Krasovsky 1940637824563568631/298.2997381

a is the 'semi-major axis', and b is the 'semi-minor axis' of the ellipsoid. f is the flattening. Note that f = (a-b)/a

more info: https://en.wikipedia.org/wiki/Reference_ellipsoid

Returns

Distance value in the same units as the ellipsoid (default is meters)

References

Vincenty, T. 1975. Direct and inverse solutions of geodesics on the ellipsoid with application of nested equations. Survey Review Vol. 23, No. 176, pp88-93. Available here:

https://www.movable-type.co.uk/scripts/latlong-vincenty.html

https://en.wikipedia.org/wiki/Great_circle_distance

Author(s)

Chris Veness and Robert Hijmans

See Also

distGeo, distVincentySphere, distHaversine, distCosine, distMeeus

Examples

distVincentyEllipsoid(c(0,0),c(90,90)) # on a 'Clarke 1880' ellipsoid distVincentyEllipsoid(c(0,0),c(90,90), a=6378249.145, b=6356514.86955, f=1/293.465)
  • Maintainer: Robert J. Hijmans
  • License: GPL (>= 3)
  • Last published: 2024-10-04

Useful links