Last chance! 50% off unlimited learning
Sale ends in
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.
distVincentySphere(p1, p2, r=6378137)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
as above; or missing, in which case the sequential distance between the points in p1 is computed
radius of the earth; default = 6378137 m
Distance value in the same unit as r (default is meters)
distGeo, distVincentyEllipsoid, distHaversine, distCosine, distMeeus
# NOT RUN {
distVincentySphere(c(0,0),c(90,90))
# }
Run the code above in your browser using DataLab