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

road_type_checkers.cpp « openlr - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c9b1e9b704c6d6143d7ca0ff149b25e6a1f1ddbb (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include "openlr/road_type_checkers.hpp"

#include "indexer/classificator.hpp"

namespace openlr
{
// TrunkChecker ------------------------------------------------------------------------------------
TrunkChecker::TrunkChecker()
{
  auto const & c = classif();
  m_types.push_back(c.GetTypeByPath({"highway", "motorway"}));
  m_types.push_back(c.GetTypeByPath({"highway", "motorway_link"}));
  m_types.push_back(c.GetTypeByPath({"highway", "trunk"}));
  m_types.push_back(c.GetTypeByPath({"highway", "trunk_link"}));
}

// PrimaryChecker ----------------------------------------------------------------------------------
PrimaryChecker::PrimaryChecker()
{
  auto const & c = classif();
  m_types.push_back(c.GetTypeByPath({"highway", "primary"}));
  m_types.push_back(c.GetTypeByPath({"highway", "primary_link"}));
}

// SecondaryChecker --------------------------------------------------------------------------------
SecondaryChecker::SecondaryChecker()
{
  auto const & c = classif();
  m_types.push_back(c.GetTypeByPath({"highway", "secondary"}));
  m_types.push_back(c.GetTypeByPath({"highway", "secondary_link"}));
}

// TertiaryChecker ---------------------------------------------------------------------------------
TertiaryChecker::TertiaryChecker()
{
  auto const & c = classif();
  m_types.push_back(c.GetTypeByPath({"highway", "tertiary"}));
  m_types.push_back(c.GetTypeByPath({"highway", "tertiary_link"}));
}

// ResidentialChecker ------------------------------------------------------------------------------
ResidentialChecker::ResidentialChecker()
{
  auto const & c = classif();
  m_types.push_back(c.GetTypeByPath({"highway", "road"}));
  m_types.push_back(c.GetTypeByPath({"highway", "unclassified"}));
  m_types.push_back(c.GetTypeByPath({"highway", "residential"}));
}

// LivingStreetChecker -----------------------------------------------------------------------------
LivingStreetChecker::LivingStreetChecker()
{
  auto const & c = classif();
  m_types.push_back(c.GetTypeByPath({"highway", "living_street"}));
}
}  // namespace openlr