17 #include <geos/export.h> 18 #include <geos/index/SpatialIndex.h> 19 #include <geos/geom/Envelope.h> 20 #include <geos/index/strtree/SimpleSTRnode.h> 28 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class 71 std::deque<SimpleSTRnode> nodesQue;
72 std::vector<SimpleSTRnode*> nodes;
73 std::size_t nodeCapacity;
86 static void sortNodesY(std::vector<SimpleSTRnode*>& nodeList);
87 static void sortNodesX(std::vector<SimpleSTRnode*>& nodeList);
96 std::vector<SimpleSTRnode*> createHigherLevels(
97 std::vector<SimpleSTRnode*>& nodesOfALevel,
int level);
99 void addParentNodesFromVerticalSlice(
100 std::vector<SimpleSTRnode*>& verticalSlice,
102 std::vector<SimpleSTRnode*>& parentNodes);
104 std::vector<SimpleSTRnode*> createParentNodes(
105 std::vector<SimpleSTRnode*>& childNodes,
121 : nodeCapacity(capacity)
126 std::size_t getNodeCapacity()
const {
130 std::size_t getNumLeafNodes()
const {
134 return root->getNumLeafNodes();
139 bool getBuilt()
const {
154 void query(
const geom::Envelope* searchEnv, std::vector<void*>& matches)
override;
158 bool remove(
const geom::Envelope* searchBounds,
void* item)
override;
167 std::pair<const void*, const void*> nearestNeighbour(
ItemDistance* itemDist);
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:58
A query-only R-tree created using the Sort-Tile-Recursive (STR) algorithm. For two-dimensional spatia...
Definition: SimpleSTRtree.h:65
A node of the STR tree.
Definition: SimpleSTRnode.h:37
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:188
Abstract class defines basic insertion and query operations supported by classes implementing spatial...
Definition: SpatialIndex.h:47
A function method which computes the distance between two ItemBoundables in an STRtree. Used for Nearest Neighbour searches.
Definition: ItemDistance.h:34
std::ostream & operator<<(std::ostream &os, const Coordinate &c)
Output function.
A visitor for items in an index.
Definition: ItemVisitor.h:29
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:26
SimpleSTRtree(std::size_t capacity=10)
Definition: SimpleSTRtree.h:120