Haversine formula to calculate distances between points on the earth
Usage
deg.dist(
long1,
lat1,
long2,
lat2
)
Arguments
long1
longitude of location 1
lat1
latitude of location 1
long2
longitude of location 2
lat2
latitude of location 2
Value
Arc distance between two points on the Earth's surface in kilometers.
Details
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.
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