00001
00002
00003
00004 #ifndef ROUTEPLANNINGV2_ROADNETWORK_H_
00005 #define ROUTEPLANNINGV2_ROADNETWORK_H_
00006
00007 #include <map>
00008 #include <string>
00009 #include "./Graph.h"
00010 #include "./LiveConnection.h"
00011
00012 class RoadNetwork : public Graph
00013 {
00014 public:
00015 RoadNetwork();
00016
00017 void readFromOsmFile(string fileName);
00018 void getNearestNodesIdsSIMPLE(double latitude, double longitude,
00019 size_t naighboursNumber, double speedInKmh,
00020 vector<Edge>* nearestNodes);
00021 void getConnections(int nodeId, Time arrivalTime, bool isStartNode,
00022 vector<LiveConnection>* outConnections);
00023
00024
00025 void parseFromString(string graphString);
00026
00027 string toString();
00028 private:
00029
00030 void makeEdge(const string &line, FILE* osmFile,
00031 map<string, int>* idMap,
00032 const map<string, size_t>& speedTable);
00033 void makeNode(const string &line, map<string, int>* _idMap);
00034 };
00035
00036 #endif // ROUTEPLANNINGV2_ROADNETWORK_H_
00037