Merge branch 'master' of
https://DennisOSRM@github.com/DennisOSRM/Project-OSRM.git
This commit is contained in:
commit
f332f39ea6
@ -69,6 +69,11 @@ inline std::ostream& operator<<(std::ostream &out, const PhantomNodes & pn){
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline std::ostream& operator<<(std::ostream &out, const PhantomNode & pn){
|
||||||
|
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
struct NodesOfEdge {
|
struct NodesOfEdge {
|
||||||
NodeID edgeBasedNode;
|
NodeID edgeBasedNode;
|
||||||
double ratio;
|
double ratio;
|
||||||
|
@ -100,14 +100,16 @@ void DescriptionFactory::Run(const SearchEngineT &sEngine, const unsigned zoomLe
|
|||||||
if(TurnInstructionsClass::GoStraight == pathDescription[i].turnInstruction) {
|
if(TurnInstructionsClass::GoStraight == pathDescription[i].turnInstruction) {
|
||||||
if(std::string::npos != string0.find(string1+";") ||
|
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+" ;") ||
|
||||||
|
std::string::npos != string0.find("; "+string1)){
|
||||||
// INFO("->next correct: " << string0 << " contains " << string1);
|
// INFO("->next correct: " << string0 << " contains " << string1);
|
||||||
for(; lastTurn != i; ++lastTurn)
|
for(; lastTurn != i; ++lastTurn)
|
||||||
pathDescription[lastTurn].nameID = pathDescription[i].nameID;
|
pathDescription[lastTurn].nameID = pathDescription[i].nameID;
|
||||||
pathDescription[i].turnInstruction = TurnInstructionsClass::NoTurn;
|
pathDescription[i].turnInstruction = TurnInstructionsClass::NoTurn;
|
||||||
} else if(std::string::npos != string1.find(string0+";") ||
|
} 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+" ;")||
|
||||||
|
std::string::npos != string1.find("; "+string0)) {
|
||||||
// INFO("->prev correct: " << string1 << " contains " << string0);
|
// INFO("->prev correct: " << string1 << " contains " << string0);
|
||||||
pathDescription[i].nameID = pathDescription[i-1].nameID;
|
pathDescription[i].nameID = pathDescription[i-1].nameID;
|
||||||
pathDescription[i].turnInstruction = TurnInstructionsClass::NoTurn;
|
pathDescription[i].turnInstruction = TurnInstructionsClass::NoTurn;
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
//======================
|
//======================
|
||||||
// OBJECTS
|
// OBJECTS
|
||||||
//Map
|
//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_ROUTING_URL = 'http://routingdemo.geofabrik.de/route-via/';
|
||||||
var HOST_WEBSITE = 'http://map.project-osrm.org/';//location.host
|
var HOST_WEBSITE = 'http://map.project-osrm.org/';//location.host
|
||||||
|
|
||||||
|
@ -26,9 +26,10 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
|||||||
#include "../DataStructures/HashTable.h"
|
#include "../DataStructures/HashTable.h"
|
||||||
|
|
||||||
struct RouteParameters {
|
struct RouteParameters {
|
||||||
|
std::vector<unsigned> hints;
|
||||||
std::vector<std::string> parameters;
|
std::vector<std::string> parameters;
|
||||||
HashTable<std::string, std::string> options;
|
|
||||||
std::vector<std::string> viaPoints;
|
std::vector<std::string> viaPoints;
|
||||||
|
HashTable<std::string, std::string> options;
|
||||||
typedef HashTable<std::string, std::string>::MyIterator OptionsIterator;
|
typedef HashTable<std::string, std::string>::MyIterator OptionsIterator;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -121,6 +121,7 @@ public:
|
|||||||
vector<PhantomNode> phantomNodeVector(rawRoute.rawViaNodeCoordinates.size());
|
vector<PhantomNode> phantomNodeVector(rawRoute.rawViaNodeCoordinates.size());
|
||||||
for(unsigned i = 0; i < rawRoute.rawViaNodeCoordinates.size(); ++i) {
|
for(unsigned i = 0; i < rawRoute.rawViaNodeCoordinates.size(); ++i) {
|
||||||
searchEngine->FindPhantomNodeForCoordinate( rawRoute.rawViaNodeCoordinates[i], phantomNodeVector[i]);
|
searchEngine->FindPhantomNodeForCoordinate( rawRoute.rawViaNodeCoordinates[i], phantomNodeVector[i]);
|
||||||
|
INFO("found coord [" << i << "|" << rawRoute.rawViaNodeCoordinates.size());
|
||||||
}
|
}
|
||||||
unsigned distance = 0;
|
unsigned distance = 0;
|
||||||
//single route or via point routing
|
//single route or via point routing
|
||||||
|
@ -212,6 +212,15 @@ if not conf.CheckCXXHeader('boost/unordered_map.hpp'):
|
|||||||
print "boost thread header not found. Exiting"
|
print "boost thread header not found. Exiting"
|
||||||
Exit(-1)
|
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')
|
protobld = Builder(action = 'protoc -I=DataStructures/pbf-proto --cpp_out=DataStructures/pbf-proto $SOURCE')
|
||||||
env.Append(BUILDERS = {'Protobuf' : protobld})
|
env.Append(BUILDERS = {'Protobuf' : protobld})
|
||||||
osm1 = env.Protobuf('DataStructures/pbf-proto/fileformat.proto')
|
osm1 = env.Protobuf('DataStructures/pbf-proto/fileformat.proto')
|
||||||
|
@ -83,6 +83,15 @@ public:
|
|||||||
if(25 >= routeParameters.viaPoints.size()) {
|
if(25 >= routeParameters.viaPoints.size()) {
|
||||||
routeParameters.viaPoints.push_back(o);
|
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<int>(o);
|
||||||
|
} catch(boost::bad_lexical_cast &) { /* do nothing since hint is initialized to 0 */}
|
||||||
|
routeParameters.hints.back() = hint;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
routeParameters.options.Set(p, o);
|
routeParameters.options.Set(p, o);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user