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

Method TrackMatcher

tools/track_analyzing/track_matcher.cpp:52–69  ·  view source on GitHub ↗

TrackMatcher ------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

50
51// TrackMatcher ------------------------------------------------------------------------------------
52TrackMatcher::TrackMatcher(storage::Storage const & storage, NumMwmId mwmId, platform::CountryFile const & countryFile)
53 : m_mwmId(mwmId)
54 , m_vehicleModel(CarModelFactory({}).GetVehicleModelForCountry(countryFile.GetName()))
55{
56 auto localCountryFile = storage.GetLatestLocalFile(countryFile);
57 CHECK(localCountryFile, ("Can't find latest country file for", countryFile.GetName()));
58 auto registerResult = m_dataSource.Register(*localCountryFile);
59 CHECK_EQUAL(registerResult.second, MwmSet::RegResult::Success, ("Can't register mwm", countryFile.GetName()));
60
61 MwmSet::MwmHandle handle = m_dataSource.GetMwmHandleByCountryFile(countryFile);
62
63 m_graph = make_unique<IndexGraph>(
64 make_shared<Geometry>(GeometryLoader::Create(handle, m_vehicleModel, false /* loadAltitudes */)),
65 EdgeEstimator::Create(VehicleType::Car, *m_vehicleModel, nullptr /* trafficStash */, nullptr /* dataSource */,
66 nullptr /* numMvmIds */));
67
68 DeserializeIndexGraph(*handle.GetValue(), VehicleType::Car, *m_graph);
69}
70
71void TrackMatcher::MatchTrack(vector<DataPoint> const & track, vector<MatchedTrack> & matchedTracks)
72{

Callers

nothing calls this directly

Calls 9

CarModelFactoryClass · 0.85
CreateFunction · 0.85
DeserializeIndexGraphFunction · 0.85
GetLatestLocalFileMethod · 0.80
RegisterMethod · 0.80
GetNameMethod · 0.45
GetValueMethod · 0.45

Tested by

no test coverage detected