17 #include <geos/export.h>
63 static constexpr std::size_t NODE_CAPACITY = 16;
67 std::vector<bool> removedItems;
68 std::vector<std::size_t> levelOffset;
69 std::size_t nodeCapacity = NODE_CAPACITY;
70 std::vector<Envelope> bounds;
87 std::vector<std::size_t> computeLevelOffsets();
89 static std::size_t ceilDivisor(std::size_t num, std::size_t denom);
90 static std::size_t clampMax(std::size_t x, std::size_t max);
92 std::size_t levelNodeCount(std::size_t numNodes);
94 std::vector<Envelope> createBounds();
96 void fillItemBounds(std::vector<Envelope>& bounds);
97 void fillLevelBounds(std::size_t lvl, std::vector<Envelope>& bounds);
99 static Envelope computeNodeEnvelope(
const std::vector<Envelope>& bounds,
100 std::size_t start, std::size_t end);
102 std::size_t start, std::size_t end);
104 void queryNode(
const Envelope& queryEnv,
105 std::size_t level, std::size_t nodeIndex,
106 std::vector<std::size_t>& result)
const;
107 void queryNodeRange(
const Envelope& queryEnv,
108 std::size_t level, std::size_t nodeStartIndex,
109 std::vector<std::size_t>& result)
const;
110 void queryItemRange(
const Envelope& queryEnv, std::size_t itemIndex,
111 std::vector<std::size_t>& result)
const;
113 std::size_t levelSize(std::size_t level)
const;
114 bool isNodeEmpty(std::size_t level, std::size_t index);
115 bool isItemsNodeEmpty(std::size_t nodeIndex);
128 std::vector<Envelope> getBounds();
145 void query(
const Envelope& queryEnv, std::vector<std::size_t>& result)
const;
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:216
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:58
Definition: VertexSequencePackedRtree.h:54
void query(const Envelope &queryEnv, std::vector< std::size_t > &result) const
void remove(std::size_t index)
VertexSequencePackedRtree(const CoordinateSequence &pts)
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25