GEOS  3.9.1dev
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
geos::index::quadtree::Key Class Reference

A Key is a unique identifier for a node in a quadtree. More...

#include <Key.h>

Collaboration diagram for geos::index::quadtree::Key:
[legend]

Public Member Functions

 Key (const geom::Envelope &itemEnv)
 
 ~Key ()=default
 
const geom::CoordinategetPoint () const
 Returned object ownership retained by this class. More...
 
int getLevel () const
 
const geom::EnvelopegetEnvelope () const
 Returned object ownership retained by this class. More...
 
geom::CoordinategetCentre () const
 Returns newly allocated object (ownership transferred) More...
 
void computeKey (const geom::Envelope &itemEnv)
 

Static Public Member Functions

static int computeQuadLevel (const geom::Envelope &env)
 

Private Member Functions

void computeKey (int level, const geom::Envelope &itemEnv)
 

Private Attributes

geom::Coordinate pt
 
int level
 
geom::Envelope env
 

Detailed Description

A Key is a unique identifier for a node in a quadtree.

It contains a lower-left point and a level number. The level number is the power of two for the size of the node envelope

Definition at line 42 of file quadtree/Key.h.

Constructor & Destructor Documentation

geos::index::quadtree::Key::Key ( const geom::Envelope itemEnv)
geos::index::quadtree::Key::~Key ( )
default

Member Function Documentation

void geos::index::quadtree::Key::computeKey ( const geom::Envelope itemEnv)

return a square envelope containing the argument envelope, whose extent is a power of two and which is based at a power of 2

void geos::index::quadtree::Key::computeKey ( int  level,
const geom::Envelope itemEnv 
)
private
static int geos::index::quadtree::Key::computeQuadLevel ( const geom::Envelope env)
static
geom::Coordinate* geos::index::quadtree::Key::getCentre ( ) const

Returns newly allocated object (ownership transferred)

const geom::Envelope& geos::index::quadtree::Key::getEnvelope ( ) const

Returned object ownership retained by this class.

int geos::index::quadtree::Key::getLevel ( ) const
const geom::Coordinate& geos::index::quadtree::Key::getPoint ( ) const

Returned object ownership retained by this class.

Member Data Documentation

geom::Envelope geos::index::quadtree::Key::env
private

Definition at line 80 of file quadtree/Key.h.

int geos::index::quadtree::Key::level
private

Definition at line 77 of file quadtree/Key.h.

geom::Coordinate geos::index::quadtree::Key::pt
private

Definition at line 75 of file quadtree/Key.h.


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