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

feature_merger.hpp « indexer - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b64d2b8fd2a2ec3dce9260f1ba2824a99e0c7395 (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 "feature.hpp"

class FeatureBuilder1Merger : public FeatureBuilder1
{
public:
  FeatureBuilder1Merger(FeatureBuilder1 const & fb);

  /// adds fb's geometry at the end of own geometry,
  /// but only if they have common point
  void AppendFeature(FeatureBuilder1Merger const & fb);

  void SetAreaSafe()
  {
    if (!m_bArea)
      m_bArea = true;
  }

  uint32_t KeyType() const
  {
    ASSERT_EQUAL ( m_Types.size(), 1, () );
    return m_Types.front();
  }

  bool ReachedMaxPointsCount() const;

  m2::PointD FirstPoint() const { return m_Geometry.front(); }
  m2::PointD LastPoint() const { return m_Geometry.back(); }
};