[styles] Support min_height and building:min_level in metadata

This commit is contained in:
Ilya Zverev 2015-12-15 14:44:13 +03:00
parent 7169223390
commit 6c5f5982b7
2 changed files with 19 additions and 1 deletions

View file

@ -140,6 +140,23 @@ public:
md.Set(Metadata::FMD_HEIGHT, value);
}
}
else if (k == "min_height")
{
string const & value = ValidateAndFormat_height(v);
if (!value.empty())
md.Set(Metadata::FMD_MIN_HEIGHT, value);
}
else if (k == "building:min_level")
{
// Ignoring if FMD_HEIGHT already set
if (md.Get(Metadata::FMD_HEIGHT).empty())
{
// Converting this attribute into height
string const & value = ValidateAndFormat_building_levels(v);
if (!value.empty())
md.Set(Metadata::FMD_MIN_HEIGHT, value);
}
}
else if (k == "denomination")
{
string const & value = ValidateAndFormat_denomination(v);

View file

@ -38,7 +38,8 @@ namespace feature
FMD_MAXSPEED = 17,
FMD_FLATS = 18,
FMD_HEIGHT = 19,
FMD_DENOMINATION = 20,
FMD_MIN_HEIGHT = 20,
FMD_DENOMINATION = 21,
FMD_COUNT
};