19 #ifndef GEOS_IDX_QUADTREE_QUADTREE_H
20 #define GEOS_IDX_QUADTREE_QUADTREE_H
22 #include <geos/export.h>
23 #include <geos/geom/Envelope.h>
24 #include <geos/index/SpatialIndex.h>
25 #include <geos/index/quadtree/Root.h>
33 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
71 class GEOS_DLL Quadtree:
public SpatialIndex {
75 std::vector<std::unique_ptr<geom::Envelope>> newEnvelopes;
77 void collectStats(
const geom::Envelope& itemEnv);
102 static geom::Envelope* ensureExtent(
const geom::Envelope* itemEnv,
115 ~Quadtree()
override =
default;
123 void insert(
const geom::Envelope* itemEnv,
void* item)
override;
142 void query(
const geom::Envelope* searchEnv, std::vector<void*>& ret)
override;
168 root.visit(searchEnv, visitor);
181 std::vector<void*>* queryAll();
183 std::string toString()
const;
202 #endif // GEOS_IDX_QUADTREE_QUADTREE_H