deg.dist {fossil} | R Documentation |
Haversine formula to calculate distances between points on the earth
deg.dist(lat1, long1, lat2, long2)
lat1 |
latitude of location 1 |
long1 |
longitude of location 1 |
lat2 |
latitude of location 2 |
long2 |
longitude of location 2 |
This function will calculate the shortest distance (portion of a Great Circle) in kilometers between two points on the Earth given their latitude and longitude.
Arc distance between two points on the Earth's surface in kilometers.
The distance calculated may be up to 0.2% inaccurate, as this function treats the Earth as a sphere with a circumference of 40003 km, rather than an ellipsoid like it actually is.
Matthew Vavrek
~put references to the literature/web site here ~
To calculate pairwise distances between a list of points see earth.dist
, or to calculate an area enclosed by three points on the Earth's surface, see earth.tri
##distance between 23 degrees N 54 degrees E and 32 degrees S 67 degrees E deg.dist(23,54,-32,67)