The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Geo::Geos::Index::SpatialIndex - Abstract class for spatial index algorithms.

SYNOPSIS

    use Geo::Geos::Index::Quadtree;

    my $t  = Geo::Geos::Index::Quadtree->new;     # => isa 'Geo::Geos::Index::SpatialIndex'
    my $t2 = Geo::Geos::Index::STRtree->new;      # => isa '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 []

SEE ALSO (C++ classes docs)

GEOS C++ Library

geos::index::SpatialIndex

SEE ALSO

Geo::Geos

Geo::Geos::Envelope

Geo::Geos::Index::Quadtree

Geo::Geos::Index::STRtree

AUTHOR

Ivan Baidakou <i.baydakov@crazypanda.ru>, Crazy Panda, CP Decision LTD

LICENSE

You may distribute this code under the same terms as Perl itself.