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

Method FindMwmId

tools/track_analyzing/log_parser.cpp:63–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61 }
62
63 routing::NumMwmId FindMwmId(m2::PointD const & point, routing::NumMwmId expectedId) const
64 {
65 if (expectedId != routing::kFakeNumMwmId && m2::RegionsContain(GetBorders(expectedId), point))
66 return expectedId;
67
68 routing::NumMwmId result = routing::kFakeNumMwmId;
69 m2::RectD const rect = mercator::RectByCenterXYAndSizeInMeters(point, 1);
70 m_mwmTree->ForEachInRect(rect, [&](routing::NumMwmId numMwmId)
71 {
72 if (result == routing::kFakeNumMwmId && m2::RegionsContain(GetBorders(numMwmId), point))
73 result = numMwmId;
74 });
75
76 return result;
77 }
78
79private:
80 vector<m2::RegionD> const & GetBorders(routing::NumMwmId numMwmId) const

Callers 1

SplitIntoMwmsMethod · 0.80

Calls 3

RegionsContainFunction · 0.85
ForEachInRectMethod · 0.45

Tested by

no test coverage detected