This is a C++ wrapper class around the Boost RTree library.
It supports the following operations:
- Point insertion (insert_point): It takes in a point and a point ID. The point ID is an identification number that you want the inserted point to be associated with. e.g., point = (0, 2) and ID = 23
- Query k-Nearest Neigbors (query_knn): It takes a query point and the number of neighbors to look for. It returns the IDs of k number of points that are close to the query point.
- TODO
- Since the dimension (DIM) of the RTree is a compile-time constant, users have to manually define the dimension and appropriately modify the member functions in NNRTree.cpp for arbitrary dimensions. A good workaround is setting an upperbound dimension (say 10) and whenever you are working with k < DIM, you can set the rest of the (DIM-k) dimensions to be zero.
- git clone https://github.com/pradeepr-roboticist/NNRTree.git
- mkdir build
- cmake ..
- make
- ./test_nnrtree
Pradeep Rajendran
Copyright © 2019 Pradeep Rajendran Released under the GNU General Public License.