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

A node of the STR tree. More...

#include <SimpleSTRnode.h>

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

Public Member Functions

 SimpleSTRnode (std::size_t newLevel, const geom::Envelope *p_env, void *p_item, size_t capacity=10)
 
 SimpleSTRnode (std::size_t newLevel)
 
void toString (std::ostream &os, int indentLevel) const
 
std::size_t getNumNodes () const
 
std::size_t getNumLeafNodes () const
 
const std::vector< SimpleSTRnode * > & getChildNodes () const
 
void * getItem () const
 
bool removeItem (void *item)
 
bool removeChild (SimpleSTRnode *child)
 
const geom::EnvelopegetEnvelope () const
 
const void * getBounds () const override
 
std::size_t getLevel () const
 
std::size_t size () const
 
void addChildNode (SimpleSTRnode *childNode)
 
bool isLeaf () const override
 
bool isComposite () const
 
double area () const
 
- Public Member Functions inherited from geos::index::strtree::ItemBoundable
 ItemBoundable (const void *newBounds, void *newItem)
 
 ~ItemBoundable () override=default
 
void * getItem () const
 
- Public Member Functions inherited from geos::index::strtree::Boundable
virtual ~Boundable ()
 

Private Attributes

std::vector< SimpleSTRnode * > childNodes
 
void * item
 
geom::Envelope bounds
 
std::size_t level
 

Detailed Description

A node of the STR tree.

Definition at line 37 of file SimpleSTRnode.h.

Constructor & Destructor Documentation

geos::index::strtree::SimpleSTRnode::SimpleSTRnode ( std::size_t  newLevel,
const geom::Envelope p_env,
void *  p_item,
size_t  capacity = 10 
)
inline

Definition at line 51 of file SimpleSTRnode.h.

geos::index::strtree::SimpleSTRnode::SimpleSTRnode ( std::size_t  newLevel)
inline

Definition at line 64 of file SimpleSTRnode.h.

Member Function Documentation

void geos::index::strtree::SimpleSTRnode::addChildNode ( SimpleSTRnode childNode)

Adds either an AbstractNode, or if this is a leaf node, a data object (wrapped in an ItemBoundable)

double geos::index::strtree::SimpleSTRnode::area ( ) const
inline

Definition at line 125 of file SimpleSTRnode.h.

References geos::geom::Envelope::getArea().

Here is the call graph for this function:

const void* geos::index::strtree::SimpleSTRnode::getBounds ( ) const
inlineoverridevirtual

Returns a representation of space that encloses this Boundable, preferably not much bigger than this Boundable's boundary yet fast to test for intersection with the bounds of other Boundables.

The class of object returned depends on the subclass of AbstractSTRtree.

Returns
an Envelope (for STRtrees), an Interval (for SIRtrees), or other object (for other subclasses of AbstractSTRtree)
See also
AbstractSTRtree::IntersectsOp

Reimplemented from geos::index::strtree::ItemBoundable.

Definition at line 93 of file SimpleSTRnode.h.

const std::vector<SimpleSTRnode*>& geos::index::strtree::SimpleSTRnode::getChildNodes ( ) const
inline

Definition at line 74 of file SimpleSTRnode.h.

const geom::Envelope& geos::index::strtree::SimpleSTRnode::getEnvelope ( ) const
inline

Returns a representation of space that encloses this Node

Definition at line 89 of file SimpleSTRnode.h.

void* geos::index::strtree::SimpleSTRnode::getItem ( ) const
inline

Definition at line 79 of file SimpleSTRnode.h.

std::size_t geos::index::strtree::SimpleSTRnode::getLevel ( ) const
inline

Returns 0 if this node is a leaf, 1 if a parent of a leaf, and so on; the root node will have the highest level

Definition at line 101 of file SimpleSTRnode.h.

std::size_t geos::index::strtree::SimpleSTRnode::getNumLeafNodes ( ) const

Referenced by geos::index::strtree::SimpleSTRtree::getNumLeafNodes().

Here is the caller graph for this function:

std::size_t geos::index::strtree::SimpleSTRnode::getNumNodes ( ) const
bool geos::index::strtree::SimpleSTRnode::isComposite ( ) const
inline

Definition at line 120 of file SimpleSTRnode.h.

bool geos::index::strtree::SimpleSTRnode::isLeaf ( ) const
inlineoverridevirtual

Reimplemented from geos::index::strtree::ItemBoundable.

Definition at line 115 of file SimpleSTRnode.h.

bool geos::index::strtree::SimpleSTRnode::removeChild ( SimpleSTRnode child)
bool geos::index::strtree::SimpleSTRnode::removeItem ( void *  item)
std::size_t geos::index::strtree::SimpleSTRnode::size ( ) const
inline

Definition at line 105 of file SimpleSTRnode.h.

void geos::index::strtree::SimpleSTRnode::toString ( std::ostream &  os,
int  indentLevel 
) const

Member Data Documentation

geom::Envelope geos::index::strtree::SimpleSTRnode::bounds
private

Definition at line 43 of file SimpleSTRnode.h.

std::vector<SimpleSTRnode*> geos::index::strtree::SimpleSTRnode::childNodes
private

Definition at line 41 of file SimpleSTRnode.h.

void* geos::index::strtree::SimpleSTRnode::item
private

Definition at line 42 of file SimpleSTRnode.h.

std::size_t geos::index::strtree::SimpleSTRnode::level
private

Definition at line 44 of file SimpleSTRnode.h.


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