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

Method LoadRegionsSparseGraph

libs/routing/regions_sparse_graph.cpp:32–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30{}
31
32void RegionsSparseGraph::LoadRegionsSparseGraph()
33{
34 MwmSet::MwmHandle mwmWorld = indexer::FindWorld(m_dataSource);
35 if (!mwmWorld.IsAlive())
36 {
37 LOG(LWARNING, ("Couldn't open world mwm."));
38 return;
39 }
40
41 auto const & mwmValue = *mwmWorld.GetValue();
42 if (!mwmValue.m_cont.IsExist(ROUTING_WORLD_FILE_TAG))
43 {
44 LOG(LWARNING, ("Section", ROUTING_WORLD_FILE_TAG, "doesn't exist in world mwm."));
45 return;
46 }
47
48 ReaderSource<FilesContainerR::TReader> reader(mwmValue.m_cont.GetReader(ROUTING_WORLD_FILE_TAG));
49 CrossBorderGraphSerializer::Deserialize(m_graph, reader, m_numMwmIds);
50 ASSERT(!m_graph.m_segments.empty(), ());
51}
52
53std::optional<FakeEnding> RegionsSparseGraph::GetFakeEnding(m2::PointD const & point) const
54{

Callers 1

DoMethod · 0.80

Calls 7

FindWorldFunction · 0.85
ASSERTFunction · 0.85
IsExistMethod · 0.80
IsAliveMethod · 0.45
GetValueMethod · 0.45
GetReaderMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected