Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
westnordost committed Jan 2, 2024
2 parents b525677 + 8e9d4ad commit d47e7a9
Showing 1 changed file with 11 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -249,22 +249,18 @@ class AddMaxSpeedForm : AbstractOsmQuestForm<MaxSpeedAnswer>() {

private fun determineImplicitMaxspeedType() {
val highwayTag = element.tags["highway"]!!
if (countryInfo.countryCode == "GB") {
if (ROADS_WITH_DEFINITE_SPEED_LIMIT_GB.contains(highwayTag)) {
applyNoSignAnswer(highwayTag)
} else {
askIsDualCarriageway(
onYes = { applyNoSignAnswer("nsl_dual") },
onNo = {
determineLit(
onYes = { applyNoSignAnswer("nsl_restricted", true) },
onNo = { applyNoSignAnswer("nsl_single", false) }
)
}
)
}
} else if (ROADS_WITH_DEFINITE_SPEED_LIMIT.contains(highwayTag)) {
if (ROADS_WITH_DEFINITE_SPEED_LIMIT.contains(highwayTag)) {
applyNoSignAnswer(highwayTag)
} else if (countryInfo.countryCode == "GB") {
askIsDualCarriageway(
onYes = { applyNoSignAnswer("nsl_dual") },
onNo = {
determineLit(
onYes = { applyNoSignAnswer("nsl_restricted", true) },
onNo = { applyNoSignAnswer("nsl_single", false) }
)
}
)
} else {
askUrbanOrRural(
onUrban = { applyNoSignAnswer("urban") },
Expand Down Expand Up @@ -321,7 +317,6 @@ class AddMaxSpeedForm : AbstractOsmQuestForm<MaxSpeedAnswer>() {
private val POSSIBLY_SLOWZONE_ROADS = listOf("residential", "unclassified", "tertiary" /*#1133*/)
private val MAYBE_LIVING_STREET = listOf("residential", "unclassified")
private val ROADS_WITH_DEFINITE_SPEED_LIMIT = listOf("motorway", "living_street")
private val ROADS_WITH_DEFINITE_SPEED_LIMIT_GB = listOf("motorway", "living_street") /*#2750*/

private var LAST_INPUT_SLOW_ZONE: Int? = null
}
Expand Down

0 comments on commit d47e7a9

Please sign in to comment.