diff --git a/generator/osm2meta.cpp b/generator/osm2meta.cpp index 0ad60e5e84..07f77dd6b5 100644 --- a/generator/osm2meta.cpp +++ b/generator/osm2meta.cpp @@ -444,16 +444,7 @@ void MetadataTagProcessor::operator()(std::string const & k, std::string const & Metadata::EType mdType; if (!Metadata::TypeFromString(k, mdType)) - { - // Specific cases which do not map directly to our metadata types. - if (k == "building:min_level") - { - // Converting this attribute into height only if min_height has not been already set. - if (!md.Has(Metadata::FMD_MIN_HEIGHT)) - md.Set(Metadata::FMD_MIN_HEIGHT, ValidateAndFormat_building_levels(v)); - } return; - } std::string valid; switch (mdType) @@ -485,6 +476,7 @@ void MetadataTagProcessor::operator()(std::string const & k, std::string const & case Metadata::FMD_MIN_HEIGHT: // The same validator as for height. case Metadata::FMD_HEIGHT: valid = ValidateAndFormat_height(v); break; case Metadata::FMD_DENOMINATION: valid = ValidateAndFormat_denomination(v); break; + case Metadata::FMD_BUILDING_MIN_LEVEL: // The same validator as for building_levels. case Metadata::FMD_BUILDING_LEVELS: valid = ValidateAndFormat_building_levels(v); break; case Metadata::FMD_LEVEL: valid = ValidateAndFormat_level(v); break; case Metadata::FMD_AIRPORT_IATA: valid = ValidateAndFormat_airport_iata(v); break; diff --git a/generator/pygen/pygen.cpp b/generator/pygen/pygen.cpp index 88ddf2e58f..cccb55cf84 100644 --- a/generator/pygen/pygen.cpp +++ b/generator/pygen/pygen.cpp @@ -337,6 +337,7 @@ BOOST_PYTHON_MODULE(pygen) .value("min_height", Metadata::EType::FMD_MIN_HEIGHT) .value("denomination", Metadata::EType::FMD_DENOMINATION) .value("building_levels", Metadata::EType::FMD_BUILDING_LEVELS) + .value("building_min_level", Metadata::EType::FMD_BUILDING_MIN_LEVEL) .value("test_id", Metadata::EType::FMD_TEST_ID) .value("level", Metadata::EType::FMD_LEVEL) .value("airport_iata", Metadata::EType::FMD_AIRPORT_IATA) diff --git a/indexer/feature_meta.cpp b/indexer/feature_meta.cpp index 6f9416ec05..631e07e9bf 100644 --- a/indexer/feature_meta.cpp +++ b/indexer/feature_meta.cpp @@ -98,6 +98,8 @@ bool Metadata::TypeFromString(string const & k, Metadata::EType & outType) outType = Metadata::FMD_MIN_HEIGHT; else if (k == "building:levels") outType = Metadata::FMD_BUILDING_LEVELS; + else if (k == "building:min_level") + outType = Metadata::FMD_BUILDING_MIN_LEVEL; else if (k == "denomination") outType = Metadata::FMD_DENOMINATION; else if (k == "level") @@ -189,6 +191,7 @@ string ToString(Metadata::EType type) case Metadata::FMD_MIN_HEIGHT: return "min_height"; case Metadata::FMD_DENOMINATION: return "denomination"; case Metadata::FMD_BUILDING_LEVELS: return "building:levels"; + case Metadata::FMD_BUILDING_MIN_LEVEL: return "building:min_level"; case Metadata::FMD_TEST_ID: return "test_id"; case Metadata::FMD_LEVEL: return "level"; case Metadata::FMD_AIRPORT_IATA: return "iata"; diff --git a/indexer/feature_meta.hpp b/indexer/feature_meta.hpp index 2ab35708f5..11feb9237d 100644 --- a/indexer/feature_meta.hpp +++ b/indexer/feature_meta.hpp @@ -156,6 +156,7 @@ public: FMD_DESTINATION = 37, FMD_DESTINATION_REF = 38, FMD_JUNCTION_REF = 39, + FMD_BUILDING_MIN_LEVEL = 40, FMD_COUNT }; diff --git a/indexer/map_object.hpp b/indexer/map_object.hpp index a659e63124..035771b2ab 100644 --- a/indexer/map_object.hpp +++ b/indexer/map_object.hpp @@ -196,6 +196,7 @@ std::vector MetadataToProps(std::vector const & metadata) case Metadata::FMD_DURATION: case Metadata::FMD_DESCRIPTION: case Metadata::FMD_COUNT: + case Metadata::FMD_BUILDING_MIN_LEVEL: break; // Please add new cases when compiler issues an "unhandled switch case" warning here. } diff --git a/tools/python/mwm/mwm_interface.py b/tools/python/mwm/mwm_interface.py index a7572f4610..9001bb3996 100644 --- a/tools/python/mwm/mwm_interface.py +++ b/tools/python/mwm/mwm_interface.py @@ -109,6 +109,7 @@ class MetadataField(enum.Enum): airport_iata = 29 brand = 30 duration = 31 + building_min_level = 40 class RegionDataField(enum.Enum):