Geo::Geos::Index::STRtree - A spatial index structure which uses the Sort-Tile-Recursive (STR) algorithm.
use Geo::Geos::Index::STRtree; my $nodeCapacity = 10; my $t = Geo::Geos::Index::STRtree->new; # => isa 'Geo::Geos::Index::STRtree' my $t2 = Geo::Geos::Index::STRtree->new($nodeCapacity); # => isa 'Geo::Geos::Index::STRtree' # defined in Geo::Geos::Index::SpatialIndex my $payload = 'any-scalar'; my $e1 = Geo::Geos::Envelope->new(1, 2, 3, 4); $t->insert($e1, $payload); $t->query($e1); # => is_deeply ['any-scalar'] my $item; $t->query($e1, sub { $item = $_[0] }); my $ok = $item eq 'any-scalar'; # => success $t->remove($e1, $payload); $t->query($e1); # => is_deeply []
GEOS C++ Library
geos::index::strtree::STRtree
Geo::Geos
Geo::Geos::Envelope
Geo::Geos::Index::SpatialIndex
Ivan Baidakou <i.baydakov@crazypanda.ru>, Crazy Panda, CP Decision LTD
You may distribute this code under the same terms as Perl itself.
To install Geo::Geos, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Geo::Geos
CPAN shell
perl -MCPAN -e shell install Geo::Geos
For more information on module installation, please visit the detailed CPAN module installation guide.