19 #ifndef GEOS_INDEX_STRTREE_STRTREE_H 20 #define GEOS_INDEX_STRTREE_STRTREE_H 22 #include <geos/export.h> 23 #include <geos/index/strtree/ItemDistance.h> 24 #include <geos/index/strtree/BoundablePair.h> 25 #include <geos/index/strtree/AbstractSTRtree.h> 26 #include <geos/index/SpatialIndex.h> 27 #include <geos/geom/Envelope.h> 33 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class 72 bool intersects(
const void* aBounds,
const void* bBounds);
82 std::auto_ptr<BoundableList> createParentBoundables(
BoundableList* childBoundables,
int newLevel);
84 std::auto_ptr<BoundableList> createParentBoundablesFromVerticalSlices(std::vector<BoundableList*>* verticalSlices,
int newLevel);
86 STRIntersectsOp intersectsOp;
88 std::auto_ptr<BoundableList> sortBoundables(
const BoundableList* input);
90 std::auto_ptr<BoundableList> createParentBoundablesFromVerticalSlice(
99 std::vector<BoundableList*>* verticalSlices(
109 return &intersectsOp;
120 STRtree(std::size_t nodeCapacity=10);
126 static double avg(
double a,
double b) {
127 return (a + b) / 2.0;
142 const void* nearestNeighbour(
const geom::Envelope *env,
const void* item, ItemDistance* itemDist);
143 std::pair<const void*, const void*> nearestNeighbour(BoundablePair* initBndPair);
144 std::pair<const void*, const void*> nearestNeighbour(ItemDistance* itemDist);
145 std::pair<const void*, const void*> nearestNeighbour(BoundablePair* initBndPair,
double maxDistance);
148 return AbstractSTRtree::remove(itemEnv, item);
161 #endif // GEOS_INDEX_STRTREE_STRTREE_H void query(const geom::Envelope *searchEnv, std::vector< void *> &matches)
Queries the index for all items whose extents intersect the given search Envelope.
Definition: STRtree.h:134
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:53
Base class for STRtree and SIRtree.
Definition: AbstractSTRtree.h:132
void query(const geom::Envelope *searchEnv, ItemVisitor &visitor)
Queries the index for all items whose extents intersect the given search Envelope and applies an Item...
Definition: STRtree.h:138
A query-only R-tree created using the Sort-Tile-Recursive (STR) algorithm. For two-dimensional spatia...
Definition: STRtree.h:64
Abstract class defines basic insertion and query operations supported by classes implementing spatial...
Definition: SpatialIndex.h:47
A test for intersection between two bounds, necessary because subclasses of AbstractSTRtree have diff...
Definition: AbstractSTRtree.h:166
A visitor for items in an index.
Definition: ItemVisitor.h:29
virtual void insert(const void *bounds, void *item)
Also builds the tree, if necessary.
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
void query(const void *searchBounds, std::vector< void *> &foundItems)
Also builds the tree, if necessary.
A node of the STR tree.
Definition: AbstractNode.h:42
A spatial object in an AbstractSTRtree.
Definition: Boundable.h:25
std::vector< Boundable * > BoundableList
A list of boundables. TODO: use a list.
Definition: AbstractSTRtree.h:44
IntersectsOp * getIntersectsOp()
Definition: STRtree.h:108