distVincentySphere: 'Vincenty' (sphere) great circle distance

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/distVincentySphere.R

Description

The shortest distance between two points (i.e., the 'great-circle-distance' or 'as the crow flies'), according to the 'Vincenty (sphere)' method. This method assumes a spherical earth, ignoring ellipsoidal effects and it is less accurate then the distVicentyEllipsoid method.

Usage

1
distVincentySphere(p1, p2, r=6378137)

Arguments

p1

longitude/latitude of point(s). 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

r

radius of the earth; default = 6378137 m

Value

Distance value in the same unit as r (default is meters)

Author(s)

Robert Hijmans

References

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

See Also

distGeo, distVincentyEllipsoid, distHaversine, distCosine, distMeeus

Examples

1
distVincentySphere(c(0,0),c(90,90))

Example output

[1] 10018754

geosphere documentation built on May 2, 2019, 5:16 p.m.