k-Nearest Neighbor Join for Spatial Data

K-nearest neighbor search for projected and non-projected 'sf' spatial layers. Nearest neighbor search uses (1) C code from 'GeographicLib' for lon-lat point layers, (2) function knn() from package 'nabor' for projected point layers, or (3) function st_distance() from package 'sf' for line or polygon layers. The package also includes several other utility functions for spatial analysis.


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("nngeo")

0.4.8 by Michael Dorman, 3 years ago


https://michaeldorman.github.io/nngeo/, https://github.com/michaeldorman/nngeo/


Report a bug at https://github.com/michaeldorman/nngeo/issues/


Browse source code at https://github.com/cran/nngeo


Authors: Michael Dorman [aut, cre] , Johnathan Rush [ctb] , Ian Hough [ctb] , Dominic Russel [ctb] , Luigi Ranghetti [ctb] , Attilio Benini [ctb] , Arnaud Tarroux [ctb] , Felipe Matas [ctb] , Charles F.F Karney [ctb, cph] (Author of included C code from 'GeographicLib' for geodesic distance)


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports nabor, units, methods, parallel, data.table

Depends on sf

Suggests DBI, RPostgreSQL, stars, knitr, rmarkdown, tinytest


Imported by flexurba, gps.track, starsExtra.

Suggested by nswgeo, od, simodels.


See at CRAN