spheroid_dist: Distance between two points on a spheroid
Description
Calculate the distance between two points on the surface of a spheroid
using Vincenty's formula. This function can be used when GIS libraries
for calculating distance are not available.
Usage
spheroid_dist(p1, p2)
Value
numerical vector with distance between two locations (in kilometers)
Arguments
p1
coordinates of the first point in decimal degrees (LON, LAT)
p2
coordinates of the second point in decimal degrees (LON, LAT)
p1 = c(18.633333, 54.366667) # longitude and latitude for Gdansk, PL p2 = c(17.016667, 54.466667) # longitude and latitude for Slupsk, PL spheroid_dist(p1, p2)