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

Function BuildRoadAccessInfo

generator/road_access_generator.cpp:714–736  ·  view source on GitHub ↗

Functions ------------------------------------------------------------------

Source from the content-addressed store, hash-verified

712
713// Functions ------------------------------------------------------------------
714bool BuildRoadAccessInfo(string const & dataFilePath, string const & roadAccessPath,
715 routing::OsmWay2FeaturePoint & way2feature)
716{
717 LOG(LINFO, ("Generating road access info for", dataFilePath));
718
719 try
720 {
721 RoadAccessByVehicleType roadAccessByVehicleType;
722 ReadRoadAccess(roadAccessPath, way2feature, roadAccessByVehicleType);
723
724 FilesContainerW cont(dataFilePath, FileWriter::OP_WRITE_EXISTING);
725 auto writer = cont.GetWriter(ROAD_ACCESS_FILE_TAG);
726
727 routing::RoadAccessSerializer::Serialize(*writer, roadAccessByVehicleType);
728 }
729 catch (RootException const & ex)
730 {
731 LOG(LWARNING, ("No road access created:", ex.Msg()));
732 return false;
733 }
734
735 return true;
736}
737} // namespace routing_builder

Callers 2

generator_tool.cppFile · 0.85
BuildRoutingMethod · 0.85

Calls 3

ReadRoadAccessFunction · 0.85
SerializeFunction · 0.85
GetWriterMethod · 0.80

Tested by 1

BuildRoutingMethod · 0.68