The Vincenty formula computes the geodesic distance between two points on
an ellipsoidal model of the earth. Returns NA if the algorithm fails to
converge.
Usage
ga_dist_vincenty_pairwise(origin, dest)
Arguments
- origin
a GeoArrow point array of origin points
- dest
a GeoArrow point array; length 1 or the same length as origin
Value
a double vector of distance values in meters
Examples
# Raleigh to Charlotte, and Raleigh to Wilmington
origin <- ga_xy(c(-78.6382, -78.6382), c(35.7796, 35.7796))
dest <- ga_xy(c(-80.8431, -77.9447), c(35.2271, 34.2257))
as.vector(ga_dist_vincenty_pairwise(origin, dest))
#> [1] 209216.6 183645.3