| 89 | } |
| 90 | |
| 91 | void RawGenerator::GenerateCountries(bool isTests /* = false*/) |
| 92 | { |
| 93 | // if (!m_genInfo.m_complexHierarchyFilename.empty()) |
| 94 | // m_hierarchyNodesSet = GetOrCreateComplexLoader(m_genInfo.m_complexHierarchyFilename).GetIdsSet(); |
| 95 | // auto const complexFeaturesMixer = std::make_shared<ComplexFeaturesMixer>(m_hierarchyNodesSet); |
| 96 | |
| 97 | AffiliationInterfacePtr affiliation; |
| 98 | if (isTests) |
| 99 | { |
| 100 | affiliation = std::make_shared<feature::SingleAffiliation>(m_genInfo.m_fileName); |
| 101 | } |
| 102 | else |
| 103 | { |
| 104 | affiliation = std::make_shared<feature::CountriesFilesIndexAffiliation>(m_genInfo.m_targetDir, |
| 105 | m_genInfo.m_haveBordersForWholeWorld); |
| 106 | } |
| 107 | |
| 108 | auto processor = CreateProcessor(ProcessorType::Country, affiliation, m_queue); |
| 109 | |
| 110 | /// @todo Better design is to have one Translator that creates FeatureBuilder from OsmElement |
| 111 | /// and dispatches FB into Coastline, World, Country, City processors. |
| 112 | /// Now we have at least 2x similar work in OsmElement->GetNameAndType->FeatureBuilder (for Country and World). |
| 113 | |
| 114 | m_translators->Append( |
| 115 | CreateTranslator(TranslatorType::Country, processor, m_cache, m_genInfo, isTests ? nullptr : affiliation)); |
| 116 | |
| 117 | m_finalProcessors.emplace(CreateCountryFinalProcessor(affiliation, false)); |
| 118 | m_finalProcessors.emplace(CreatePlacesFinalProcessor(affiliation)); |
| 119 | } |
| 120 | |
| 121 | void RawGenerator::GenerateWorld(bool cutBordersByWater /* = true */) |
| 122 | { |