libspatialindex API Reference  (git-trunk)
SpatialIndex::Region Class Reference

#include <Region.h>

Inheritance diagram for SpatialIndex::Region:
Inheritance graph
Collaboration diagram for SpatialIndex::Region:
Collaboration graph

Public Member Functions

 Region ()
 
 Region (const double *pLow, const double *pHigh, uint32_t dimension)
 
 Region (const Point &low, const Point &high)
 
 Region (const Region &in)
 
 ~Region () override
 
virtual Regionoperator= (const Region &r)
 
virtual bool operator== (const Region &) const
 
Regionclone () override
 
uint32_t getByteArraySize () override
 
void loadFromByteArray (const uint8_t *data) override
 
void storeToByteArray (uint8_t **data, uint32_t &length) override
 
bool intersectsShape (const IShape &in) const override
 
bool containsShape (const IShape &in) const override
 
bool touchesShape (const IShape &in) const override
 
void getCenter (Point &out) const override
 
uint32_t getDimension () const override
 
void getMBR (Region &out) const override
 
double getArea () const override
 
double getMinimumDistance (const IShape &in) const override
 
virtual bool intersectsRegion (const Region &in) const
 
virtual bool containsRegion (const Region &in) const
 
virtual bool touchesRegion (const Region &in) const
 
virtual double getMinimumDistance (const Region &in) const
 
virtual bool intersectsLineSegment (const LineSegment &in) const
 
virtual bool containsPoint (const Point &in) const
 
virtual bool touchesPoint (const Point &in) const
 
virtual double getMinimumDistance (const Point &in) const
 
virtual Region getIntersectingRegion (const Region &r) const
 
virtual double getIntersectingArea (const Region &in) const
 
virtual double getMargin () const
 
virtual void combineRegion (const Region &in)
 
virtual void combinePoint (const Point &in)
 
virtual void getCombinedRegion (Region &out, const Region &in) const
 
virtual double getLow (uint32_t index) const
 
virtual double getHigh (uint32_t index) const
 
virtual void makeInfinite (uint32_t dimension)
 
virtual void makeDimension (uint32_t dimension)
 
- Public Member Functions inherited from Tools::IObject
virtual ~IObject ()=default
 
- Public Member Functions inherited from SpatialIndex::IShape
 ~IShape () override=default
 
- Public Member Functions inherited from Tools::ISerializable
virtual ~ISerializable ()=default
 

Public Attributes

uint32_t m_dimension {0}
 
double * m_pLow {nullptr}
 
double * m_pHigh {nullptr}
 

Friends

SIDX_DLL std::ostream & operator<< (std::ostream &os, const Region &r)
 

Detailed Description

Definition at line 32 of file Region.h.

Constructor & Destructor Documentation

◆ Region() [1/4]

Region::Region ( )
default

Referenced by clone(), and SpatialIndex::TimeRegion::TimeRegion().

Here is the caller graph for this function:

◆ Region() [2/4]

Region::Region ( const double *  pLow,
const double *  pHigh,
uint32_t  dimension 
)

Definition at line 39 of file Region.cc.

◆ Region() [3/4]

Region::Region ( const Point low,
const Point high 
)

Definition at line 44 of file Region.cc.

References SpatialIndex::Point::m_dimension, and SpatialIndex::Point::m_pCoords.

◆ Region() [4/4]

Region::Region ( const Region in)

Definition at line 54 of file Region.cc.

References m_dimension, m_pHigh, and m_pLow.

◆ ~Region()

Region::~Region ( )
override

Definition at line 95 of file Region.cc.

References m_pHigh, and m_pLow.

Member Function Documentation

◆ clone()

Region * Region::clone ( )
overridevirtual

Implements Tools::IObject.

Reimplemented in SpatialIndex::TimeRegion.

Definition at line 135 of file Region.cc.

References Region().

Referenced by LeafQueryResult::LeafQueryResult(), and LeafQueryResult::operator=().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ combinePoint()

void Region::combinePoint ( const Point in)
virtual

◆ combineRegion()

void Region::combineRegion ( const Region in)
virtual

Definition at line 496 of file Region.cc.

References m_dimension, m_pHigh, and m_pLow.

Referenced by SpatialIndex::TimeRegion::combineRegionInTime(), getCombinedRegion(), SpatialIndex::MVRTree::Node::~Node(), and SpatialIndex::RTree::Node::~Node().

Here is the caller graph for this function:

◆ containsPoint()

bool Region::containsPoint ( const Point in) const
virtual

Definition at line 374 of file Region.cc.

References SpatialIndex::Point::getCoordinate(), SpatialIndex::Point::m_dimension, m_dimension, m_pHigh, and m_pLow.

Referenced by SpatialIndex::TimeRegion::containsPointInTime(), containsShape(), intersectsLineSegment(), intersectsShape(), and SpatialIndex::Point::intersectsShape().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ containsRegion()

bool Region::containsRegion ( const Region in) const
virtual

Definition at line 278 of file Region.cc.

References m_dimension, m_pHigh, and m_pLow.

Referenced by SpatialIndex::TimeRegion::containsRegionInTime(), containsShape(), and SpatialIndex::RTree::Node::~Node().

Here is the caller graph for this function:

◆ containsShape()

bool Region::containsShape ( const IShape in) const
overridevirtual

Implements SpatialIndex::IShape.

Definition at line 194 of file Region.cc.

References containsPoint(), and containsRegion().

Referenced by SpatialIndex::MVRTree::Node::~Node().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getArea()

double Region::getArea ( ) const
overridevirtual

◆ getByteArraySize()

uint32_t Region::getByteArraySize ( )
overridevirtual

Implements Tools::ISerializable.

Reimplemented in SpatialIndex::TimeRegion.

Definition at line 143 of file Region.cc.

References m_dimension.

Referenced by SpatialIndex::RTree::Data::getByteArraySize(), and storeToByteArray().

Here is the caller graph for this function:

◆ getCenter()

void Region::getCenter ( Point out) const
overridevirtual

Implements SpatialIndex::IShape.

Definition at line 220 of file Region.cc.

References m_dimension, SpatialIndex::Point::m_pCoords, m_pHigh, m_pLow, and SpatialIndex::Point::makeDimension().

Referenced by SpatialIndex::RTree::Node::~Node().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCombinedRegion()

void Region::getCombinedRegion ( Region out,
const Region in 
) const
virtual

◆ getDimension()

uint32_t Region::getDimension ( ) const
overridevirtual

◆ getHigh()

double Region::getHigh ( uint32_t  index) const
virtual

Definition at line 543 of file Region.cc.

References m_dimension, and m_pHigh.

Referenced by Index_GetBounds(), Index_GetLeaves(), and IndexItem_GetBounds().

Here is the caller graph for this function:

◆ getIntersectingArea()

double Region::getIntersectingArea ( const Region in) const
virtual

Definition at line 457 of file Region.cc.

References m_dimension, m_pHigh, and m_pLow.

Referenced by SpatialIndex::RTree::Index::findLeastOverlap(), SpatialIndex::RTree::Node::~Node(), and SpatialIndex::MVRTree::Node::~Node().

Here is the caller graph for this function:

◆ getIntersectingRegion()

Region Region::getIntersectingRegion ( const Region r) const
virtual

Definition at line 431 of file Region.cc.

References m_dimension, m_pHigh, m_pLow, and makeInfinite().

Referenced by SpatialIndex::RTree::RTree::flush().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLow()

double Region::getLow ( uint32_t  index) const
virtual

Definition at line 535 of file Region.cc.

References m_dimension, and m_pLow.

Referenced by Index_GetBounds(), Index_GetLeaves(), and IndexItem_GetBounds().

Here is the caller graph for this function:

◆ getMargin()

double Region::getMargin ( ) const
virtual

Definition at line 483 of file Region.cc.

References m_dimension, m_pHigh, and m_pLow.

Referenced by SpatialIndex::MVRTree::Node::~Node(), and SpatialIndex::RTree::Node::~Node().

Here is the caller graph for this function:

◆ getMBR()

void Region::getMBR ( Region out) const
overridevirtual

Implements SpatialIndex::IShape.

Definition at line 234 of file Region.cc.

◆ getMinimumDistance() [1/3]

double Region::getMinimumDistance ( const IShape in) const
overridevirtual

Implements SpatialIndex::IShape.

Definition at line 251 of file Region.cc.

Referenced by SpatialIndex::Point::getMinimumDistance().

Here is the caller graph for this function:

◆ getMinimumDistance() [2/3]

double Region::getMinimumDistance ( const Region in) const
virtual

Definition at line 312 of file Region.cc.

References m_dimension, m_pHigh, and m_pLow.

◆ getMinimumDistance() [3/3]

double Region::getMinimumDistance ( const Point in) const
virtual

Definition at line 407 of file Region.cc.

References SpatialIndex::Point::getCoordinate(), SpatialIndex::Point::m_dimension, m_dimension, m_pHigh, and m_pLow.

Here is the call graph for this function:

◆ intersectsLineSegment()

bool Region::intersectsLineSegment ( const LineSegment in) const
virtual

◆ intersectsRegion()

bool Region::intersectsRegion ( const Region in) const
virtual

Definition at line 264 of file Region.cc.

References m_dimension, m_pHigh, and m_pLow.

Referenced by SpatialIndex::RTree::RTree::flush(), SpatialIndex::TimeRegion::intersectsRegionInTime(), and intersectsShape().

Here is the caller graph for this function:

◆ intersectsShape()

bool Region::intersectsShape ( const IShape in) const
overridevirtual

Implements SpatialIndex::IShape.

Definition at line 178 of file Region.cc.

References containsPoint(), intersectsLineSegment(), and intersectsRegion().

Referenced by SpatialIndex::MVRTree::Node::~Node().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadFromByteArray()

void Region::loadFromByteArray ( const uint8_t *  data)
overridevirtual

Implements Tools::ISerializable.

Reimplemented in SpatialIndex::TimeRegion.

Definition at line 148 of file Region.cc.

References m_dimension, m_pHigh, m_pLow, and makeDimension().

Referenced by SpatialIndex::RTree::Data::loadFromByteArray().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeDimension()

void Region::makeDimension ( uint32_t  dimension)
virtual

◆ makeInfinite()

void Region::makeInfinite ( uint32_t  dimension)
virtual

Reimplemented in SpatialIndex::MovingRegion, and SpatialIndex::TimeRegion.

Definition at line 551 of file Region.cc.

References m_dimension, m_pHigh, m_pLow, and makeDimension().

Referenced by SpatialIndex::RTree::RTree::flush(), getIntersectingRegion(), and SpatialIndex::RTree::Node::isIndex().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

Region & Region::operator= ( const Region r)
virtual

Definition at line 101 of file Region.cc.

References m_dimension, m_pHigh, m_pLow, and makeDimension().

Here is the call graph for this function:

◆ operator==()

bool Region::operator== ( const Region r) const
virtual

Definition at line 113 of file Region.cc.

References m_dimension, m_pHigh, and m_pLow.

◆ storeToByteArray()

void Region::storeToByteArray ( uint8_t **  data,
uint32_t &  length 
)
overridevirtual

Implements Tools::ISerializable.

Reimplemented in SpatialIndex::TimeRegion.

Definition at line 161 of file Region.cc.

References getByteArraySize(), m_dimension, m_pHigh, and m_pLow.

Referenced by SpatialIndex::RTree::Data::storeToByteArray().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ touchesPoint()

bool Region::touchesPoint ( const Point in) const
virtual

Definition at line 388 of file Region.cc.

References SpatialIndex::Point::getCoordinate(), SpatialIndex::Point::m_dimension, m_dimension, m_pHigh, and m_pLow.

Referenced by SpatialIndex::TimeRegion::touchesPointInTime(), touchesShape(), and SpatialIndex::Point::touchesShape().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ touchesRegion()

bool Region::touchesRegion ( const Region in) const
virtual

Definition at line 292 of file Region.cc.

References m_dimension, m_pHigh, and m_pLow.

Referenced by SpatialIndex::TimeRegion::touchesRegionInTime(), touchesShape(), and SpatialIndex::RTree::Node::~Node().

Here is the caller graph for this function:

◆ touchesShape()

bool Region::touchesShape ( const IShape in) const
overridevirtual

Implements SpatialIndex::IShape.

Definition at line 207 of file Region.cc.

References touchesPoint(), and touchesRegion().

Referenced by SpatialIndex::MVRTree::Node::~Node().

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator<<

SIDX_DLL std::ostream& operator<< ( std::ostream &  os,
const Region r 
)
friend

Member Data Documentation

◆ m_dimension

uint32_t SpatialIndex::Region::m_dimension {0}

Definition at line 97 of file Region.h.

Referenced by combinePoint(), combineRegion(), SpatialIndex::MovingRegion::combineRegionAfterTime(), SpatialIndex::MovingRegion::combineRegionInTime(), containsPoint(), SpatialIndex::MovingRegion::containsPointInTime(), containsRegion(), SpatialIndex::MovingRegion::containsRegionAtTime(), SpatialIndex::MovingRegion::containsRegionInTime(), SpatialIndex::TPRTree::TPRTree::deleteData(), SpatialIndex::MVRTree::MVRTree::deleteData(), SpatialIndex::TPRTree::TPRTree::flush(), SpatialIndex::RTree::RTree::flush(), SpatialIndex::MVRTree::MVRTree::flush(), getArea(), SpatialIndex::MovingRegion::getAreaInTime(), getByteArraySize(), SpatialIndex::TimeRegion::getByteArraySize(), SpatialIndex::MovingRegion::getByteArraySize(), getCenter(), SpatialIndex::MovingRegion::getCenterDistanceInTime(), getCombinedRegion(), SpatialIndex::MovingRegion::getCombinedRegionAfterTime(), SpatialIndex::MovingRegion::getCombinedRegionInTime(), getDimension(), SpatialIndex::MovingRegion::getExtrapolatedHigh(), SpatialIndex::MovingRegion::getExtrapolatedLow(), SpatialIndex::MovingRegion::getHigh(), getHigh(), getIntersectingArea(), SpatialIndex::MovingRegion::getIntersectingAreaInTime(), getIntersectingRegion(), SpatialIndex::MovingRegion::getLow(), getLow(), getMargin(), SpatialIndex::MovingRegion::getMBRAtTime(), getMinimumDistance(), SpatialIndex::MovingRegion::getProjectedSurfaceAreaInTime(), SpatialIndex::MovingRegion::getVHigh(), SpatialIndex::MovingRegion::getVLow(), SpatialIndex::MovingRegion::getVMBR(), SpatialIndex::TPRTree::TPRTree::insertData(), SpatialIndex::MVRTree::MVRTree::insertData(), intersectsLineSegment(), SpatialIndex::MovingRegion::intersectsPointInTime(), intersectsRegion(), SpatialIndex::LineSegment::intersectsRegion(), SpatialIndex::MovingRegion::intersectsRegionAtTime(), SpatialIndex::MovingRegion::intersectsRegionInTime(), SpatialIndex::TPRTree::TPRTree::isIndexValid(), SpatialIndex::RTree::RTree::isIndexValid(), SpatialIndex::MVRTree::MVRTree::isIndexValid(), SpatialIndex::MovingRegion::isShrinking(), loadFromByteArray(), SpatialIndex::TimeRegion::loadFromByteArray(), SpatialIndex::MovingRegion::loadFromByteArray(), SpatialIndex::RTree::ExternalSorter::Record::loadFromFile(), makeDimension(), SpatialIndex::TimeRegion::makeDimension(), SpatialIndex::MovingRegion::makeDimension(), makeInfinite(), SpatialIndex::TimeRegion::makeInfinite(), SpatialIndex::MovingRegion::makeInfinite(), SpatialIndex::MovingRegion::MovingRegion(), SpatialIndex::operator<<(), operator=(), SpatialIndex::TimeRegion::operator=(), SpatialIndex::MovingRegion::operator=(), operator==(), SpatialIndex::TimeRegion::operator==(), SpatialIndex::MovingRegion::operator==(), Region(), storeToByteArray(), SpatialIndex::TimeRegion::storeToByteArray(), SpatialIndex::MovingRegion::storeToByteArray(), SpatialIndex::RTree::ExternalSorter::Record::storeToFile(), SpatialIndex::TimeRegion::TimeRegion(), touchesPoint(), touchesRegion(), SpatialIndex::TPRTree::Node::~Node(), SpatialIndex::MVRTree::Node::~Node(), and SpatialIndex::RTree::Node::~Node().

◆ m_pHigh

double* SpatialIndex::Region::m_pHigh {nullptr}

Definition at line 99 of file Region.h.

Referenced by combinePoint(), combineRegion(), SpatialIndex::MovingRegion::combineRegionAfterTime(), SpatialIndex::MovingRegion::combineRegionInTime(), containsPoint(), containsRegion(), SpatialIndex::Ball::containsRegion(), SpatialIndex::TPRTree::TPRTree::deleteData(), SpatialIndex::MVRTree::MVRTree::deleteData(), getArea(), getCenter(), SpatialIndex::MovingRegion::getExtrapolatedHigh(), SpatialIndex::MovingRegion::getHigh(), getHigh(), getIntersectingArea(), SpatialIndex::MovingRegion::getIntersectingAreaInTime(), getIntersectingRegion(), getMargin(), SpatialIndex::Ball::getMBR(), SpatialIndex::MovingPoint::getMBRAtTime(), SpatialIndex::MovingRegion::getMBRAtTime(), getMinimumDistance(), SpatialIndex::LineSegment::getRelativeMaximumDistance(), SpatialIndex::MovingPoint::getVMBR(), SpatialIndex::MovingRegion::getVMBR(), SpatialIndex::TPRTree::TPRTree::insertData(), SpatialIndex::MVRTree::MVRTree::insertData(), intersectsLineSegment(), intersectsRegion(), SpatialIndex::TPRTree::TPRTree::isIndexValid(), SpatialIndex::RTree::RTree::isIndexValid(), SpatialIndex::MVRTree::MVRTree::isIndexValid(), loadFromByteArray(), SpatialIndex::TPRTree::Node::loadFromByteArray(), SpatialIndex::MVRTree::Node::loadFromByteArray(), SpatialIndex::RTree::Node::loadFromByteArray(), SpatialIndex::TimeRegion::loadFromByteArray(), SpatialIndex::MovingRegion::loadFromByteArray(), SpatialIndex::RTree::ExternalSorter::Record::loadFromFile(), makeDimension(), SpatialIndex::TimeRegion::makeDimension(), SpatialIndex::MovingRegion::makeDimension(), makeInfinite(), SpatialIndex::TimeRegion::makeInfinite(), SpatialIndex::MovingRegion::makeInfinite(), SpatialIndex::MovingRegion::MovingRegion(), SpatialIndex::RTree::ExternalSorter::Record::operator<(), SpatialIndex::operator<<(), operator=(), SpatialIndex::TimeRegion::operator=(), SpatialIndex::MovingRegion::operator=(), operator==(), SpatialIndex::TimeRegion::operator==(), SpatialIndex::MovingRegion::operator==(), Region(), storeToByteArray(), SpatialIndex::TPRTree::Node::storeToByteArray(), SpatialIndex::MVRTree::Node::storeToByteArray(), SpatialIndex::RTree::Node::storeToByteArray(), SpatialIndex::TimeRegion::storeToByteArray(), SpatialIndex::MovingRegion::storeToByteArray(), SpatialIndex::RTree::ExternalSorter::Record::storeToFile(), SpatialIndex::TimeRegion::TimeRegion(), touchesPoint(), touchesRegion(), SpatialIndex::TPRTree::Node::~Node(), SpatialIndex::MVRTree::Node::~Node(), SpatialIndex::RTree::Node::~Node(), and ~Region().

◆ m_pLow

double* SpatialIndex::Region::m_pLow {nullptr}

Definition at line 98 of file Region.h.

Referenced by SpatialIndex::RTree::Index::adjustTree(), combinePoint(), combineRegion(), SpatialIndex::MovingRegion::combineRegionAfterTime(), SpatialIndex::MovingRegion::combineRegionInTime(), containsPoint(), containsRegion(), SpatialIndex::Ball::containsRegion(), SpatialIndex::TPRTree::TPRTree::deleteData(), SpatialIndex::MVRTree::MVRTree::deleteData(), getArea(), getCenter(), SpatialIndex::MovingRegion::getExtrapolatedLow(), getIntersectingArea(), SpatialIndex::MovingRegion::getIntersectingAreaInTime(), getIntersectingRegion(), SpatialIndex::MovingRegion::getLow(), getLow(), getMargin(), SpatialIndex::Ball::getMBR(), SpatialIndex::MovingPoint::getMBRAtTime(), SpatialIndex::MovingRegion::getMBRAtTime(), getMinimumDistance(), SpatialIndex::LineSegment::getRelativeMaximumDistance(), SpatialIndex::MovingPoint::getVMBR(), SpatialIndex::MovingRegion::getVMBR(), SpatialIndex::TPRTree::TPRTree::insertData(), SpatialIndex::MVRTree::MVRTree::insertData(), intersectsLineSegment(), intersectsRegion(), SpatialIndex::TPRTree::TPRTree::isIndexValid(), SpatialIndex::RTree::RTree::isIndexValid(), SpatialIndex::MVRTree::MVRTree::isIndexValid(), loadFromByteArray(), SpatialIndex::TPRTree::Node::loadFromByteArray(), SpatialIndex::MVRTree::Node::loadFromByteArray(), SpatialIndex::RTree::Node::loadFromByteArray(), SpatialIndex::TimeRegion::loadFromByteArray(), SpatialIndex::MovingRegion::loadFromByteArray(), SpatialIndex::RTree::ExternalSorter::Record::loadFromFile(), makeDimension(), SpatialIndex::TimeRegion::makeDimension(), SpatialIndex::MovingRegion::makeDimension(), makeInfinite(), SpatialIndex::TimeRegion::makeInfinite(), SpatialIndex::MovingRegion::makeInfinite(), SpatialIndex::MovingRegion::MovingRegion(), SpatialIndex::RTree::ExternalSorter::Record::operator<(), SpatialIndex::operator<<(), operator=(), SpatialIndex::TimeRegion::operator=(), SpatialIndex::MovingRegion::operator=(), operator==(), SpatialIndex::TimeRegion::operator==(), SpatialIndex::MovingRegion::operator==(), Region(), storeToByteArray(), SpatialIndex::TPRTree::Node::storeToByteArray(), SpatialIndex::RTree::Node::storeToByteArray(), SpatialIndex::MVRTree::Node::storeToByteArray(), SpatialIndex::TimeRegion::storeToByteArray(), SpatialIndex::MovingRegion::storeToByteArray(), SpatialIndex::RTree::ExternalSorter::Record::storeToFile(), SpatialIndex::TimeRegion::TimeRegion(), touchesPoint(), touchesRegion(), SpatialIndex::TPRTree::Node::~Node(), SpatialIndex::MVRTree::Node::~Node(), SpatialIndex::RTree::Node::~Node(), and ~Region().


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