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

Method BuildRouting

generator/generator_tests_support/test_generator.cpp:113–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113void TestRawGenerator::BuildRouting(std::string const & mwmName, std::string const & countryName)
114{
115 using namespace routing_builder;
116 CountryParentNameGetterFn const parentGetter = [&countryName](std::string const & name)
117 { return (name != countryName ? countryName : std::string()); };
118
119 std::string const filePath = GetMwmPath(mwmName);
120 std::string const osmToFeatureFilename = filePath + OSM2FEATURE_FILE_EXTENSION;
121
122 routing_builder::BuildRoutingIndex(filePath, countryName, parentGetter);
123
124 auto osm2feature = routing::CreateWay2FeatureMapper(filePath, osmToFeatureFilename);
125 BuildRoadAccessInfo(filePath, m_genInfo.GetIntermediateFileName(ROAD_ACCESS_FILENAME), *osm2feature);
126 BuildCamerasInfo(filePath, m_genInfo.GetIntermediateFileName(CAMERAS_TO_WAYS_FILENAME), osmToFeatureFilename);
127
128 auto routingGraph = CreateIndexGraph(filePath, countryName, parentGetter);
129 CHECK(routingGraph, ());
130
131 BuildRoadRestrictions(*routingGraph, filePath, m_genInfo.GetIntermediateFileName(RESTRICTIONS_FILENAME),
132 osmToFeatureFilename);
133 BuildMaxspeedsSection(routingGraph.get(), filePath, osmToFeatureFilename,
134 m_genInfo.GetIntermediateFileName(MAXSPEEDS_FILENAME));
135}
136
137routing::FeatureIdToOsmId TestRawGenerator::LoadFID2OsmID(std::string const & mwmName)
138{

Callers

nothing calls this directly

Calls 10

BuildRoutingIndexFunction · 0.85
CreateWay2FeatureMapperFunction · 0.85
BuildRoadAccessInfoFunction · 0.85
BuildCamerasInfoFunction · 0.85
CreateIndexGraphFunction · 0.85
BuildRoadRestrictionsFunction · 0.85
BuildMaxspeedsSectionFunction · 0.85
getMethod · 0.65
GetMwmPathFunction · 0.50

Tested by

no test coverage detected