diff --git a/DataStructures/PhantomNodes.h b/DataStructures/PhantomNodes.h index 9d9dfe3e3..7e95a6f2c 100644 --- a/DataStructures/PhantomNodes.h +++ b/DataStructures/PhantomNodes.h @@ -69,6 +69,11 @@ inline std::ostream& operator<<(std::ostream &out, const PhantomNodes & pn){ return out; } +inline std::ostream& operator<<(std::ostream &out, const PhantomNode & pn){ + + return out; +} + struct NodesOfEdge { NodeID edgeBasedNode; double ratio; diff --git a/Descriptors/DescriptionFactory.cpp b/Descriptors/DescriptionFactory.cpp index db6a59a90..4f33c926d 100644 --- a/Descriptors/DescriptionFactory.cpp +++ b/Descriptors/DescriptionFactory.cpp @@ -100,14 +100,16 @@ void DescriptionFactory::Run(const SearchEngineT &sEngine, const unsigned zoomLe if(TurnInstructionsClass::GoStraight == pathDescription[i].turnInstruction) { if(std::string::npos != string0.find(string1+";") || std::string::npos != string0.find(";"+string1) || - std::string::npos != string0.find(string1+" ;")) { + std::string::npos != string0.find(string1+" ;") || + std::string::npos != string0.find("; "+string1)){ // INFO("->next correct: " << string0 << " contains " << string1); for(; lastTurn != i; ++lastTurn) pathDescription[lastTurn].nameID = pathDescription[i].nameID; pathDescription[i].turnInstruction = TurnInstructionsClass::NoTurn; } else if(std::string::npos != string1.find(string0+";") || std::string::npos != string1.find(";"+string0) || - std::string::npos != string1.find(string0+" ;")) { + std::string::npos != string1.find(string0+" ;")|| + std::string::npos != string1.find("; "+string0)) { // INFO("->prev correct: " << string1 << " contains " << string0); pathDescription[i].nameID = pathDescription[i-1].nameID; pathDescription[i].turnInstruction = TurnInstructionsClass::NoTurn; diff --git a/Docs/WebFrontend/Route.js b/Docs/WebFrontend/Route.js index eb69a99a5..c04f8fcbb 100644 --- a/Docs/WebFrontend/Route.js +++ b/Docs/WebFrontend/Route.js @@ -29,7 +29,7 @@ //====================== // OBJECTS //Map -var HOST_ROUTING_URL = 'http://141.3.24.240:5000/viaroute'; +var HOST_ROUTING_URL = 'http://141.3.24.68:5000/viaroute'; //var HOST_ROUTING_URL = 'http://routingdemo.geofabrik.de/route-via/'; var HOST_WEBSITE = 'http://map.project-osrm.org/';//location.host diff --git a/Plugins/RouteParameters.h b/Plugins/RouteParameters.h index e06671111..ef50c7cb6 100644 --- a/Plugins/RouteParameters.h +++ b/Plugins/RouteParameters.h @@ -26,9 +26,10 @@ or see http://www.gnu.org/licenses/agpl.txt. #include "../DataStructures/HashTable.h" struct RouteParameters { + std::vector hints; std::vector parameters; - HashTable options; std::vector viaPoints; + HashTable options; typedef HashTable::MyIterator OptionsIterator; }; diff --git a/Plugins/ViaRoutePlugin.h b/Plugins/ViaRoutePlugin.h index 0dbdd4fc5..c14a64f58 100644 --- a/Plugins/ViaRoutePlugin.h +++ b/Plugins/ViaRoutePlugin.h @@ -121,6 +121,7 @@ public: vector phantomNodeVector(rawRoute.rawViaNodeCoordinates.size()); for(unsigned i = 0; i < rawRoute.rawViaNodeCoordinates.size(); ++i) { searchEngine->FindPhantomNodeForCoordinate( rawRoute.rawViaNodeCoordinates[i], phantomNodeVector[i]); + INFO("found coord [" << i << "|" << rawRoute.rawViaNodeCoordinates.size()); } unsigned distance = 0; //single route or via point routing diff --git a/SConstruct b/SConstruct index f865f77d3..ed1c4a438 100644 --- a/SConstruct +++ b/SConstruct @@ -212,6 +212,15 @@ if not conf.CheckCXXHeader('boost/unordered_map.hpp'): print "boost thread header not found. Exiting" Exit(-1) +#checks for intels thread building blocks library +if not conf.CheckLibWithHeader('tbb', 'tbb/tbb.h', 'CXX'): + print "Intel TBB library not found. Exiting" + Exit(-1) +if not conf.CheckCXXHeader('tbb/task_scheduler_init.h'): + print "tbb/task_scheduler_init.h not found. Exiting" + Exit(-1) + + protobld = Builder(action = 'protoc -I=DataStructures/pbf-proto --cpp_out=DataStructures/pbf-proto $SOURCE') env.Append(BUILDERS = {'Protobuf' : protobld}) osm1 = env.Protobuf('DataStructures/pbf-proto/fileformat.proto') diff --git a/Server/RequestHandler.h b/Server/RequestHandler.h index 9ef56385b..d77be20ed 100644 --- a/Server/RequestHandler.h +++ b/Server/RequestHandler.h @@ -83,6 +83,15 @@ public: if(25 >= routeParameters.viaPoints.size()) { routeParameters.viaPoints.push_back(o); } + } else if("hint" == p) { + routeParameters.hints.resize(routeParameters.viaPoints.size(), 0); + if(routeParameters.hints.size()) { + unsigned hint = 0; + try { + hint = 10*boost::lexical_cast(o); + } catch(boost::bad_lexical_cast &) { /* do nothing since hint is initialized to 0 */} + routeParameters.hints.back() = hint; + } } else { routeParameters.options.Set(p, o); }