Repo created

This commit is contained in:
Fr4nz D13trich 2025-11-22 13:58:55 +01:00
parent 4af19165ec
commit 68073add76
12458 changed files with 12350765 additions and 2 deletions

View file

@ -0,0 +1,36 @@
#pragma once
#include "generator/collector_interface.hpp"
#include "generator/feature_maker.hpp"
#include "generator/osm_element.hpp"
#include <memory>
#include <string>
namespace generator
{
// Saves pairs (postal code, outer geometry) to file for OsmElements that
// have all of the following: relation=boundary, boundary=postal_code, postal_code=*.
class BoundaryPostcodeCollector : public CollectorInterface
{
public:
BoundaryPostcodeCollector(std::string const & filename, IDRInterfacePtr const & cache);
// CollectorInterface overrides:
std::shared_ptr<CollectorInterface> Clone(IDRInterfacePtr const & = {}) const override;
void Collect(OsmElement const & el) override;
IMPLEMENT_COLLECTOR_IFACE(BoundaryPostcodeCollector);
void MergeInto(BoundaryPostcodeCollector & collector) const;
protected:
void Save() override;
private:
std::vector<std::pair<std::string, feature::FeatureBuilder::PointSeq>> m_data;
std::shared_ptr<cache::IntermediateDataReaderInterface> m_cache;
FeatureMakerSimple m_featureMakerSimple;
};
} // namespace generator