GEOS 3.11.1
|
Represents a node of a Quadtree. More...
#include <Node.h>
Public Member Functions | |
Node (std::unique_ptr< geom::Envelope > nenv, int nlevel) | |
geom::Envelope * | getEnvelope () |
Node * | getNode (const geom::Envelope *searchEnv) |
Returns the subquad containing the envelope. Creates the subquad if it does not already exist. | |
NodeBase * | find (const geom::Envelope *searchEnv) |
Returns the smallest existing node containing the envelope. | |
void | insertNode (std::unique_ptr< Node > node) |
std::string | toString () const override |
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 |
std::size_t | size () const |
std::size_t | getNodeCount () const |
virtual std::string | toString () 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::unique_ptr< Node > | createNode (const geom::Envelope &env) |
static std::unique_ptr< Node > | createExpanded (std::unique_ptr< Node > node, const geom::Envelope &addEnv) |
Create a node containing the given node and envelope. More... | |
Static Public Member Functions inherited from geos::index::quadtree::NodeBase | |
static int | getSubnodeIndex (const geom::Envelope *env, const geom::Coordinate ¢re) |
Protected Member Functions | |
bool | isSearchMatch (const geom::Envelope &searchEnv) const override |
virtual bool | isSearchMatch (const geom::Envelope &searchEnv) const =0 |
Additional Inherited Members | |
Protected Attributes inherited from geos::index::quadtree::NodeBase | |
std::vector< void * > | items |
Actual items are NOT owned by this class. | |
std::array< Node *, 4 > | subnodes |
Represents a node of a Quadtree.
Nodes contain items which have a spatial extent corresponding to the node's position in the quadtree.
|
static |
Create a node containing the given node and envelope.
node | if not null, will be inserted to the returned node |
addEnv | minimum envelope to use for the node |
|
inline |
Return Envelope associated with this node ownership retained by this object
|
inlineoverrideprotectedvirtual |
Implements geos::index::quadtree::NodeBase.
|
overridevirtual |
Reimplemented from geos::index::quadtree::NodeBase.