Minimal implementations and short summaries (pros/cons) for common spatial search techniques. Each algorithm has a *.md overview and a matching *.js reference implementation in src/.
- K-Nearest Neighbors (KNN) — src/knn-search.md - src/knn-search.js
- KD-Tree — src/kd-tree-search.md - src/kd-tree-search.js
- Geohash — src/geohashing-search.md - src/geohashing-search.js
- Quadtree — src/quad-tree-search.md - src/quad-tree-search.js
- Delaunay Triangulation — src/delaunay-triangulation-search.md - src/delaunay-triangulation-search.js
-
Clone the repository
git clone https://github.com/scott/proximity-search-algorithms.git cd proximity-search-algorithms npm install -
Run examples for each algorithm:
npm run kdtree npm run geohash npm run quadtree npm run delaunay
MIT