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

Function BuildRoadRestrictions

generator/restriction_generator.cpp:89–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87}
88
89bool BuildRoadRestrictions(IndexGraph & graph, std::string const & mwmPath, std::string const & restrictionPath,
90 std::string const & osmIdsToFeatureIdsPath)
91{
92 LOG(LINFO, ("Generating restrictions for", restrictionPath));
93
94 auto collector = std::make_unique<RestrictionCollector>(osmIdsToFeatureIdsPath, graph);
95 if (!collector->Process(restrictionPath))
96 return false;
97
98 if (!collector->HasRestrictions())
99 {
100 LOG(LWARNING,
101 ("No restrictions created. Check that", restrictionPath, "and", osmIdsToFeatureIdsPath, "are available."));
102 return false;
103 }
104
105 SerializeRestrictions(*collector, mwmPath);
106 return true;
107}
108
109} // namespace routing_builder

Callers 2

generator_tool.cppFile · 0.85
BuildRoutingMethod · 0.85

Calls 3

SerializeRestrictionsFunction · 0.85
ProcessMethod · 0.45
HasRestrictionsMethod · 0.45

Tested by 1

BuildRoutingMethod · 0.68