Add destinations API feature

This commit is contained in:
Daniel J. Hofmann
2016-05-26 18:47:46 -04:00
parent bb0c2754d3
commit 6edc565c01
17 changed files with 92 additions and 25 deletions
+2
View File
@@ -32,6 +32,7 @@ struct ExtractionWay
is_access_restricted = false;
name.clear();
pronunciation.clear();
destinations.clear();
forward_travel_mode = TRAVEL_MODE_INACCESSIBLE;
backward_travel_mode = TRAVEL_MODE_INACCESSIBLE;
}
@@ -48,6 +49,7 @@ struct ExtractionWay
double duration;
std::string name;
std::string pronunciation;
std::string destinations;
bool roundabout;
bool is_access_restricted;
bool is_startpoint;
+4 -1
View File
@@ -3,6 +3,7 @@
#include "util/typedefs.hpp"
#include <boost/optional/optional_fwd.hpp>
#include <boost/functional/hash.hpp>
#include <string>
#include <unordered_map>
@@ -34,7 +35,9 @@ class ExtractorCallbacks
{
private:
// used to deduplicate street names and street destinations: actually maps to name ids
std::unordered_map<std::string, unsigned> string_map;
using MapKey = std::pair<std::string, std::string>;
using MapVal = unsigned;
std::unordered_map<MapKey, MapVal, boost::hash<MapKey>> string_map;
ExtractionContainers &external_memory;
public: