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

Method DropProhibitedSpeedCameras

generator/final_processor_country.cpp:326–347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324}
325
326void CountryFinalProcessor::DropProhibitedSpeedCameras()
327{
328 auto const speedCameraType = classif().GetTypeByPath({"highway", "speed_camera"});
329 ForEachMwmTmp(m_temporaryMwmPath, [&](auto const & country, auto const & path)
330 {
331 if (!IsCountry(country))
332 return;
333
334 if (!routing::AreSpeedCamerasProhibited(platform::CountryFile(country)))
335 return;
336
337 FeatureBuilderWriter<serialization_policy::MaxAccuracy> writer(path, true /* mangleName */);
338 ForEachFeatureRawFormat<serialization_policy::MaxAccuracy>(path, [&](FeatureBuilder const & fb, uint64_t)
339 {
340 // Removing point features with speed cameras type from geometry index for some countries.
341 if (fb.IsPoint() && fb.HasType(speedCameraType))
342 return;
343
344 writer.Write(fb);
345 });
346 }, m_threadsCount);
347}
348
349/*
350void CountryFinalProcessor::Finish()

Callers

nothing calls this directly

Calls 7

ForEachMwmTmpFunction · 0.85
GetTypeByPathMethod · 0.80
CountryFileClass · 0.50
IsPointMethod · 0.45
HasTypeMethod · 0.45
WriteMethod · 0.45

Tested by

no test coverage detected