|
libosmscout 0.1
|
#include <Way.h>
Public Member Functions | |
| const Point & | GetBack () const |
| Id | GetBackId () const |
| GeoBox | GetBoundingBox () const |
| bool | GetCenter (GeoCoord ¢er) 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. | |
|
default |
|
inline |
References bbox, osmscout::GetBoundingBox(), and nodes.
Referenced by osmscout::MapPainter::CanWayBeVisible(), osmscout::DescriptionService::GetDescription(), and Intersects().
| bool osmscout::Way::GetCenter | ( | GeoCoord & | center | ) | const |
References nodes, and osmscout::GeoCoord::Set().
|
inline |
References osmscout::TypeInfo::GetFeature(), and osmscout::FeatureInstance::GetType().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
References nodes.
Referenced by GetNodeIndexByNodeId(), osmscout::AbstractRoutingService< RoutingState >::GetStartBackwardRouteNode(), osmscout::AbstractRoutingService< RoutingState >::GetStartForwardRouteNode(), osmscout::AbstractRoutingService< RoutingState >::GetTargetBackwardRouteNode(), osmscout::AbstractRoutingService< RoutingState >::GetTargetForwardRouteNode(), osmscout::AbstractRoutingService< RoutingState >::GetWayStartNodes(), and osmscout::AbstractRoutingService< MultiDBRoutingState >::TransformRouteDataToWay().
|
inline |
| bool osmscout::Way::GetNodeIndexByNodeId | ( | Id | id, |
| size_t & | index ) const |
|
inline |
References osmscout::refWay.
Referenced by osmscout::DescriptionService::GetDescription().
|
inline |
References nodes.
Referenced by osmscout::AbstractRoutingService< RoutingState >::TransformRouteDataToPoints().
|
inline |
|
inline |
|
inline |
Returns true if the bounding box of the object intersects the given bounding box.
| boundingBox | bounding box to test for intersection |
References GetBoundingBox().
|
inline |
References nodes.
|
inline |
References nodes.
| void osmscout::Way::Read | ( | const TypeConfig & | typeConfig, |
| FileScanner & | scanner ) |
Read the data from the given FileScanner.
| IOException |
References bbox, osmscout::FileScanner::GetFilename(), osmscout::FileScanner::GetPos(), osmscout::TypeConfig::GetWayTypeIdBytes(), osmscout::TypeConfig::GetWayTypeInfo(), osmscout::TypeConfig::GetWayTypes(), nodes, osmscout::FileScanner::Read(), osmscout::FileScanner::ReadTypeId(), and segments.
| void osmscout::Way::ReadOptimized | ( | const TypeConfig & | typeConfig, |
| FileScanner & | scanner ) |
Read the data from the given FileScanner.
Node Ids are not read.
| IOException |
References bbox, osmscout::FileScanner::GetPos(), osmscout::TypeConfig::GetWayTypeIdBytes(), osmscout::TypeConfig::GetWayTypeInfo(), nodes, osmscout::FileScanner::Read(), osmscout::FileScanner::ReadTypeId(), and segments.
|
inline |
|
inline |
|
inline |
| void osmscout::Way::Write | ( | const TypeConfig & | typeConfig, |
| FileWriter & | writer ) const |
Writes the data to the given FileWriter.
| IOException |
References osmscout::TypeConfig::GetWayTypeIdBytes(), nodes, osmscout::FileWriter::Write(), and osmscout::FileWriter::WriteTypeId().
| void osmscout::Way::WriteOptimized | ( | const TypeConfig & | typeConfig, |
| FileWriter & | writer ) const |
Writes the data to the given FileWriter.
Node Ids are not written.
| IOException |
References osmscout::TypeConfig::GetWayTypeIdBytes(), nodes, osmscout::FileWriter::Write(), and osmscout::FileWriter::WriteTypeId().
| GeoBox osmscout::Way::bbox |
Precomputed (cache) bounding box.
Referenced by GetBoundingBox(), Read(), and ReadOptimized().
| std::vector<Point> osmscout::Way::nodes |
Note that way 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! List of nodes
Referenced by GetBack(), GetBackId(), GetBoundingBox(), GetCenter(), GetCoord(), GetFront(), GetFrontId(), GetId(), GetNodeIndexByNodeId(), GetPoint(), osmscout::AbstractRoutingService< RoutingState >::GetRNode(), GetSerial(), osmscout::AbstractRoutingService< RoutingState >::GetStartBackwardRouteNode(), osmscout::AbstractRoutingService< RoutingState >::GetStartForwardRouteNode(), osmscout::AbstractRoutingService< RoutingState >::GetTargetBackwardRouteNode(), osmscout::AbstractRoutingService< RoutingState >::GetTargetForwardRouteNode(), osmscout::AbstractRoutingService< RoutingState >::GetWayStartNodes(), IsCircular(), IsValid(), Read(), ReadOptimized(), osmscout::AbstractRoutingService< RoutingState >::RestrictInitialUTurn(), osmscout::AbstractRoutingService< RoutingState >::TransformRouteDataToWay(), osmscout::AbstractRoutingService< MultiDBRoutingState >::TransformRouteDataToWay(), Write(), and WriteOptimized().
| std::vector<SegmentGeoBox> osmscout::Way::segments |
Precomputed (cache) segment bounding boxes for optimisation.
Referenced by Read(), and ReadOptimized().