mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +00:00
Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)
To expand with full Organic Maps and Maps.ME commits history run: git remote add om-historic [om-historic.git repo url] git fetch --tags om-historic git replace squashed-history historic-commits
This commit is contained in:
58
generator/final_processor_complex.hpp
Normal file
58
generator/final_processor_complex.hpp
Normal file
@@ -0,0 +1,58 @@
|
||||
#pragma once
|
||||
|
||||
#include "generator/collector_building_parts.hpp"
|
||||
#include "generator/feature_builder.hpp"
|
||||
#include "generator/filter_interface.hpp"
|
||||
#include "generator/final_processor_interface.hpp"
|
||||
#include "generator/hierarchy.hpp"
|
||||
#include "generator/hierarchy_entry.hpp"
|
||||
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
namespace generator
|
||||
{
|
||||
// Class ComplexFinalProcessor generates hierarchies for each previously filtered mwm.tmp file.
|
||||
// Warning: If the border separates the complex, then a situation is possible in which two logically
|
||||
// identical complexes are generated, but with different representations.
|
||||
class ComplexFinalProcessor : public FinalProcessorIntermediateMwmInterface
|
||||
{
|
||||
public:
|
||||
ComplexFinalProcessor(std::string const & mwmTmpPath, std::string const & outFilename,
|
||||
size_t threadsCount);
|
||||
|
||||
void SetGetMainTypeFunction(hierarchy::GetMainTypeFn const & getMainType);
|
||||
void SetFilter(std::shared_ptr<FilterInterface> const & filter);
|
||||
void SetGetNameFunction(hierarchy::GetNameFn const & getName);
|
||||
void SetPrintFunction(hierarchy::PrintFn const & printFunction);
|
||||
|
||||
void UseCentersEnricher(std::string const & mwmPath, std::string const & osm2ftPath);
|
||||
void UseBuildingPartsInfo(std::string const & filename);
|
||||
|
||||
// FinalProcessorIntermediateMwmInterface overrides:
|
||||
void Process() override;
|
||||
|
||||
private:
|
||||
std::unique_ptr<hierarchy::HierarchyEntryEnricher> CreateEnricher(
|
||||
std::string const & countryName) const;
|
||||
void WriteLines(std::vector<HierarchyEntry> const & lines);
|
||||
std::unordered_map<base::GeoObjectId, feature::FeatureBuilder> RemoveRelationBuildingParts(
|
||||
std::vector<feature::FeatureBuilder> & fbs);
|
||||
|
||||
hierarchy::GetMainTypeFn m_getMainType;
|
||||
hierarchy::PrintFn m_printFunction;
|
||||
hierarchy::GetNameFn m_getName;
|
||||
std::shared_ptr<FilterInterface> m_filter;
|
||||
std::unique_ptr<BuildingToBuildingPartsMap> m_buildingToParts;
|
||||
bool m_useCentersEnricher = false;
|
||||
std::string m_mwmTmpPath;
|
||||
std::string m_outFilename;
|
||||
std::string m_mwmPath;
|
||||
std::string m_osm2ftPath;
|
||||
std::string m_buildingPartsFilename;
|
||||
size_t m_threadsCount;
|
||||
};
|
||||
} // namespace generator
|
||||
Reference in New Issue
Block a user