summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorsten Rahn <rahn@kde.org>2016-07-17 19:52:31 (GMT)
committerTorsten Rahn <trahn@testo.de>2016-07-17 19:52:31 (GMT)
commit693ceec0681a6a42a39c0adb18d164d96e020530 (patch)
tree9cc960c7baeb8b048b75797b03f6b00bbe24617c
parent79d448d307fde6617e78cf929015e10c2f119427 (diff)
Don't render Osm relations with tag key "area:highway".
-rw-r--r--src/plugins/runner/osm/OsmRelation.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/runner/osm/OsmRelation.cpp b/src/plugins/runner/osm/OsmRelation.cpp
index 12fc871..3125ebc 100644
--- a/src/plugins/runner/osm/OsmRelation.cpp
+++ b/src/plugins/runner/osm/OsmRelation.cpp
@@ -54,6 +54,8 @@ void OsmRelation::create(GeoDataDocument *document, const OsmWays &ways, const O
return;
}
+ bool shouldRender = true;
+
QStringList const outerRoles = QStringList() << "outer" << "";
QSet<qint64> outerWays;
QList<GeoDataLinearRing> outer = rings(outerRoles, ways, nodes, outerWays);
@@ -71,6 +73,9 @@ void OsmRelation::create(GeoDataDocument *document, const OsmWays &ways, const O
auto iterator = outerWays.begin();
GeoDataFeature::GeoDataVisualCategory const firstCategory =
OsmPresetLibrary::determineVisualCategory(ways[*iterator].osmData());
+ if (ways[*iterator].osmData().containsTagKey("area:highway")) {
+ shouldRender = false;
+ }
for( ; iterator != outerWays.end(); ++iterator ) {
GeoDataFeature::GeoDataVisualCategory const category =
OsmPresetLibrary::determineVisualCategory(ways[*iterator].osmData());
@@ -101,6 +106,7 @@ void OsmRelation::create(GeoDataDocument *document, const OsmWays &ways, const O
placemark->setOsmData(m_osmData);
placemark->setVisualCategory(outerCategory);
placemark->setStyle( GeoDataStyle::Ptr() );
+ placemark->setVisible(shouldRender);
GeoDataPolygon* polygon = new GeoDataPolygon;
polygon->setOuterBoundary(outer[0]);