View source: R/profile_points.R
point_distance | R Documentation |
This uses the haversine formula (by default) to calculate the great-circle distance between two points, i.e., the shortest distance over the earth's surface.
point_distance(a, b, ...)
a |
lon, lat coordinate of point 1 |
b |
lon, lat coordinate of point 2 |
... |
parameters passed to |
units object giving the distance
berlin <- c(13.4, 52.517) # lon, lat
tokyo <- c(139.767, 35.7) # lon, lat
point_distance(berlin, tokyo)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.