libosmscout 0.1
Loading...
Searching...
No Matches
osmscout::Way Class Referencefinal

#include <Way.h>

Public Member Functions

const Point & GetBack () const
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
FeatureValue * GetFeatureValue (size_t idx) const
const FeatureValueBuffer & GetFeatureValueBuffer () const
FileOffset GetFileOffset () const
const Point & GetFront () const
Id GetFrontId () const
Id GetId (size_t index) const
FileOffset GetNextFileOffset () const
bool GetNodeIndexByNodeId (Id id, size_t &index) const
ObjectFileRef GetObjectFileRef () const
const Point & GetPoint (size_t index) const
Id GetSerial (size_t index) const
TypeInfoRef GetType () const
bool HasFeature (size_t idx) const
bool Intersects (const GeoBox &boundingBox) const
 Returns true if the bounding box of the object intersects the given bounding box.
bool IsCircular () const
bool IsValid () const
void Read (const TypeConfig &typeConfig, FileScanner &scanner)
 Read the data from the given FileScanner.
void ReadOptimized (const TypeConfig &typeConfig, FileScanner &scanner)
 Read the data from the given FileScanner.
void SetFeatures (const FeatureValueBuffer &buffer)
void SetType (const TypeInfoRef &type)
void UnsetFeature (size_t idx)
 Way ()=default
void Write (const TypeConfig &typeConfig, FileWriter &writer) const
 Writes the data to the given FileWriter.
void WriteOptimized (const TypeConfig &typeConfig, FileWriter &writer) const
 Writes the data to the given FileWriter.

Public Attributes

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

Constructor & Destructor Documentation

◆ Way()

osmscout::Way::Way ( )
default

Member Function Documentation

◆ GetBack()

const Point & osmscout::Way::GetBack ( ) const
inline

References nodes.

◆ GetBackId()

Id osmscout::Way::GetBackId ( ) const
inline

References nodes.

◆ GetBoundingBox()

GeoBox osmscout::Way::GetBoundingBox ( ) const
inline

◆ GetCenter()

bool osmscout::Way::GetCenter ( GeoCoord & center) const

References nodes, and osmscout::GeoCoord::Set().

◆ GetCoord()

const GeoCoord & osmscout::Way::GetCoord ( size_t index) const
inline

References nodes.

◆ GetFeature()

const FeatureInstance & osmscout::Way::GetFeature ( size_t idx) const
inline

◆ GetFeatureCount()

size_t osmscout::Way::GetFeatureCount ( ) const
inline

◆ GetFeatureValue()

FeatureValue * osmscout::Way::GetFeatureValue ( size_t idx) const
inline

◆ GetFeatureValueBuffer()

◆ GetFileOffset()

FileOffset osmscout::Way::GetFileOffset ( ) const
inline

◆ GetFront()

const Point & osmscout::Way::GetFront ( ) const
inline

References nodes.

◆ GetFrontId()

Id osmscout::Way::GetFrontId ( ) const
inline

References nodes.

◆ GetId()

◆ GetNextFileOffset()

FileOffset osmscout::Way::GetNextFileOffset ( ) const
inline

◆ GetNodeIndexByNodeId()

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

References GetId(), and nodes.

◆ GetObjectFileRef()

ObjectFileRef osmscout::Way::GetObjectFileRef ( ) const
inline

◆ GetPoint()

const Point & osmscout::Way::GetPoint ( size_t index) const
inline

◆ GetSerial()

Id osmscout::Way::GetSerial ( size_t index) const
inline

References nodes.

◆ GetType()

◆ HasFeature()

bool osmscout::Way::HasFeature ( size_t idx) const
inline

◆ Intersects()

bool osmscout::Way::Intersects ( const GeoBox & boundingBox) const
inline

Returns true if the bounding box of the object intersects the given bounding box.

Parameters
boundingBoxbounding box to test for intersection
Returns
true on intersection, else false

References GetBoundingBox().

◆ IsCircular()

bool osmscout::Way::IsCircular ( ) const
inline

References nodes.

◆ IsValid()

bool osmscout::Way::IsValid ( ) const
inline

References nodes.

◆ Read()

◆ ReadOptimized()

void osmscout::Way::ReadOptimized ( const TypeConfig & typeConfig,
FileScanner & scanner )

◆ SetFeatures()

void osmscout::Way::SetFeatures ( const FeatureValueBuffer & buffer)
inline

◆ SetType()

void osmscout::Way::SetType ( const TypeInfoRef & type)
inline

◆ UnsetFeature()

void osmscout::Way::UnsetFeature ( size_t idx)
inline

◆ Write()

void osmscout::Way::Write ( const TypeConfig & typeConfig,
FileWriter & writer ) const

◆ WriteOptimized()

void osmscout::Way::WriteOptimized ( const TypeConfig & typeConfig,
FileWriter & writer ) const

Member Data Documentation

◆ bbox

GeoBox osmscout::Way::bbox

Precomputed (cache) bounding box.

Referenced by GetBoundingBox(), Read(), and ReadOptimized().

◆ nodes

◆ segments

std::vector<SegmentGeoBox> osmscout::Way::segments

Precomputed (cache) segment bounding boxes for optimisation.

Referenced by Read(), and ReadOptimized().


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