Description Usage Arguments Value Note
Find the nearest neighbour to a given origin
1 | get_nearest_neighbour(origin, candidates)
|
origin |
A numeric vector of length two containing respectively the longitude and latitude coordinate of the origin location. |
candidates |
A |
A list of length two with element idx containing the index of the nearest neighbour and element dist containing the distance to it.
Coordinates should be expressed in coordinate reference system EPSG:4326. The function assumes this to be true, and does not check for it.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.