Skip to content

Commit

Permalink
don't ask for max height if max height has been specified for forward…
Browse files Browse the repository at this point in the history
… and backward separately (fixes #5609)
  • Loading branch information
westnordost committed Apr 30, 2024
1 parent 1ea0068 commit 9f14936
Showing 1 changed file with 10 additions and 3 deletions.
Expand Up @@ -22,7 +22,7 @@ class AddMaxHeight : OsmElementQuestType<MaxHeightAnswer> {
barrier = height_restrictor
or amenity = parking_entrance and parking ~ underground|multi-storey
)
and !maxheight and !maxheight:signed and !maxheight:physical
and $noMaxHeight
""".toElementFilterExpression() }

private val roadsWithoutMaxHeightFilter by lazy { """
Expand All @@ -31,13 +31,13 @@ class AddMaxHeight : OsmElementQuestType<MaxHeightAnswer> {
highway ~ motorway|motorway_link|trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified|residential|living_street|track|road
or (highway = service and access !~ private|no and vehicle !~ private|no)
)
and !maxheight and !maxheight:signed and !maxheight:physical
and $noMaxHeight
""".toElementFilterExpression() }

private val railwayCrossingsFilter by lazy { """
nodes with
railway = level_crossing
and !maxheight and !maxheight:signed and !maxheight:physical
and $noMaxHeight
""".toElementFilterExpression() }

private val electrifiedRailwaysFilter by lazy { """
Expand Down Expand Up @@ -68,6 +68,13 @@ class AddMaxHeight : OsmElementQuestType<MaxHeightAnswer> {
and layer
""".toElementFilterExpression() }

private val noMaxHeight = """
!maxheight
and !maxheight:signed
and !maxheight:physical
and (!maxheight:forward or !maxheight:backward)
"""

override val changesetComment = "Specify maximum heights"
override val wikiLink = "Key:maxheight"
override val icon = R.drawable.ic_quest_max_height
Expand Down

0 comments on commit 9f14936

Please sign in to comment.