GEOS  3.3.3
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
geos::index::quadtree::Node Class Reference

Represents a node of a Quadtree. More...

#include <Node.h>

Inheritance diagram for geos::index::quadtree::Node:
geos::index::quadtree::NodeBase

Public Member Functions

 Node (std::auto_ptr< geom::Envelope > nenv, int nlevel)
geom::EnvelopegetEnvelope ()
NodegetNode (const geom::Envelope *searchEnv)
 Returns the subquad containing the envelope. Creates the subquad if it does not already exist.
NodeBasefind (const geom::Envelope *searchEnv)
 Returns the smallest existing node containing the envelope.
void insertNode (std::auto_ptr< Node > node)
std::string toString () const
- Public Member Functions inherited from geos::index::quadtree::NodeBase
std::vector< void * > & getItems ()
void add (void *item)
std::vector< void * > & addAllItems (std::vector< void * > &resultItems) const
 Push all node items to the given vector, return the argument.
virtual void addAllItemsFromOverlapping (const geom::Envelope &searchEnv, std::vector< void * > &resultItems) const
unsigned int depth () const
unsigned int size () const
unsigned int getNodeCount () const
virtual void visit (const geom::Envelope *searchEnv, ItemVisitor &visitor)
bool remove (const geom::Envelope *itemEnv, void *item)
bool hasItems () const
bool hasChildren () const
bool isPrunable () const

Static Public Member Functions

static std::auto_ptr< NodecreateNode (const geom::Envelope &env)
static std::auto_ptr< NodecreateExpanded (std::auto_ptr< Node > node, const geom::Envelope &addEnv)
 Create a node containing the given node and envelope.
- Static Public Member Functions inherited from geos::index::quadtree::NodeBase
static int getSubnodeIndex (const geom::Envelope *env, const geom::Coordinate &centre)

Protected Member Functions

bool isSearchMatch (const geom::Envelope &searchEnv) const

Additional Inherited Members

- Protected Attributes inherited from geos::index::quadtree::NodeBase
std::vector< void * > items
 Actual items are NOT owned by this class.
Nodesubnode [4]

Detailed Description

Represents a node of a Quadtree.

Nodes contain items which have a spatial extent corresponding to the node's position in the quadtree.

Member Function Documentation

static std::auto_ptr<Node> geos::index::quadtree::Node::createExpanded ( std::auto_ptr< Node node,
const geom::Envelope addEnv 
)
static

Create a node containing the given node and envelope.

Parameters
nodeif not null, will be inserted to the returned node
addEnvminimum envelope to use for the node
geom::Envelope* geos::index::quadtree::Node::getEnvelope ( )
inline

Return Envelope associated with this node ownership retained by this object


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