powered by
Calculation of the euclidean distance between two points with stated coordinates (lat, lon)
dist.calc(lat1, lon1, lat2, lon2, unit = "km")
Latitude of the regarded start point
Longitude of the regarded start point
Latitude of the regarded end point
Longitude of the regarded end point
Unit of the resulting distance: unit="m" for meters, unit="km" for kilometers or unit="miles" for miles
unit="m"
unit="km"
unit="miles"
A single numeric value
dist.buf, dist.mat
dist.buf
dist.mat
# NOT RUN { dist.calc(51.556307, 9.947375, 49.009603, 8.417004) # about 304 kilometers # }
Run the code above in your browser using DataLab