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

Method AddAddresses

generator/final_processor_country.cpp:268–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

266}
267
268void CountryFinalProcessor::AddAddresses()
269{
270 AddressEnricher::Stats totalStats;
271
272 ForEachMwmTmp(m_temporaryMwmPath, [&](auto const & name, auto const & path)
273 {
274 if (!IsCountry(name))
275 return;
276
277 auto const addrPath = base::JoinPath(m_addressPath, name) + TEMP_ADDR_EXTENSION;
278 if (!Platform::IsFileExistsByFullPath(addrPath))
279 return;
280
281 AddressEnricher enricher;
282
283 // Collect existing addresses and streets.
284 ForEachFeatureRawFormat<serialization_policy::MaxAccuracy>(
285 path, [&](FeatureBuilder && fb, uint64_t) { enricher.AddSrc(std::move(fb)); });
286
287 // Append new addresses.
288 FeatureBuilderWriter<serialization_policy::MaxAccuracy> writer(path, FileWriter::Op::OP_APPEND);
289 enricher.ProcessRawEntries(addrPath, [&writer](FeatureBuilder const & fb) { writer.Write(fb); });
290
291 LOG(LINFO, (name, enricher.m_stats));
292 totalStats.Add(enricher.m_stats);
293 });
294
295 LOG(LINFO, ("Total addresses:", totalStats));
296}
297
298void CountryFinalProcessor::ProcessCoastline()
299{

Callers

nothing calls this directly

Calls 6

ForEachMwmTmpFunction · 0.85
JoinPathFunction · 0.85
AddSrcMethod · 0.80
ProcessRawEntriesMethod · 0.80
WriteMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected