Description Usage Arguments Details Examples
caculate the spherical distance between 2 point on earth
1 | distanceCaculate(lon_1, lat_1, lon_2, lat_2, r = 6378137)
|
lon_1, lon_2 |
numeric, degree longitude |
lat_1, lat_2 |
numeric, degree latitude |
r |
earth radius from |
although geosphere::distHaversine
can caculate the spherical distance,
distanceCaculate
is about 20X-30X faster than that,
and only has error less than 0.2%.
1 | distanceCaculate(108.8821, 34.2341, 108.882, 34.2343)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.