NAME
Tree::STR - A Sort-Tile-Recursive tree index
VERSION
Version 0.02
SYNOPSIS
use Tree::STR;
my $data = [[0,1,2,2,'item 1'], [10,20,100,200,'item 2']];
my $tree = Tree::STR->new($data);
my $intersects_point = $tree->query_point(50,50); # ['item 2']
my $intersects_poly = $tree->query_partly_within_rect(20,20,200,200); # ['item 2']
...
DESCRIPTION
Create a Sort-Tile-Recursive tree. This is a read-only R-Tree that is more efficient to create than a standard R-Tree.
The input data need to be an array of arrays, where each internal array contains the bounding box coordinates as (xmin, ymin, xmax, ymax) followed by the item to be stored.
Alternately one can pass an array of objects that provide a bbox method that returns an array of coordinates in the order (xmin, ymin, xmax, ymax).
EXPORT
None.
METHODS
new
query_point
query_partly_within_rect
query_completely_within_rect
AUTHOR
Shawn Laffan <shawnlaffan@gmail.com>
BUGS
https://github.com/biogeospatial/Tree-STR/issues
SEE ALSO
Leutenegger, Scott T.; Edgington, Jeffrey M.; Lopez, Mario A. (1997). "STR: A Simple and Efficient Algorithm for R-Tree Packing". https://ia600900.us.archive.org/27/items/nasa_techdoc_19970016975/19970016975.pdf
LICENSE AND COPYRIGHT
This software is Copyright (c) 2026 by Shawn Laffan <shawnlaffan@gmail.com>.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)