libosmscout  0.1
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 GeoCoordGetCoord (size_t index) const
 
const FeatureInstanceGetFeature (size_t idx) const
 
size_t GetFeatureCount () const
 
const FeatureValueBufferGetFeatureValueBuffer () 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. More...
 
std::optional< GeoCoordcenter
 "visual" polygon center (pole of inaccessibility). More...
 
std::vector< Pointnodes
 Note that ring nodes, bbox and segments fields are public for simple manipulation. More...
 
std::vector< SegmentGeoBoxsegments
 Precomputed (cache) segment bounding boxes for optimisation. More...
 

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

◆ GetBoundingBox()

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

◆ GetCenter()

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

◆ GetCoord()

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

◆ GetFeature()

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

◆ GetFeatureCount()

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

◆ GetFeatureValueBuffer()

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

◆ GetFrontId()

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

◆ GetId()

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

◆ GetNodeIndexByNodeId()

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

◆ GetRing()

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

◆ GetSerial()

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

◆ GetType()

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

◆ HasAnyFeaturesSet()

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

◆ 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

Friends And Related Function Documentation

◆ Area

friend class Area
friend

Member Data Documentation

◆ bbox

GeoBox osmscout::Area::Ring::bbox

Precomputed (cache) bounding box.

Referenced by 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

◆ 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 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: