19 #ifndef GEOS_IDX_QUADTREE_NODE_H
20 #define GEOS_IDX_QUADTREE_NODE_H
22 #include <geos/export.h>
23 #include <geos/index/quadtree/NodeBase.h>
24 #include <geos/geom/Coordinate.h>
25 #include <geos/geom/Envelope.h>
32 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
55 class GEOS_DLL Node:
public NodeBase {
60 std::unique_ptr<geom::Envelope> env;
62 geom::Coordinate centre;
72 Node* getSubnode(
int index);
74 std::unique_ptr<Node> createSubnode(
int index);
79 isSearchMatch(
const geom::Envelope& searchEnv)
const override
81 return env->intersects(searchEnv);
87 static std::unique_ptr<Node> createNode(
const geom::Envelope& env);
94 static std::unique_ptr<Node> createExpanded(std::unique_ptr<Node> node,
95 const geom::Envelope& addEnv);
97 Node(std::unique_ptr<geom::Envelope> nenv,
int nlevel)
100 centre((env->getMinX() + env->getMaxX()) / 2,
101 (env->getMinY() + env->getMaxY()) / 2),
129 void insertNode(std::unique_ptr<Node> node);
131 std::string toString()
const override;
143 #endif // GEOS_IDX_QUADTREE_NODE_H