View source: R/spatial_indexing_sf.R
closest_points | R Documentation |
Solve the nearest neighbour problem for two feature collections of points This is a simple wrap-up of the dbscan::kNN function
closest_points(origins, targets)
origins |
a feature collection of points |
targets |
a feature collection of points |
for each origin point, the index of the nearest target point
data(mtl_libraries)
data(mtl_theatres)
close_libs <- closest_points(mtl_theatres, mtl_libraries)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.