Ignore areas when set so in speedprofile.ini
This commit is contained in:
parent
68f0cb7684
commit
db2047264c
@ -157,6 +157,10 @@ public:
|
|||||||
std::string cycleway( w.keyVals.Find("cycleway"));
|
std::string cycleway( w.keyVals.Find("cycleway"));
|
||||||
std::string duration ( w.keyVals.Find("duration"));
|
std::string duration ( w.keyVals.Find("duration"));
|
||||||
std::string service (w.keyVals.Find("service"));
|
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.
|
//Save the name of the way if it has one, ref has precedence over name tag.
|
||||||
if ( 0 < ref.length() )
|
if ( 0 < ref.length() )
|
||||||
|
@ -269,7 +269,7 @@ struct CmpWayByID : public std::binary_function<_WayIDStartAndEndEdge, _WayIDSta
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct Settings {
|
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;
|
StringToIntPairMap speedProfile;
|
||||||
int operator[](const std::string & param) const {
|
int operator[](const std::string & param) const {
|
||||||
if(speedProfile.find(param) == speedProfile.end())
|
if(speedProfile.find(param) == speedProfile.end())
|
||||||
@ -292,6 +292,7 @@ struct Settings {
|
|||||||
bool obeyBollards;
|
bool obeyBollards;
|
||||||
bool obeyOneways;
|
bool obeyOneways;
|
||||||
bool useRestrictions;
|
bool useRestrictions;
|
||||||
|
bool ignoreAreas;
|
||||||
std::string accessTag;
|
std::string accessTag;
|
||||||
int defaultSpeed;
|
int defaultSpeed;
|
||||||
bool takeMinimumOfSpeeds;
|
bool takeMinimumOfSpeeds;
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
obeyBollards = yes
|
obeyBollards = yes
|
||||||
obeyOneways = yes
|
obeyOneways = yes
|
||||||
useRestrictions = yes
|
useRestrictions = yes
|
||||||
|
ignoreAreas = yes
|
||||||
accessTag = motorcar
|
accessTag = motorcar
|
||||||
excludeFromGrid = ferry
|
excludeFromGrid = ferry
|
||||||
defaultSpeed = 50
|
defaultSpeed = 50
|
||||||
|
Loading…
Reference in New Issue
Block a user