Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/distVincentyEllipsoid.R
The shortest distance between two points (i.e., the 'greatcircledistance' 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 greatcircled methods in this package.
1  distVincentyEllipsoid(p1, p2, a=6378137, b=6356752.3142, f=1/298.257223563)

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 
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:
ellipsoid  a  b  f 

WGS84  6378137  6356752.3142  1/298.257223563 

GRS80  6378137  6356752.3141  1/298.257222101 

GRS67  6378160  6356774.719  1/298.25 

Airy 1830  6377563.396  6356256.909  1/299.3249646 

Bessel 1841  6377397.155  6356078.965  1/299.1528434 

Clarke 1880  6378249.145  6356514.86955  1/293.465 

Clarke 1866  6378206.4  6356583.8  1/294.9786982 

International 1924  6378388  6356911.946  1/297 

Krasovsky 1940  6378245  6356863  1/298.2997381 

a
is the 'semimajor axis', and b
is the 'semiminor axis' of the ellipsoid. f
is the flattening.
Note that f = (ab)/a
more info: http://en.wikipedia.org/wiki/Reference_ellipsoid
Distance value in the same units as the ellipsoid (default is meters)
Chris Veness and Robert Hijmans
Vincenty, T. 1975. Direct and inverse solutions of geodesics on the ellipsoid with application of nested equations. Survey Review Vol. 23, No. 176, pp8893. Available here:
http://www.movabletype.co.uk/scripts/latlongvincenty.html
http://en.wikipedia.org/wiki/Great_circle_distance
distGeo, distVincentySphere, distHaversine, distCosine, distMeeus
1 2 3  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)

Loading required package: sp
[1] 10001966
[1] 10001868
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.