From a4e08e4e8c1e862b124117a5f6398bbf610a3d83 Mon Sep 17 00:00:00 2001 From: RubenKelevra Date: Sat, 21 Sep 2024 22:01:42 +0200 Subject: [PATCH] add building=roofs to the maxheight quest; fix pipelines not being filtered correctly --- .../streetcomplete/quests/max_height/AddMaxHeight.kt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/max_height/AddMaxHeight.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/max_height/AddMaxHeight.kt index 3ab350975d..481fd73421 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/max_height/AddMaxHeight.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/max_height/AddMaxHeight.kt @@ -59,10 +59,13 @@ class AddMaxHeight : OsmElementQuestType { private val bridgeFilter by lazy { """ ways with ( - highway ~ ${(ALL_ROADS + ALL_PATHS).joinToString("|")} - or railway ~ rail|light_rail|subway|narrow_gauge|tram|disused|preserved|funicular|monorail - ) and ( - bridge and bridge != no + ( + highway ~ ${(ALL_ROADS + ALL_PATHS).joinToString("|")} + or railway ~ rail|light_rail|subway|narrow_gauge|tram|disused|preserved|funicular|monorail + ) + and bridge and bridge != no + ) or ( + building = roof or man_made = pipeline and location = overhead ) and layer @@ -88,6 +91,7 @@ class AddMaxHeight : OsmElementQuestType { && tags["covered"] == null && tags["man_made"] != "pipeline" && tags["railway"] != "level_crossing" + && tags["building"] != "roof" // only the "below the bridge" situation may need some context return when { isBelowBridge -> R.string.quest_maxheight_sign_below_bridge_title