SpatialIndex.h
/**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2006 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************/
#pragma once
#include <geos/export.h>
#include <vector>
// Forward declarations
namespace geos {
namespace geom {
class Envelope;
}
namespace index {
class ItemVisitor;
}
}
namespace geos {
namespace index {
class GEOS_DLL SpatialIndex {
public:
virtual
~SpatialIndex() {}
virtual void insert(const geom::Envelope* itemEnv, void* item) = 0;
//virtual std::vector<void*>* query(const geom::Envelope *searchEnv)=0;
virtual void query(const geom::Envelope* searchEnv, std::vector<void*>&) = 0;
virtual void query(const geom::Envelope* searchEnv, ItemVisitor& visitor) = 0;
virtual bool remove(const geom::Envelope* itemEnv, void* item) = 0;
};
} // namespace geos.index
} // namespace geos
geos::geom::Envelope
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition Envelope.h:59
geos::index::ItemVisitor
A visitor for items in an index.
Definition ItemVisitor.h:28
geos::index::SpatialIndex
Abstract class defines basic insertion and query operations supported by classes implementing spatial...
Definition SpatialIndex.h:46
geos::index::SpatialIndex::remove
virtual bool remove(const geom::Envelope *itemEnv, void *item)=0
Removes a single item from the tree.
geos::index::SpatialIndex::insert
virtual void insert(const geom::Envelope *itemEnv, void *item)=0
Adds a spatial item with an extent specified by the given Envelope to the index.
geos::index::SpatialIndex::query
virtual void query(const geom::Envelope *searchEnv, ItemVisitor &visitor)=0
Queries the index for all items whose extents intersect the given search Envelope and applies an Item...
geos::index::SpatialIndex::query
virtual void query(const geom::Envelope *searchEnv, std::vector< void * > &)=0
Queries the index for all items whose extents intersect the given search Envelope.
geos::geom
Definition Angle.h:26
geos::index
Provides classes for various kinds of spatial indexes.
Definition CleanCoverage.h:39
geos
Basic namespace for all GEOS functionalities.
Definition geos.h:38