Get the great circle distance between WGS84 lat/long points
Usage
get_gcdist(pt1 = NULL, pt2 = NULL, units = c("m", "km", "rads"), simple = TRUE)
Arguments
- pt1
`sf` object with point geometry, `sfc_POINT` object, `sfg` point, data frame or matrix.
- pt2
`sf` object with point geometry, `sfc_POINT` object, `sfg` point, data frame or matrix.
- units
whether to return the great circle distance in meters, kilometers, or radians.
- simple
whether to return a numeric vector of distances or a `data.frame` containing start and end coordinates as well as distance.
Value
Numeric vector of point to point distances, or data frame of origin and destination coordinates accompanied by their distances.