libosmscout 0.1
Loading...
Searching...
No Matches
osmscout::Area::Ring Class Reference

#include <Area.h>

Public Member Functions

void CopyMissingValues (const FeatureValueBuffer &buffer)
Id GetBackId () const
GeoBox GetBoundingBox () const
bool GetCenter (GeoCoord &center) const
const GeoCoord & GetCoord (size_t index) const
const FeatureInstance & GetFeature (size_t idx) const
size_t GetFeatureCount () const
const FeatureValueBuffer & GetFeatureValueBuffer () const
Id GetFrontId () const
Id GetId (size_t index) const
bool GetNodeIndexByNodeId (Id id, size_t &index) const
uint8_t GetRing () const
Id GetSerial (size_t index) const
TypeInfoRef GetType () const
bool HasAnyFeaturesSet () const
bool HasFeature (size_t idx) const
bool IsMaster () const
bool IsOuter () const
bool IsTopOuter () const
void MarkAsMasterRing ()
void MarkAsOuterRing ()
 Ring ()=default
void SetFeatures (const FeatureValueBuffer &buffer)
void SetRing (uint8_t ring)
void SetType (const TypeInfoRef &type)
void UnsetFeature (size_t idx)

Public Attributes

GeoBox bbox
 Precomputed (cache) bounding box.
std::optional< GeoCoord > center
std::vector< Point > nodes
 Note that ring nodes, bbox and segments fields are public for simple manipulation.
std::vector< SegmentGeoBox > segments
 Precomputed (cache) segment bounding boxes for optimisation.

Friends

class Area

Constructor & Destructor Documentation

◆ Ring()

osmscout::Area::Ring::Ring ( )
default

Member Function Documentation

◆ CopyMissingValues()

void osmscout::Area::Ring::CopyMissingValues ( const FeatureValueBuffer & buffer)
inline

◆ GetBackId()

Id osmscout::Area::Ring::GetBackId ( ) const
inline

References nodes.

◆ GetBoundingBox()

GeoBox osmscout::Area::Ring::GetBoundingBox ( ) const

◆ GetCenter()

bool osmscout::Area::Ring::GetCenter ( GeoCoord & center) const

References center, and nodes.

◆ GetCoord()

const GeoCoord & osmscout::Area::Ring::GetCoord ( size_t index) const
inline

References nodes.

◆ GetFeature()

const FeatureInstance & osmscout::Area::Ring::GetFeature ( size_t idx) const
inline

◆ GetFeatureCount()

size_t osmscout::Area::Ring::GetFeatureCount ( ) const
inline

Referenced by HasAnyFeaturesSet().

◆ GetFeatureValueBuffer()

const FeatureValueBuffer & osmscout::Area::Ring::GetFeatureValueBuffer ( ) const
inline

◆ GetFrontId()

Id osmscout::Area::Ring::GetFrontId ( ) const
inline

References nodes.

◆ GetId()

Id osmscout::Area::Ring::GetId ( size_t index) const
inline

References nodes.

Referenced by GetNodeIndexByNodeId().

◆ GetNodeIndexByNodeId()

bool osmscout::Area::Ring::GetNodeIndexByNodeId ( Id id,
size_t & index ) const

References GetId(), and nodes.

◆ GetRing()

uint8_t osmscout::Area::Ring::GetRing ( ) const
inline

◆ GetSerial()

Id osmscout::Area::Ring::GetSerial ( size_t index) const
inline

References nodes.

◆ GetType()

TypeInfoRef osmscout::Area::Ring::GetType ( ) const
inline

◆ HasAnyFeaturesSet()

bool osmscout::Area::Ring::HasAnyFeaturesSet ( ) const

References GetFeatureCount().

◆ HasFeature()

bool osmscout::Area::Ring::HasFeature ( size_t idx) const
inline

◆ IsMaster()

bool osmscout::Area::Ring::IsMaster ( ) const
inline

◆ IsOuter()

bool osmscout::Area::Ring::IsOuter ( ) const
inline

◆ IsTopOuter()

bool osmscout::Area::Ring::IsTopOuter ( ) const
inline

◆ MarkAsMasterRing()

void osmscout::Area::Ring::MarkAsMasterRing ( )
inline

◆ MarkAsOuterRing()

void osmscout::Area::Ring::MarkAsOuterRing ( )
inline

◆ SetFeatures()

void osmscout::Area::Ring::SetFeatures ( const FeatureValueBuffer & buffer)
inline

◆ SetRing()

void osmscout::Area::Ring::SetRing ( uint8_t ring)
inline

◆ SetType()

void osmscout::Area::Ring::SetType ( const TypeInfoRef & type)
inline

◆ UnsetFeature()

void osmscout::Area::Ring::UnsetFeature ( size_t idx)
inline

◆ Area

friend class Area
friend

References Area.

Referenced by Area.

Member Data Documentation

◆ bbox

GeoBox osmscout::Area::Ring::bbox

Precomputed (cache) bounding box.

Referenced by GetBoundingBox(), and osmscout::OverlayArea::toArea().

◆ center

std::optional<GeoCoord> osmscout::Area::Ring::center

"visual" polygon center (pole of inaccessibility). It is computed just for rings when center is far from bounding box center

Referenced by GetCenter().

◆ nodes

std::vector<Point> osmscout::Area::Ring::nodes

Note that ring nodes, bbox and segments fields are public for simple manipulation.

User that modify it is responsible to keep these values in sync! You should not rely on segments and bbox, it is just a cache used some algorithms. It may be empty/invalid! The array of coordinates

Referenced by GetBackId(), GetBoundingBox(), GetCenter(), GetCoord(), GetFrontId(), GetId(), GetNodeIndexByNodeId(), GetSerial(), osmscout::PolygonCenter(), and osmscout::OverlayArea::toArea().

◆ segments

std::vector<SegmentGeoBox> osmscout::Area::Ring::segments

Precomputed (cache) segment bounding boxes for optimisation.

Referenced by osmscout::OverlayArea::toArea().


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