The STR packed R-tree is simple to implement and maximizes space utilization; that is, as many leaves as possible are filled to capacity. Overlap between nodes is far less than in a basic R-tree. However, once the tree has been built (explicitly or on the first call to #query), items may not be added or removed.
Described in: P. Rigaux, Michel Scholl and Agnes Voisard. Spatial Databases With Application To GIS. Morgan Kaufmann, San Francisco, 2002.
Note that inserting items into a tree is not thread-safe. Inserting performed on more than one thread must be synchronized externally.
Querying a tree is thread-safe. The building phase is done synchronously, and querying is stateless.
The minimum recommended capacity setting is 4.
true if the item was found
The query object does not have to be contained in the tree, but it does have to be compatible with the itemDist distance metric.
null if the tree is empty
null if no pair of distinct items can be found
item, using
itemDist as the distance metric. A Branch-and-Bound tree traversal algorithm is used to provide an efficient search. This method implements the KNN algorithm described in the following paper:
Roussopoulos, Nick, Stephen Kelley, and Frédéric Vincent. "Nearest neighbor queries." ACM sigmod record. Vol. 24. No. 2. ACM, 1995.
The query item does not have to be contained in the tree, but it does have to be compatible with the itemDist distance metric.