forked from organicmaps/organicmaps
[generator] Deleted obsolete files.
This commit is contained in:
parent
9501bc26be
commit
12ab5de9ed
5 changed files with 0 additions and 225 deletions
|
@ -1,39 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "generator/emitter_interface.hpp"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class CoastlineFeaturesGenerator;
|
||||
namespace feature
|
||||
{
|
||||
struct GenerateInfo;
|
||||
class FeatureBuilder;
|
||||
} // namespace feature
|
||||
|
||||
namespace generator
|
||||
{
|
||||
class PlaceProcessor;
|
||||
class CountryMapper;
|
||||
class LayerBase;
|
||||
// This class is implementation of EmitterInterface for coastlines.
|
||||
class EmitterCoastline : public EmitterInterface
|
||||
{
|
||||
public:
|
||||
explicit EmitterCoastline(feature::GenerateInfo const & info);
|
||||
|
||||
// EmitterInterface overrides:
|
||||
void Process(feature::FeatureBuilder & feature) override;
|
||||
bool Finish() override;
|
||||
void GetNames(std::vector<std::string> & names) const override;
|
||||
|
||||
private:
|
||||
std::shared_ptr<PlaceProcessor> m_placeProcessor;
|
||||
std::shared_ptr<CoastlineFeaturesGenerator> m_generator;
|
||||
std::shared_ptr<LayerBase> m_processingChain;
|
||||
std::string m_coastlineGeomFilename;
|
||||
std::string m_coastlineRawGeomFilename;
|
||||
};
|
||||
} // namespace generator
|
|
@ -1,66 +0,0 @@
|
|||
#include "generator/emitter_country.hpp"
|
||||
|
||||
#include "generator/feature_builder.hpp"
|
||||
#include "generator/feature_processing_layers.hpp"
|
||||
#include "generator/generate_info.hpp"
|
||||
#include "generator/place_processor.hpp"
|
||||
|
||||
#include "base/logging.hpp"
|
||||
|
||||
#include <fstream>
|
||||
|
||||
#include "defines.hpp"
|
||||
|
||||
using namespace feature;
|
||||
|
||||
namespace generator
|
||||
{
|
||||
EmitterCountry::EmitterCountry(feature::GenerateInfo const & info)
|
||||
: m_placeProcessor(std::make_shared<PlaceProcessor>(info.m_boundariesTable))
|
||||
, m_countryMapper(std::make_shared<CountryMapper>(info))
|
||||
, m_skippedListFilename(info.GetIntermediateFileName("skipped_elements", ".lst"))
|
||||
{
|
||||
m_processingChain = std::make_shared<RepresentationLayer>(m_placeProcessor);
|
||||
m_processingChain->Add(std::make_shared<PrepareFeatureLayer>());
|
||||
m_processingChain->Add(std::make_shared<PromoCatalogLayer>(info.m_promoCatalogCitiesFilename));
|
||||
m_processingChain->Add(std::make_shared<PlaceLayer>(m_placeProcessor));
|
||||
m_processingChain->Add(std::make_shared<BookingLayer>(info.m_bookingDataFilename, m_countryMapper));
|
||||
m_processingChain->Add(std::make_shared<OpentableLayer>(info.m_opentableDataFilename, m_countryMapper));
|
||||
m_processingChain->Add(std::make_shared<CountryMapperLayer>(m_countryMapper));
|
||||
|
||||
if (info.m_emitCoasts)
|
||||
{
|
||||
auto const geomFilename = info.GetIntermediateFileName(WORLD_COASTS_FILE_NAME, ".geom");
|
||||
auto const worldCoastsFilename = info.GetTmpFileName(WORLD_COASTS_FILE_NAME);
|
||||
m_processingChain->Add(std::make_shared<EmitCoastsLayer>(worldCoastsFilename, geomFilename, m_countryMapper));
|
||||
}
|
||||
}
|
||||
|
||||
void EmitterCountry::Process(FeatureBuilder & feature)
|
||||
{
|
||||
m_processingChain->Handle(feature);
|
||||
}
|
||||
|
||||
bool EmitterCountry::Finish()
|
||||
{
|
||||
for (auto & feature : m_placeProcessor->GetFeatures())
|
||||
m_countryMapper->RemoveInvalidTypesAndMap(feature);
|
||||
|
||||
WriteDump();
|
||||
return true;
|
||||
}
|
||||
|
||||
void EmitterCountry::GetNames(std::vector<std::string> & names) const
|
||||
{
|
||||
names = m_countryMapper->GetNames();
|
||||
}
|
||||
|
||||
void EmitterCountry::WriteDump()
|
||||
{
|
||||
std::ofstream file;
|
||||
file.exceptions(std::ios::failbit | std::ios::badbit);
|
||||
file.open(m_skippedListFilename);
|
||||
file << m_processingChain->GetAsStringRecursive();
|
||||
LOG(LINFO, ("Skipped elements were saved to", m_skippedListFilename));
|
||||
}
|
||||
} // namespace generator
|
|
@ -1,39 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "generator/emitter_interface.hpp"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace feature
|
||||
{
|
||||
class FeatureBuilder;
|
||||
struct GenerateInfo;
|
||||
} // namespace feature
|
||||
|
||||
namespace generator
|
||||
{
|
||||
class PlaceProcessor;
|
||||
class CountryMapper;
|
||||
class LayerBase;
|
||||
// This class is the implementation of EmitterInterface for countries.
|
||||
class EmitterCountry : public EmitterInterface
|
||||
{
|
||||
public:
|
||||
explicit EmitterCountry(feature::GenerateInfo const & info);
|
||||
|
||||
// EmitterInterface overrides:
|
||||
void Process(feature::FeatureBuilder & feature) override;
|
||||
bool Finish() override;
|
||||
void GetNames(std::vector<std::string> & names) const override;
|
||||
|
||||
private:
|
||||
void WriteDump();
|
||||
|
||||
std::shared_ptr<PlaceProcessor> m_placeProcessor;
|
||||
std::shared_ptr<CountryMapper> m_countryMapper;
|
||||
std::string m_skippedListFilename;
|
||||
std::shared_ptr<LayerBase> m_processingChain;
|
||||
};
|
||||
} // namespace generator
|
|
@ -1,44 +0,0 @@
|
|||
#include "generator/emitter_world.hpp"
|
||||
|
||||
#include "generator/cities_boundaries_builder.hpp"
|
||||
#include "generator/feature_builder.hpp"
|
||||
#include "generator/feature_processing_layers.hpp"
|
||||
#include "generator/generate_info.hpp"
|
||||
#include "generator/place_processor.hpp"
|
||||
|
||||
#include "defines.hpp"
|
||||
|
||||
using namespace feature;
|
||||
|
||||
namespace generator
|
||||
{
|
||||
EmitterWorld::EmitterWorld(feature::GenerateInfo const & info)
|
||||
: m_placeProcessor(std::make_shared<PlaceProcessor>(
|
||||
std::make_shared<generator::OsmIdToBoundariesTable>()))
|
||||
, m_worldMapper(std::make_shared<WorldMapper>(
|
||||
info.GetTmpFileName(WORLD_FILE_NAME),
|
||||
info.GetIntermediateFileName(WORLD_COASTS_FILE_NAME, RAW_GEOM_FILE_EXTENSION),
|
||||
info.m_popularPlacesFilename))
|
||||
{
|
||||
m_processingChain = std::make_shared<RepresentationLayer>(m_placeProcessor);
|
||||
m_processingChain->Add(std::make_shared<PrepareFeatureLayer>());
|
||||
m_processingChain->Add(std::make_shared<PromoCatalogLayer>(info.m_promoCatalogCitiesFilename));
|
||||
m_processingChain->Add(std::make_shared<PlaceLayer>(m_placeProcessor));
|
||||
m_processingChain->Add(std::make_shared<WorldAreaLayer>(m_worldMapper));
|
||||
}
|
||||
|
||||
void EmitterWorld::Process(FeatureBuilder & feature)
|
||||
{
|
||||
m_processingChain->Handle(feature);
|
||||
}
|
||||
|
||||
bool EmitterWorld::Finish()
|
||||
{
|
||||
for (auto & feature : m_placeProcessor->GetFeatures())
|
||||
m_worldMapper->RemoveInvalidTypesAndMap(feature);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void EmitterWorld::GetNames(vector<string> &) const {}
|
||||
} // namespace generator
|
|
@ -1,37 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "generator/emitter_interface.hpp"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace feature
|
||||
{
|
||||
class FeatureBuilder;
|
||||
struct GenerateInfo;
|
||||
} // namespace feature
|
||||
|
||||
namespace generator
|
||||
{
|
||||
class PlaceProcessor;
|
||||
class WorldMapper;
|
||||
class LayerBase;
|
||||
|
||||
// This class is implementation of EmitterInterface for the world.
|
||||
class EmitterWorld : public EmitterInterface
|
||||
{
|
||||
public:
|
||||
explicit EmitterWorld(feature::GenerateInfo const & info);
|
||||
|
||||
// EmitterInterface overrides:
|
||||
void Process(feature::FeatureBuilder & feature) override;
|
||||
bool Finish() override;
|
||||
void GetNames(std::vector<std::string> & names) const override;
|
||||
|
||||
private:
|
||||
std::shared_ptr<PlaceProcessor> m_placeProcessor;
|
||||
std::shared_ptr<WorldMapper> m_worldMapper;
|
||||
std::shared_ptr<LayerBase> m_processingChain;
|
||||
};
|
||||
} // namespace generator
|
Loading…
Add table
Reference in a new issue