Description Usage Arguments Value Author(s) Examples
Computes the great circle distance between two points given their latitude and longitude (in decimal degrees) using the haversine formula. The output is the distance between the two points in the same units as the input 'r' (default is meters)
1 | haversine(lon1, lat1, lon2, lat2, r = 6378137)
|
lon1 |
longitude of first point |
lat1 |
latitude of first point |
lon2 |
longitude of second point |
lat2 |
latitude of second point |
r |
radius of earth (default is in meters) |
Outputs a scalar giving the great circle distance in the same units as the input radius.
Michael Malick
1 | haversine(-147, 48, -154, 49)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.