rtree

R-Tree


Keywords
library, bulk-load, dynamic, generic, k-nearest-neighbor, nim, nim-lang, nim-language, r-tree, spatial-index
License
MIT
Install
nimble install rtree

Documentation

Pure Nim generic RTree and R*Tree

RTrees are a dynamic index structures for spatial indexing/searching.

This implementation follows closely the Guttman paper for plain RTree and the other mentioned paper for the R*Tree variant.

Currently only basic procs insert(), delete() and search() are available. A simple test is included, but I am not currently using this module myself, so it is not really tested yet. I have tested the algorithm only for 2D with integer data objects yet, but it should work for arbitrary dimensions and data objects.

You call newRTree() for the plain tree or newRStarTree() for the Star variant. The later should be faster for large data sets and it should work well for plain 1D point data.

Later I may add a more detailed documentation and procs for range-search and bulk-loading. For now you can consult the test() proc at the end of the source code to learn how to use the procs.