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

Method Get

libs/search/reverse_geocoder.cpp:337–365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

335}
336
337std::optional<HouseToStreetTable::Result> ReverseGeocoder::HouseTable::Get(FeatureID const & fid)
338{
339 if (feature::FakeFeatureIds::IsEditorCreatedFeature(fid.m_index))
340 return {};
341
342 if (m_handle.GetId() != fid.m_mwmId)
343 {
344 auto handle = m_dataSource.GetMwmHandleById(fid.m_mwmId);
345 if (!handle.IsAlive())
346 {
347 LOG(LWARNING, ("MWM", fid, "is dead"));
348 return {};
349 }
350 m_handle = std::move(handle);
351 }
352
353 auto value = m_handle.GetValue();
354 if (!value->m_house2street)
355 value->m_house2street = LoadHouseToStreetTable(*value);
356
357 auto res = value->m_house2street->Get(fid.m_index);
358 if (!res && m_placeAsStreet)
359 {
360 if (!value->m_house2place)
361 value->m_house2place = LoadHouseToPlaceTable(*value);
362 res = value->m_house2place->Get(fid.m_index);
363 }
364 return res;
365}
366
367string ReverseGeocoder::Address::FormatAddress() const
368{

Callers 1

GetNearbyAddressMethod · 0.45

Calls 6

LoadHouseToStreetTableFunction · 0.85
LoadHouseToPlaceTableFunction · 0.85
GetIdMethod · 0.45
GetMwmHandleByIdMethod · 0.45
IsAliveMethod · 0.45
GetValueMethod · 0.45

Tested by

no test coverage detected