| 53 | } |
| 54 | |
| 55 | bool FillRoadsFromFile(CrossBorderGraph & graph, std::string const & roadsFilePath) |
| 56 | { |
| 57 | try |
| 58 | { |
| 59 | auto reader = coding::CSVReader(roadsFilePath, false /* hasHeader */, ' ' /* delimiter */); |
| 60 | |
| 61 | reader.ForEachRow([&](auto const & row) |
| 62 | { |
| 63 | auto const & [segId, seg] = ReadSegment(row); |
| 64 | graph.AddCrossBorderSegment(segId, seg); |
| 65 | }); |
| 66 | |
| 67 | return true; |
| 68 | } |
| 69 | catch (std::exception const & e) |
| 70 | { |
| 71 | LOG(LERROR, ("Exception while filling graph", e.what())); |
| 72 | } |
| 73 | |
| 74 | return false; |
| 75 | } |
| 76 | |
| 77 | bool BuildWorldRoads(std::string const & mwmFilePath, std::string const & roadsFilePath) |
| 78 | { |
no test coverage detected