A simple example of the library that loads points into an in-memory R-Tree. The points are inserted using the standard insertion procedure of R*-Tree - no bulkloading. Since the example was adapted from an existing project, it contains some unnecessary stuff such as using a custom-made class "Point.h" and assuming that each point belongs to a cluster. However, these assumptions do not affect the clarity of the example.
- Reads the points from a file and inserts them directly into the R-Tree - no intermediate structure is used as this can easily fill up your memory when dealing with big data. I have used valgrind massif to verify that memory usage is equal to the size of the input
- It stores a cluster id (as a sequence of bytes) along with each point
- It selects 600 random points and uses them as query points
- It queries the R-Tree and estimates the average time for retrieving a point. It also estimates the error of the measurements
- The application was built in a way that it does not use more memory than the data itself
- Requires cmake version 3.6
- Assumes libspatialindex is properly installed (see here how to install )
- A sample file is provided
mkdir build
cd build
cmake ..
make
./SpatialIndexRtree sample.txt