- Main Page
- Namespaces
- Classes
- Files
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# geos::index::strtree::AbstractSTRtree Class Reference

Base class for STRtree and SIRtree. More...

`#include <AbstractSTRtree.h>`

Inheritance diagram for geos::index::strtree::AbstractSTRtree:

List of all members.

## Public Member Functions
| AbstractSTRtree (size_t newNodeCapacity)
virtual void | build ()
virtual size_t | getNodeCapacity ()
virtual void | query (const void *searchBounds, const AbstractNode *node, std::vector< void * > *matches)
virtual void | boundablesAtLevel (int level, AbstractNode *top, BoundableList *boundables)
## Static Public Member Functions
static bool | compareDoubles (double a, double b)
## Protected Member Functions
virtual AbstractNode * | createNode (int level)=0
virtual std::auto_ptr < BoundableList > | createParentBoundables (BoundableList *childBoundables, int newLevel)
virtual AbstractNode * | lastNode (BoundableList *nodes)
virtual AbstractNode * | getRoot ()
virtual void | insert (const void *bounds, void *item)
| Also builds the tree, if necessary.
void | query (const void *searchBounds, std::vector< void * > &foundItems)
| Also builds the tree, if necessary.
void | query (const void *searchBounds, ItemVisitor &visitor)
| Also builds the tree, if necessary.
void | query (const void *searchBounds, const AbstractNode &node, ItemVisitor &visitor)
bool | remove (const void *itemEnv, void *item)
| Also builds the tree, if necessary.
std::auto_ptr< BoundableList > | boundablesAtLevel (int level)
virtual IntersectsOp * | getIntersectsOp ()=0
## Protected Attributes
AbstractNode * | root
std::vector< AbstractNode * > * | nodes
size_t | nodeCapacity
## Classes
class | IntersectsOp
| A test for intersection between two bounds, necessary because subclasses of AbstractSTRtree have different implementations of bounds. More...

## Detailed Description

Base class for STRtree and SIRtree.

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.

This implementation is based on Boundables rather than just AbstractNodes, because the STR algorithm operates on both nodes and data, both of which are treated here as Boundables.

## Constructor & Destructor Documentation

geos::index::strtree::AbstractSTRtree::AbstractSTRtree | ( | size_t | newNodeCapacity | ) | `[inline]`

Constructs an AbstractSTRtree with the specified maximum number of child nodes that a node may have

## Member Function Documentation

virtual std::auto_ptr<BoundableList> geos::index::strtree::AbstractSTRtree::createParentBoundables | ( | BoundableList * | childBoundables,
|  | int | newLevel |
| ) |  |  | `[protected, virtual]`

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

Reimplemented in geos::index::strtree::SIRtree.

virtual IntersectsOp* geos::index::strtree::AbstractSTRtree::getIntersectsOp | ( |  | ) | `[protected, pure virtual]`

Returns:
  a test for intersection between two bounds, necessary because subclasses of AbstractSTRtree have different implementations of bounds.

See also:
  IntersectsOp

Implemented in geos::index::strtree::SIRtree, and geos::index::strtree::STRtree.

virtual void geos::index::strtree::AbstractSTRtree::build | ( |  | ) | `[virtual]`

Creates parent nodes, grandparent nodes, and so forth up to the root node, for the data that has been inserted into the tree. Can only be called once, and thus can be called only after all of the data has been inserted into the tree.

virtual size_t geos::index::strtree::AbstractSTRtree::getNodeCapacity | ( |  | ) | `[inline, virtual]`

Returns the maximum number of child nodes that a node may have

virtual void geos::index::strtree::AbstractSTRtree::boundablesAtLevel | ( | int | level,
|  | AbstractNode * | top,
|  | BoundableList * | boundables |
| ) |  |  | `[virtual]`

Parameters:

  | level | -1 to get items

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

- AbstractSTRtree.h