58 static constexpr std::size_t NODE_CAPACITY = 16;
61 const std::vector<Coordinate>& items;
62 std::vector<bool> removedItems;
63 std::vector<std::size_t> levelOffset;
64 std::size_t nodeCapacity = NODE_CAPACITY;
65 std::vector<Envelope> bounds;
82 std::vector<std::size_t> computeLevelOffsets();
84 static std::size_t ceilDivisor(std::size_t num, std::size_t denom);
85 static std::size_t clampMax(std::size_t x, std::size_t max);
87 std::size_t levelNodeCount(std::size_t numNodes);
89 std::vector<Envelope> createBounds();
91 void fillItemBounds(std::vector<Envelope>& bounds);
92 void fillLevelBounds(std::size_t lvl, std::vector<Envelope>& bounds);
94 static Envelope computeNodeEnvelope(
const std::vector<Envelope>& bounds,
95 std::size_t start, std::size_t end);
96 static Envelope computeItemEnvelope(
const std::vector<Coordinate>& items,
97 std::size_t start, std::size_t end);
99 void queryNode(
const Envelope& queryEnv,
100 std::size_t level, std::size_t nodeIndex,
101 std::vector<std::size_t>& result)
const;
102 void queryNodeRange(
const Envelope& queryEnv,
103 std::size_t level, std::size_t nodeStartIndex,
104 std::vector<std::size_t>& result)
const;
105 void queryItemRange(
const Envelope& queryEnv, std::size_t itemIndex,
106 std::vector<std::size_t>& result)
const;
108 std::size_t levelSize(std::size_t level)
const;
109 bool isNodeEmpty(std::size_t level, std::size_t index);
110 bool isItemsNodeEmpty(std::size_t nodeIndex);
123 std::vector<Envelope> getBounds();
140 void query(
const Envelope& queryEnv, std::vector<std::size_t>& result)
const;
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:58
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:58
Definition: VertexSequencePackedRtree.h:49
void query(const Envelope &queryEnv, std::vector< std::size_t > &result) const
void remove(std::size_t index)
VertexSequencePackedRtree(const std::vector< Coordinate > &pts)
Basic namespace for all GEOS functionalities.
Definition: geos.h:39