From 5db4dc887851f19ce31d24f7d68da57e09f7069c Mon Sep 17 00:00:00 2001 From: Maksim Andrianov Date: Thu, 16 Jan 2020 17:07:05 +0300 Subject: [PATCH] [generator] Fixed some values of places in Germany. --- generator/osm2type.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/generator/osm2type.cpp b/generator/osm2type.cpp index 73e4bd8df2..e4b61dbb76 100644 --- a/generator/osm2type.cpp +++ b/generator/osm2type.cpp @@ -581,6 +581,18 @@ void PreprocessElement(OsmElement * p) ++iter; } } + + // We replace a value of 'place' with a value of 'de: place' because most people regard + // places names as 'de: place' defines it. + // TODO(@m.andrianov): A better solution for the future is writing this rule in replaced_tags.txt + // file. But syntax for this isn't supported by relace tags mechanism. + auto const dePlace = p->GetTag("de:place"); + if (!dePlace.empty()) + { + p->UpdateTag("place", [&](auto & value) { + value = dePlace; + }); + } } void PostprocessElement(OsmElement * p, FeatureBuilderParams & params)