GEOS  3.9.1dev
Classes | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
geos::index::strtree::SIRtree Class Reference

One-dimensional version of an STR-packed R-tree. More...

#include <SIRtree.h>

Inheritance diagram for geos::index::strtree::SIRtree:
[legend]
Collaboration diagram for geos::index::strtree::SIRtree:
[legend]

Classes

class  SIRIntersectsOp
 

Public Member Functions

 SIRtree ()
 Constructs an SIRtree with the default node capacity. More...
 
 SIRtree (std::size_t nodeCapacity)
 Constructs an SIRtree with the given maximum number of child nodes that a node may have. More...
 
 ~SIRtree () override
 
void insert (double x1, double x2, void *item)
 
std::vector< void * > * query (double x1, double x2)
 
std::vector< void * > * query (double x)
 
 SIRtree (const SIRtree &)=delete
 
SIRtreeoperator= (const SIRtree &)=delete
 
- Public Member Functions inherited from geos::index::strtree::AbstractSTRtree
 AbstractSTRtree (std::size_t newNodeCapacity)
 Constructs an AbstractSTRtree with the specified maximum number of child nodes that a node may have. More...
 
virtual ~AbstractSTRtree ()
 
virtual void build ()
 Creates parent nodes, grandparent nodes, and so forth up to the root node, for the data that has been inserted into the tree. More...
 
virtual std::size_t getNodeCapacity ()
 Returns the maximum number of child nodes that a node may have. More...
 
virtual void query (const void *searchBounds, const AbstractNode *node, std::vector< void * > *matches)
 
void iterate (ItemVisitor &visitor)
 
virtual void boundablesAtLevel (int level, AbstractNode *top, BoundableList *boundables)
 
ItemsListitemsTree ()
 Gets a tree structure (as a nested list) corresponding to the structure of the items and nodes in this tree. More...
 

Protected Member Functions

std::unique_ptr< BoundableListcreateParentBoundables (BoundableList *childBoundables, int newLevel) override
 Sorts the childBoundables then divides them into groups of size M, where M is the node capacity. More...
 
AbstractNodecreateNode (int level) override
 
IntersectsOpgetIntersectsOp () override
 
std::unique_ptr< BoundableListsortBoundables (const BoundableList *input)
 
- Protected Member Functions inherited from geos::index::strtree::AbstractSTRtree
virtual AbstractNodelastNode (BoundableList *nodeList)
 
virtual AbstractNodegetRoot ()
 
virtual void insert (const void *bounds, void *item)
 Also builds the tree, if necessary. More...
 
void query (const void *searchBounds, std::vector< void * > &foundItems)
 Also builds the tree, if necessary. More...
 
void query (const void *searchBounds, ItemVisitor &visitor)
 Also builds the tree, if necessary. More...
 
void query (const void *searchBounds, const AbstractNode &node, ItemVisitor &visitor)
 
bool remove (const void *itemEnv, void *item)
 Also builds the tree, if necessary. More...
 
std::unique_ptr< BoundableListboundablesAtLevel (int level)
 

Private Attributes

IntersectsOpintersectsOp
 
std::vector< std::unique_ptr< Interval > > intervals
 

Additional Inherited Members

- Protected Attributes inherited from geos::index::strtree::AbstractSTRtree
AbstractNoderoot
 
std::vector< AbstractNode * > * nodes
 
std::size_t nodeCapacity
 

Detailed Description

One-dimensional version of an STR-packed R-tree.

SIR stands for "Sort-Interval-Recursive".

STR-packed R-trees are described in: P. Rigaux, Michel Scholl and Agnes Voisard. Spatial Databases With Application To GIS. Morgan Kaufmann, San Francisco, 2002.

See also
STRtree

Definition at line 41 of file SIRtree.h.

Constructor & Destructor Documentation

geos::index::strtree::SIRtree::SIRtree ( )

Constructs an SIRtree with the default node capacity.

geos::index::strtree::SIRtree::SIRtree ( std::size_t  nodeCapacity)

Constructs an SIRtree with the given maximum number of child nodes that a node may have.

geos::index::strtree::SIRtree::~SIRtree ( )
override
geos::index::strtree::SIRtree::SIRtree ( const SIRtree )
delete

Disable copy construction and assignment. Apparently needed to make this class compile under MSVC. (See https://stackoverflow.com/q/29565299)

Member Function Documentation

AbstractNode* geos::index::strtree::SIRtree::createNode ( int  level)
overrideprotectedvirtual
std::unique_ptr<BoundableList> geos::index::strtree::SIRtree::createParentBoundables ( BoundableList childBoundables,
int  newLevel 
)
overrideprotectedvirtual

Sorts the childBoundables then divides them into groups of size M, where M is the node capacity.

Reimplemented from geos::index::strtree::AbstractSTRtree.

IntersectsOp* geos::index::strtree::SIRtree::getIntersectsOp ( )
inlineoverrideprotectedvirtual
Returns
a test for intersection between two bounds, necessary because subclasses of AbstractSTRtree have different implementations of bounds.
See also
IntersectsOp

Implements geos::index::strtree::AbstractSTRtree.

Definition at line 109 of file SIRtree.h.

void geos::index::strtree::SIRtree::insert ( double  x1,
double  x2,
void *  item 
)
SIRtree& geos::index::strtree::SIRtree::operator= ( const SIRtree )
delete
std::vector<void*>* geos::index::strtree::SIRtree::query ( double  x1,
double  x2 
)
inline

Returns items whose bounds intersect the given bounds.

Parameters
x1possibly equal to x2
x2

Definition at line 68 of file SIRtree.h.

References geos::index::strtree::AbstractSTRtree::query().

Here is the call graph for this function:

std::vector<void*>* geos::index::strtree::SIRtree::query ( double  x)
inline

Returns items whose bounds intersect the given value.

Definition at line 80 of file SIRtree.h.

std::unique_ptr<BoundableList> geos::index::strtree::SIRtree::sortBoundables ( const BoundableList input)
protected

Member Data Documentation

IntersectsOp* geos::index::strtree::SIRtree::intersectsOp
private

Definition at line 117 of file SIRtree.h.

std::vector<std::unique_ptr<Interval> > geos::index::strtree::SIRtree::intervals
private

Definition at line 118 of file SIRtree.h.


The documentation for this class was generated from the following file: