19 #ifndef GEOS_INDEX_STRTREE_STRTREE_H 20 #define GEOS_INDEX_STRTREE_STRTREE_H 33 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class 71 bool intersects(
const void* aBounds,
const void* bBounds)
override;
81 std::unique_ptr<BoundableList> createParentBoundables(
BoundableList* childBoundables,
int newLevel)
override;
83 std::unique_ptr<BoundableList> createParentBoundablesFromVerticalSlices(std::vector<BoundableList*>* verticalSlices,
88 std::unique_ptr<BoundableList> sortBoundablesY(
const BoundableList* input);
89 std::unique_ptr<BoundableList> sortBoundablesX(
const BoundableList* input);
91 std::unique_ptr<BoundableList> createParentBoundablesFromVerticalSlice(
100 std::vector<BoundableList*>* verticalSlices(
104 bool isWithinDistance(
BoundablePair* initBndPair,
double maxDistance);
113 return &intersectsOp;
124 STRtree(std::size_t nodeCapacity = 10);
133 return (a + b) / 2.0;
154 std::pair<const void*, const void*> nearestNeighbour(
ItemDistance* itemDist);
156 std::pair<const void*, const void*> nearestNeighbour(
STRtree* tree,
ItemDistance* itemDist);
157 std::pair<const void*, const void*> nearestNeighbour(
BoundablePair* initBndPair);
158 std::pair<const void*, const void*> nearestNeighbour(
BoundablePair* initBndPair,
double maxDistance);
179 #endif // GEOS_INDEX_STRTREE_STRTREE_H An Envelope defines a rectangulare region of the 2D coordinate plane.
STRIntersectsOp intersectsOp
Base class for STRtree and SIRtree.
void query(const void *searchBounds, std::vector< void * > &foundItems)
Also builds the tree, if necessary.
void query(const geom::Envelope *searchEnv, std::vector< void * > &matches) override
Queries the index for all items whose extents intersect the given search Envelope.
void query(const geom::Envelope *searchEnv, ItemVisitor &visitor) override
Queries the index for all items whose extents intersect the given search Envelope and applies an Item...
double getMinY() const
Returns the Envelope minimum y-value. min y > max y indicates that this is a null Envelope...
A query-only R-tree created using the Sort-Tile-Recursive (STR) algorithm. For two-dimensional spatia...
Abstract class defines basic insertion and query operations supported by classes implementing spatial...
A function method which computes the distance between two ItemBoundables in an STRtree. Used for Nearest Neighbour searches.
bool remove(const void *searchBounds, AbstractNode &node, void *item)
A test for intersection between two bounds, necessary because subclasses of AbstractSTRtree have diff...
static double avg(double a, double b)
A visitor for items in an index.
virtual void insert(const void *bounds, void *item)
Also builds the tree, if necessary.
double getMaxY() const
Returns the Envelope maximum y-value. min y > max y indicates that this is a null Envelope...
Basic namespace for all GEOS functionalities.
std::vector< Boundable * > BoundableList
A list of boundables. TODO: use a list.
IntersectsOp * getIntersectsOp() override
static double centreY(const geom::Envelope *e)
A pair of Boundables, whose leaf items support a distance metric between them.