forked from organicmaps/organicmaps
[generator] Fixed castle_type.
Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
This commit is contained in:
parent
c3e45d9cef
commit
80941a21e0
2 changed files with 5 additions and 15 deletions
|
@ -1848,6 +1848,7 @@ UNIT_CLASS_TEST(TestWithClassificator, OsmType_SimpleTypesSmoke)
|
|||
{"historic", "archaeological_site"},
|
||||
{"historic", "boundary_stone"},
|
||||
{"historic", "castle"},
|
||||
{"historic", "city_gate"},
|
||||
{"historic", "citywalls"},
|
||||
{"historic", "fort"},
|
||||
{"historic", "memorial"},
|
||||
|
@ -2317,6 +2318,10 @@ UNIT_CLASS_TEST(TestWithClassificator, OsmType_ComplexTypesSmoke)
|
|||
{{"highway", "unclassified", "bridge"}, {{"highway", "unclassified"}, {"bridge", "any_value"}}},
|
||||
{{"highway", "unclassified", "tunnel"}, {{"highway", "unclassified"}, {"tunnel", "any_value"}}},
|
||||
{{"historic", "castle", "defensive"}, {{"historic", "castle"}, {"castle_type", "defensive"}}},
|
||||
{{"historic", "castle", "fortress"}, {{"historic", "castle"}, {"castle_type", "fortress"}}},
|
||||
{{"historic", "castle", "fortress"}, {{"historic", "fortress"}}},
|
||||
{{"historic", "castle", "manor"}, {{"historic", "castle"}, {"castle_type", "manor"}}},
|
||||
{{"historic", "castle", "manor"}, {{"historic", "manor"}}},
|
||||
{{"historic", "castle", "stately"}, {{"historic", "castle"}, {"castle_type", "stately"}}},
|
||||
{{"historic", "memorial", "plaque"}, {{"historic", "memorial"}, {"memorial", "plaque"}}},
|
||||
{{"historic", "memorial", "plaque"}, {{"historic", "memorial"}, {"memorial:type", "plaque"}}},
|
||||
|
|
|
@ -588,21 +588,6 @@ void PreprocessElement(OsmElement * p)
|
|||
}
|
||||
});
|
||||
|
||||
p->UpdateTag("castle_type", [](string & value) {
|
||||
if (value.empty())
|
||||
return;
|
||||
|
||||
if (value == "fortress" || value == "kremlin" || value == "castrum" || value == "shiro" ||
|
||||
value == "citadel")
|
||||
{
|
||||
value = "defensive";
|
||||
}
|
||||
else if (value == "manor" || value == "palace")
|
||||
{
|
||||
value = "stately";
|
||||
}
|
||||
});
|
||||
|
||||
p->UpdateTag("attraction", [](string & value) {
|
||||
// "specified" is a special value which means we have the "attraction" tag,
|
||||
// but its value is not "animal".
|
||||
|
|
Loading…
Add table
Reference in a new issue