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

Method CollectShapesSubway

libs/drape_frontend/transit_scheme_builder.cpp:639–662  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

637}
638
639void TransitSchemeBuilder::CollectShapesSubway(TransitDisplayInfo const & transitDisplayInfo, MwmSchemeData & scheme)
640{
641 CHECK_EQUAL(transitDisplayInfo.m_transitVersion, ::transit::TransitVersion::OnlySubway, ());
642
643 std::map<uint32_t, std::vector<routing::transit::LineId>> roads;
644
645 for (auto const & line : transitDisplayInfo.m_linesSubway)
646 {
647 auto const lineId = line.second.GetId();
648 auto const roadId = GetRouteId(lineId);
649 roads[roadId].push_back(lineId);
650 }
651
652 for (auto const & line : transitDisplayInfo.m_linesSubway)
653 {
654 auto const lineId = line.second.GetId();
655 auto const roadId = GetRouteId(lineId);
656
657 auto const & stopsRanges = line.second.GetStopIds();
658 for (auto const & stops : stopsRanges)
659 for (size_t i = 1; i < stops.size(); ++i)
660 FindShapes(stops[i - 1], stops[i], lineId, roads[roadId], transitDisplayInfo, scheme);
661 }
662}
663
664void TransitSchemeBuilder::CollectShapesPT(TransitDisplayInfo const & transitDisplayInfo, MwmSchemeData & scheme)
665{

Callers

nothing calls this directly

Calls 4

GetRouteIdFunction · 0.85
GetIdMethod · 0.45
push_backMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected