diff --git a/data/classificator.txt b/data/classificator.txt index 14e45b22bd..95bcdee4eb 100644 --- a/data/classificator.txt +++ b/data/classificator.txt @@ -869,4 +869,9 @@ world + waterfall - weir - {} + wheelchair + + limited - + no - + yes - + {} {} diff --git a/data/mapcss-mapping.csv b/data/mapcss-mapping.csv index 7c3e47ad6e..9318c524b3 100644 --- a/data/mapcss-mapping.csv +++ b/data/mapcss-mapping.csv @@ -1118,3 +1118,6 @@ psurface|paved_good;1117; psurface|paved_bad;1118; psurface|unpaved_good;1119; psurface|unpaved_bad;1120; +wheelchair|yes;1121; +wheelchair|no;1122; +wheelchair|limited;1123; diff --git a/data/types.txt b/data/types.txt index 8cfa84722c..8ba9db2c1f 100644 --- a/data/types.txt +++ b/data/types.txt @@ -1118,3 +1118,6 @@ psurface|paved_good psurface|paved_bad psurface|unpaved_good psurface|unpaved_bad +wheelchair|yes +wheelchair|no +wheelchair|limited diff --git a/data/visibility.txt b/data/visibility.txt index a46afd4b42..da69336c28 100644 --- a/data/visibility.txt +++ b/data/visibility.txt @@ -869,4 +869,9 @@ world 00000000000000000000 + waterfall 00000000000000000000 - weir 00000000000000111111 - {} + wheelchair 00000000000000000000 + + limited 00000000000000000000 - + no 00000000000000000000 - + yes 00000000000000000000 - + {} {} diff --git a/generator/osm2type.cpp b/generator/osm2type.cpp index dc1fa670c0..cb7cd17886 100644 --- a/generator/osm2type.cpp +++ b/generator/osm2type.cpp @@ -42,6 +42,8 @@ namespace ftype {"proposed", true}, // [highway=primary][construction=primary] parsed as [highway=construction] {"construction", true}, + // [wheelchair=no] should be processed + {"wheelchair", false}, // process in any case {"layer", false}, // process in any case @@ -215,7 +217,7 @@ namespace ftype public: enum EType { ENTRANCE, HIGHWAY, ADDRESS, ONEWAY, PRIVATE, LIT, NOFOOT, YESFOOT, NOBICYCLE, YESBICYCLE, BICYCLE_BIDIR, SURFPGOOD, SURFPBAD, SURFUGOOD, SURFUBAD, - RW_STATION, RW_STATION_SUBWAY }; + RW_STATION, RW_STATION_SUBWAY, WHEELCHAIR_YES }; CachedTypes() { @@ -237,6 +239,7 @@ namespace ftype m_types.push_back(c.GetTypeByPath({ "railway", "station" })); m_types.push_back(c.GetTypeByPath({ "railway", "station", "subway" })); + m_types.push_back(c.GetTypeByPath({ "wheelchair", "yes" })); } uint32_t Get(EType t) const { return m_types[t]; } @@ -502,6 +505,12 @@ namespace ftype } } + // Process yes/no tags. + TagProcessor(p).ApplyRules + ({ + { "wheelchair", "designated", [¶ms] { params.AddType(types.Get(CachedTypes::WHEELCHAIR_YES)); }}, + }); + bool highwayDone = false; bool subwayDone = false; bool railwayDone = false; diff --git a/indexer/feature_visibility.cpp b/indexer/feature_visibility.cpp index 921b9131d6..3eb5ec31f5 100644 --- a/indexer/feature_visibility.cpp +++ b/indexer/feature_visibility.cpp @@ -213,6 +213,7 @@ namespace static const uint32_t roundabout = classif().GetTypeByPath({ "junction", "roundabout" }); static const uint32_t hwtag = classif().GetTypeByPath({ "hwtag" }); static const uint32_t psurface = classif().GetTypeByPath({ "psurface" }); + static const uint32_t wheelchair = classif().GetTypeByPath({ "wheelchair" }); if (g == GEOM_LINE || g == GEOM_UNDEFINED) { @@ -227,6 +228,11 @@ namespace return true; } + // We're okay with the type being already truncated above. + ftype::TruncValue(type, 1); + if (wheelchair == type) + return true; + return false; } }