| 111 | } |
| 112 | |
| 113 | void 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 | |
| 137 | routing::FeatureIdToOsmId TestRawGenerator::LoadFID2OsmID(std::string const & mwmName) |
| 138 | { |
nothing calls this directly
no test coverage detected