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

Method LimitedSearch

libs/search/geocoder.cpp:1090–1111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1088}
1089
1090void Geocoder::LimitedSearch(BaseContext & ctx, FeaturesFilter const & filter, CentersFilter const & centers)
1091{
1092 m_filter = &filter;
1093 SCOPE_GUARD(resetFilter, [&]() { m_filter = nullptr; });
1094
1095 if (!ctx.m_streets)
1096 ctx.m_streets = m_streetsCache.Get(*m_context);
1097
1098 if (!ctx.m_suburbs)
1099 ctx.m_suburbs = m_suburbsCache.Get(*m_context);
1100
1101 MatchUnclassified(ctx, 0 /* curToken */);
1102
1103 auto const search = [this, &ctx, &centers]()
1104 {
1105 GreedilyMatchStreets(ctx, centers);
1106 MatchPOIsAndBuildings(ctx, 0 /* curToken */, CBV::GetFull());
1107 };
1108
1109 WithPostcodes(ctx, search);
1110 search();
1111}
1112
1113template <typename Fn>
1114void Geocoder::WithPostcodes(BaseContext & ctx, Fn && fn)

Callers

nothing calls this directly

Calls 2

searchFunction · 0.85
GetMethod · 0.45

Tested by

no test coverage detected