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

routing_helpers.hpp « generator - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 654a992aab36d8b8ffac3b787c6759cf4753f3be (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
#pragma once

#include "generator/osm_id.hpp"
#include "generator/road_access_generator.hpp"
#include "generator/restriction_writer.hpp"

#include <cstdint>
#include <map>

namespace routing
{
struct TagsProcessor
{
  RoadAccessWriter m_roadAccessWriter;
  RestrictionWriter m_restrictionWriter;
};

// Adds feature id and corresponding |osmId| to |osmIdToFeatureId|.
// Note. In general, one |featureId| may correspond to several osm ids.
// But for a road feature |featureId| corresponds to exactly one osm id.
void AddFeatureId(osm::Id osmId, uint32_t featureId, map<osm::Id, uint32_t> &osmIdToFeatureId);

// Parses comma separated text file with line in following format:
// <feature id>, <osm id 1 corresponding feature id>, <osm id 2 corresponding feature id>, and so
// on
// For example:
// 137999, 5170186,
// 138000, 5170209, 5143342,
// 138001, 5170228,
bool ParseOsmIdToFeatureIdMapping(std::string const & osmIdsToFeatureIdPath,
                                  std::map<osm::Id, uint32_t> & osmIdToFeatureId);
bool ParseFeatureIdToOsmIdMapping(std::string const & osmIdsToFeatureIdPath,
                                  std::map<uint32_t, osm::Id> & featureIdToOsmId);
}  // namespace routing