Ignore areas when set so in speedprofile.ini

This commit is contained in:
DennisOSRM 2012-05-14 12:01:45 +02:00
parent 68f0cb7684
commit db2047264c
3 changed files with 7 additions and 1 deletions

View File

@ -157,6 +157,10 @@ public:
std::string cycleway( w.keyVals.Find("cycleway"));
std::string duration ( w.keyVals.Find("duration"));
std::string service (w.keyVals.Find("service"));
std::string area(w.keyVals.Find("area"));
if("yes" == area && settings.ignoreAreas)
return true;
//Save the name of the way if it has one, ref has precedence over name tag.
if ( 0 < ref.length() )

View File

@ -269,7 +269,7 @@ struct CmpWayByID : public std::binary_function<_WayIDStartAndEndEdge, _WayIDSta
};
struct Settings {
Settings() : obeyBollards(true), obeyOneways(true), useRestrictions(true), accessTag("motorcar"), defaultSpeed(30), takeMinimumOfSpeeds(false), excludeFromGrid("ferry") {}
Settings() : obeyBollards(true), obeyOneways(true), useRestrictions(true), ignoreAreas(false), accessTag("motorcar"), defaultSpeed(30), takeMinimumOfSpeeds(false), excludeFromGrid("ferry") {}
StringToIntPairMap speedProfile;
int operator[](const std::string & param) const {
if(speedProfile.find(param) == speedProfile.end())
@ -292,6 +292,7 @@ struct Settings {
bool obeyBollards;
bool obeyOneways;
bool useRestrictions;
bool ignoreAreas;
std::string accessTag;
int defaultSpeed;
bool takeMinimumOfSpeeds;

View File

@ -19,6 +19,7 @@
obeyBollards = yes
obeyOneways = yes
useRestrictions = yes
ignoreAreas = yes
accessTag = motorcar
excludeFromGrid = ferry
defaultSpeed = 50