MCPcopy Create free account
hub / github.com/comaps/comaps / LoadPathAttributes

Method LoadPathAttributes

libs/routing/directions_engine.cpp:81–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81void DirectionsEngine::LoadPathAttributes(FeatureID const & featureId, LoadedPathSegment & pathSegment, bool isForward)
82{
83 if (!featureId.IsValid())
84 return;
85
86 auto ft = GetFeature(featureId);
87 if (!ft)
88 return;
89
90 feature::TypesHolder types(*ft);
91
92 LoadLanes(pathSegment, *ft, isForward);
93
94 pathSegment.m_highwayClass = GetHighwayClass(types);
95 ASSERT(pathSegment.m_highwayClass != HighwayClass::Undefined, (featureId));
96
97 pathSegment.m_isLink = m_linkChecker(types);
98 pathSegment.m_onRoundabout = m_roundAboutChecker(types);
99 pathSegment.m_isOneWay = m_onewayChecker(types);
100
101 pathSegment.m_roadNameInfo.m_isLink = pathSegment.m_isLink;
102 pathSegment.m_roadNameInfo.m_junction_ref = ft->GetMetadata(feature::Metadata::FMD_JUNCTION_REF);
103 pathSegment.m_roadNameInfo.m_destination_ref = ft->GetMetadata(feature::Metadata::FMD_DESTINATION_REF);
104 pathSegment.m_roadNameInfo.m_destination = ft->GetMetadata(feature::Metadata::FMD_DESTINATION);
105 /// @todo Should make some better parsing here (@see further use in GetFullRoadName).
106 pathSegment.m_roadNameInfo.m_ref = ft->GetRef();
107 pathSegment.m_roadNameInfo.m_name = ft->GetName(localisation::kDefaultNameIndex);
108}
109
110void DirectionsEngine::GetSegmentRangeAndAdjacentEdges(IRoadGraph::EdgeListT const & outgoingEdges, Edge const & inEdge,
111 uint32_t startSegId, uint32_t endSegId,

Callers

nothing calls this directly

Calls 6

LoadLanesFunction · 0.85
GetHighwayClassFunction · 0.85
ASSERTFunction · 0.85
IsValidMethod · 0.45
GetMetadataMethod · 0.45
GetNameMethod · 0.45

Tested by

no test coverage detected