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)
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;
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);
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition Envelope.h:53
A visitor for items in an index.
Definition ItemVisitor.h:29
Abstract class defines basic insertion and query operations supported by classes implementing spatial...
Definition SpatialIndex.h:47
A node of the STR tree.
Definition AbstractNode.h:42
A test for intersection between two bounds, necessary because subclasses of AbstractSTRtree have diff...
Definition AbstractSTRtree.h:166
virtual void insert(const void *bounds, void *item)
Also builds the tree, if necessary.
AbstractSTRtree(std::size_t newNodeCapacity)
Definition AbstractSTRtree.h:250
void query(const void *searchBounds, std::vector< void * > &foundItems)
Also builds the tree, if necessary.
A spatial object in an AbstractSTRtree.
Definition Boundable.h:25
A query-only R-tree created using the Sort-Tile-Recursive (STR) algorithm. For two-dimensional spatia...
Definition STRtree.h:65
STRtree(std::size_t nodeCapacity=10)
void insert(const geom::Envelope *itemEnv, void *item)
Adds a spatial item with an extent specified by the given Envelope to the index.
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
IntersectsOp * getIntersectsOp()
Definition STRtree.h:108
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
bool remove(const geom::Envelope *itemEnv, void *item)
Removes a single item from the tree.
Definition STRtree.h:147
Contains 2-D and 1-D versions of the Sort-Tile-Recursive (STR) tree, a query-only R-tree.
Definition SIRtreePointInRing.h:32
std::vector< Boundable * > BoundableList
A list of boundables. TODO: use a list.
Definition AbstractSTRtree.h:44
Provides classes for various kinds of spatial indexes.
Definition IndexedNestedRingTester.h:31
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:25