-
-
Notifications
You must be signed in to change notification settings - Fork 358
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
don't require from user to add surface note if they selected a generi… (
- Loading branch information
1 parent
0f11187
commit 5dc0450
Showing
38 changed files
with
401 additions
and
801 deletions.
There are no files selected for viewing
7 changes: 2 additions & 5 deletions
7
...in/java/de/westnordost/streetcomplete/osm/sidewalk_surface/LeftAndRightSidewalkSurface.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
package de.westnordost.streetcomplete.osm.sidewalk_surface | ||
|
||
import de.westnordost.streetcomplete.osm.surface.SurfaceAndNote | ||
import de.westnordost.streetcomplete.osm.surface.Surface | ||
|
||
data class LeftAndRightSidewalkSurface( | ||
val left: SurfaceAndNote?, | ||
val right: SurfaceAndNote?, | ||
) | ||
data class LeftAndRightSidewalkSurface(val left: Surface?, val right: Surface?) |
16 changes: 5 additions & 11 deletions
16
...src/main/java/de/westnordost/streetcomplete/osm/sidewalk_surface/SidewalkSurfaceParser.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,16 @@ | ||
package de.westnordost.streetcomplete.osm.sidewalk_surface | ||
|
||
import de.westnordost.streetcomplete.osm.expandSidesTags | ||
import de.westnordost.streetcomplete.osm.surface.parseSurfaceAndNote | ||
import de.westnordost.streetcomplete.osm.surface.parseSurface | ||
|
||
fun parseSidewalkSurface(tags: Map<String, String>): LeftAndRightSidewalkSurface? { | ||
val expandedTags = expandRelevantSidesTags(tags) | ||
val expandedTags = tags.toMutableMap() | ||
expandedTags.expandSidesTags("sidewalk", "surface", true) | ||
|
||
val left = parseSurfaceAndNote(expandedTags, "sidewalk:left") | ||
val right = parseSurfaceAndNote(expandedTags, "sidewalk:right") | ||
val left = parseSurface(expandedTags["sidewalk:left:surface"]) | ||
val right = parseSurface(expandedTags["sidewalk:right:surface"]) | ||
|
||
if (left == null && right == null) return null | ||
|
||
return LeftAndRightSidewalkSurface(left, right) | ||
} | ||
|
||
private fun expandRelevantSidesTags(tags: Map<String, String>): Map<String, String> { | ||
val result = tags.toMutableMap() | ||
result.expandSidesTags("sidewalk", "surface", true) | ||
result.expandSidesTags("sidewalk", "surface:note", true) | ||
return result | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 0 additions & 11 deletions
11
app/src/main/java/de/westnordost/streetcomplete/osm/surface/SurfaceParser.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
104 changes: 0 additions & 104 deletions
104
.../main/java/de/westnordost/streetcomplete/overlays/surface/SurfaceAndNoteViewController.kt
This file was deleted.
Oops, something went wrong.
86 changes: 0 additions & 86 deletions
86
app/src/main/java/de/westnordost/streetcomplete/overlays/surface/SurfaceColorMapping.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.