surfaceDistance | R Documentation |
The surfaceDistance() function calculates the distance in kilometers between any two lat-lon pairs using the Haversine equation.
surfaceDistance(lat1_deg, lon1_deg, lat2_deg, lon2_deg)
lat1_deg |
latitude 1 (degrees) |
lon1_deg |
longitude 1 (degrees) |
lat2_deg |
latitude 2 (degrees) |
lon2_deg |
longitude 2 (degrees) |
Distance in kilometers
Jonathan Callahan jonathan@mazamascience.com
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.