Merge branch 'master' into develop

This commit is contained in:
DennisOSRM 2012-10-08 12:07:31 +02:00
commit 8794db633b
2 changed files with 10 additions and 7 deletions

View File

@ -69,7 +69,7 @@ std::vector<NodeID> trafficLightNodes;
int main (int argc, char *argv[]) { int main (int argc, char *argv[]) {
if(argc < 3) { if(argc < 3) {
ERR("usage: " << std::endl << argv[0] << " <osrm-data> <osrm-restrictions>"); ERR("usage: " << std::endl << argv[0] << " <osrm-data> <osrm-restrictions> [<profile>]");
} }
double startupTime = get_timestamp(); double startupTime = get_timestamp();
@ -119,7 +119,7 @@ int main (int argc, char *argv[]) {
ERR("The input data is broken. It is impossible to do any turns in this graph"); ERR("The input data is broken. It is impossible to do any turns in this graph");
if(!testDataFile("profile.lua")) { if(!testDataFile( (argc > 3 ? argv[3] : "profile.lua") )) {
ERR("Need profile.lua to apply traffic signal penalty"); ERR("Need profile.lua to apply traffic signal penalty");
} }
/*** Setup Scripting Environment ***/ /*** Setup Scripting Environment ***/
@ -132,7 +132,8 @@ int main (int argc, char *argv[]) {
// Now call our function in a lua script // Now call our function in a lua script
if(0 != luaL_dofile(myLuaState, "profile.lua")) { INFO("Parsing speedprofile from " << (argc > 3 ? argv[3] : "profile.lua") );
if(0 != luaL_dofile(myLuaState, (argc > 3 ? argv[3] : "profile.lua") )) {
ERR(lua_tostring(myLuaState,-1)<< " occured in scripting block"); ERR(lua_tostring(myLuaState,-1)<< " occured in scripting block");
} }

View File

@ -52,7 +52,7 @@ bool wayFunction(_Way w);
int main (int argc, char *argv[]) { int main (int argc, char *argv[]) {
if(argc < 2) { if(argc < 2) {
ERR("usage: \n" << argv[0] << " <file.osm/.osm.bz2/.osm.pbf>"); ERR("usage: \n" << argv[0] << " <file.osm/.osm.bz2/.osm.pbf> [<profile.lua>]");
} }
INFO("extracting data from input file " << argv[1]); INFO("extracting data from input file " << argv[1]);
@ -142,7 +142,8 @@ int main (int argc, char *argv[]) {
] ]
]; ];
// Now call our function in a lua script // Now call our function in a lua script
if(0 != luaL_dofile(myLuaState, "profile.lua")) { INFO("Parsing speedprofile from " << (argc > 2 ? argv[2] : "profile.lua") );
if(0 != luaL_dofile(myLuaState, (argc > 2 ? argv[2] : "profile.lua") )) {
ERR(lua_tostring(myLuaState,-1)<< " occured in scripting block"); ERR(lua_tostring(myLuaState,-1)<< " occured in scripting block");
} }
@ -156,13 +157,14 @@ int main (int argc, char *argv[]) {
if(installedRAM < 2048264) { if(installedRAM < 2048264) {
WARN("Machine has less than 2GB RAM."); WARN("Machine has less than 2GB RAM.");
} }
if(testDataFile("extractor.ini")) { /* if(testDataFile("extractor.ini")) {
ExtractorConfiguration extractorConfig("extractor.ini"); ExtractorConfiguration extractorConfig("extractor.ini");
unsigned memoryAmountFromFile = atoi(extractorConfig.GetParameter("Memory").c_str()); unsigned memoryAmountFromFile = atoi(extractorConfig.GetParameter("Memory").c_str());
if( memoryAmountFromFile != 0 && memoryAmountFromFile <= installedRAM/(1024*1024)) if( memoryAmountFromFile != 0 && memoryAmountFromFile <= installedRAM/(1024*1024))
amountOfRAM = memoryAmountFromFile; amountOfRAM = memoryAmountFromFile;
INFO("Using " << amountOfRAM << " GB of RAM for buffers"); INFO("Using " << amountOfRAM << " GB of RAM for buffers");
} }
*/
StringMap stringMap; StringMap stringMap;
ExtractionContainers externalMemory; ExtractionContainers externalMemory;