21 #include <geos/export.h>
22 #include <geos/geom/Envelope.h>
23 #include <geos/index/SpatialIndex.h>
24 #include <geos/index/quadtree/Root.h>
32 #pragma warning(disable: 4251)
74 std::vector<std::unique_ptr<geom::Envelope>> newEnvelopes;
167 root.visit(searchEnv, visitor);
182 std::string toString()
const;
194 newEnvelopes(std::move(other.newEnvelopes)),
196 minExtent(other.minExtent)
205 if (
this != &other) {
208 newEnvelopes.clear();
209 newEnvelopes = std::move(other.newEnvelopes);
210 minExtent = other.minExtent;
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:59
A visitor for items in an index.
Definition: ItemVisitor.h:28
Abstract class defines basic insertion and query operations supported by classes implementing spatial...
Definition: SpatialIndex.h:46
A Quadtree is a spatial index structure for efficient querying of 2D rectangles. If other kinds of sp...
Definition: Quadtree.h:70
std::vector< void * > * queryAll()
Return a list of all items in the Quadtree.
std::size_t size()
Returns the number of items in the tree.
Quadtree(const Quadtree &)=delete
bool remove(const geom::Envelope *itemEnv, void *item) override
std::size_t depth()
Returns the number of levels in the tree.
void query(const geom::Envelope *searchEnv, ItemVisitor &visitor) override
Queries the tree and visits items which may lie in the given search envelope.
Definition: Quadtree.h:161
static geom::Envelope * ensureExtent(const geom::Envelope *itemEnv, double minExtent)
Ensure that the envelope for the inserted item has non-zero extents.
void insert(const geom::Envelope *itemEnv, void *item) override
Adds a spatial item with an extent specified by the given Envelope to the index.
Quadtree()
Constructs a Quadtree with zero items.
Definition: Quadtree.h:108
void query(const geom::Envelope *searchEnv, std::vector< void * > &ret) override
Queries the tree and returns items which may lie in the given search envelope.
QuadRoot is the root of a single Quadtree. It is centred at the origin, and does not have a defined e...
Definition: quadtree/Root.h:48
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25