Skip to content

Commit

Permalink
Disallow splitting closed roundabouts (fix #5372)
Browse files Browse the repository at this point in the history
  • Loading branch information
westnordost committed Nov 13, 2023
1 parent 814f6f6 commit 2ffaa17
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ fun Element.isArea(): Boolean = when (this) {
else -> false
}

/** An element is only splittable if it is a way that is either not closed or neither an area
* nor a roundabout */
fun Element.isSplittable(): Boolean = when (this) {
is Way -> !isClosed || !IS_AREA_EXPRESSION.matches(this)
// see #5372 for as to why junction=roundabout is not splittable
is Way -> !isClosed || (!IS_AREA_EXPRESSION.matches(this) && tags["junction"] != "roundabout")
else -> false
}

Expand Down

0 comments on commit 2ffaa17

Please sign in to comment.