Merge branch 'master' of

https://DennisOSRM@github.com/DennisOSRM/Project-OSRM.git
This commit is contained in:
DennisOSRM 2012-02-29 14:30:19 +01:00
commit f332f39ea6
7 changed files with 31 additions and 4 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -26,9 +26,10 @@ or see http://www.gnu.org/licenses/agpl.txt.
#include "../DataStructures/HashTable.h"
struct RouteParameters {
std::vector<unsigned> hints;
std::vector<std::string> parameters;
HashTable<std::string, std::string> options;
std::vector<std::string> viaPoints;
HashTable<std::string, std::string> options;
typedef HashTable<std::string, std::string>::MyIterator OptionsIterator;
};

View File

@ -121,6 +121,7 @@ public:
vector<PhantomNode> 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

View File

@ -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')

View File

@ -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<int>(o);
} catch(boost::bad_lexical_cast &) { /* do nothing since hint is initialized to 0 */}
routeParameters.hints.back() = hint;
}
} else {
routeParameters.options.Set(p, o);
}