Welcome to mirror list, hosted at ThFree Co, Russian Federation.

city_boundary_processor.hpp « generator - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7a9f16582ebefdd03990b9db49229a564ea97249 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma once

#include "generator/cities_boundaries_builder.hpp"
#include "generator/feature_builder.hpp"
#include "generator/place.hpp"

#include "geometry/tree4d.hpp"

#include <memory>
#include <vector>

namespace generator
{
// The class CityBoundaryProcessor is responsible for the union of boundaries of the cities.
class CityBoundaryProcessor
{
public:
  CityBoundaryProcessor(std::shared_ptr<OsmIdToBoundariesTable> boundariesTable);

  void Add(FeatureBuilder1 const & fb);
  void Replace(FeatureBuilder1 const & fb);
  std::vector<FeatureBuilder1> GetFeatures() const;

private:
  void UnionEqualPlacesIds(Place const & place);

  std::shared_ptr<OsmIdToBoundariesTable> m_boundariesTable;
  m4::Tree<Place> m_places;
};
} // namespace generator