Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
westnordost committed Jul 13, 2022
2 parents b0ecabb + cde0f42 commit 3bdfe67
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class AddEntrance : OsmElementQuestType<EntranceAnswer> {
""".toElementFilterExpression() }

private val excludedWaysFilter by lazy { """
ways with (tunnel and tunnel != no) or covered=yes
ways with (tunnel and tunnel != no) or (covered and covered != no)
""".toElementFilterExpression() }

override val changesetComment = "Add entrance info"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class CheckExistence(
amenity = atm
or amenity = telephone
or amenity = vending_machine and vending !~ fuel|parking_tickets|public_transport_tickets
or amenity = parcel_locker
or amenity = public_bookcase
)
and (${lastChecked(2.0)})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ class CreateNoteFragment : AbstractCreateNoteFragment() {
val fullText = "$text\n\nvia ${ApplicationConstants.USER_AGENT}"
viewLifecycleScope.launch {
withContext(Dispatchers.IO) {
val recordedTrack = listener?.getRecordedTrack().orEmpty()
val recordedTrack =
if (hasGpxAttached) listener?.getRecordedTrack().orEmpty() else emptyList()
noteEditsController.add(0, NoteEditAction.CREATE, position, fullText, imagePaths, recordedTrack)
}
}
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/authors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ produce_chili.jpg CC-BY-SA 3.0 Daniel Risacher https://commons
produce_coconut.jpg CC-BY 2.0 Diego Torres Silvestre https://commons.wikimedia.org/wiki/File:Palm_Tree_%26_Coconuts..._(148713113).jpg
produce_coffee.jpg CC-BY-SA 3.0 Marcelo Corrêa https://commons.wikimedia.org/wiki/File:Bourbon_Coffee.jpg
produce_cranberry.jpg CC-BY-SA 4.0 Ecomare/Sytske Dijksen https://commons.wikimedia.org/wiki/File:Ecomare_-_cranberry_in_de_duinen_(cranberry-duinpark-sd).jpg
produce_date.jpg CC-BY-SA 3.0 Nepenthes https://commons.wikimedia.org/wiki/File:Dates005.jpg
produce_date.jpg CC-BY-SA 3.0 Nepenthes https://commons.wikimedia.org/wiki/File:Dates005.jpg
produce_fig.jpg CC-BY-SA 3.0 Archives et jardin personnels https://commons.wikimedia.org/wiki/File:Grappe_de_figues.jpg
produce_grape.jpg CC0 https://pixabay.com/de/weintrauben-rotwein-weinberg-1717387/
produce_grapefruit.jpg CC-BY-SA 3.0 Lipsio https://commons.wikimedia.org/wiki/File:Grapefruit.ebola.jpeg
Expand Down Expand Up @@ -190,6 +190,7 @@ produce_walnut.jpg CC-BY-SA 2.0 https://commons.wikimedia.org/w
ramp_none.jpg CC0 Mateusz Konieczny
ramp_stroller.jpg CC0 Mateusz Konieczny
ramp_wheelchair.jpg CC0 Mateusz Konieczny
ramp_bicycle.jpg CC0 Mateusz Konieczny

recycling_centre.jpg Public Domain http://www.afgsc.af.mil/News/Art/igphoto/2000375277/
recycling_container.jpg CC0 https://commons.wikimedia.org/wiki/File:Vitoria_-_Contenedores_de_reciclaje_en_la_Avenida_de_Gasteiz.jpg
Expand Down
Binary file modified app/src/main/res/drawable-hdpi/ramp_bicycle.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/drawable-mdpi/ramp_bicycle.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/drawable-xhdpi/ramp_bicycle.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/drawable-xxhdpi/ramp_bicycle.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,55 @@ class AddBuildingEntranceTest {
)),
way(2L, listOf(1, 3), mapOf(
"highway" to "footway",
"tunnel" to "building_pasage",
"tunnel" to "building_passage",
)),
way(3L, listOf(3, 30), mapOf(
"highway" to "footway",
)),
),
)
Assert.assertEquals(0, questType.getApplicableElements(mapData).toList().size)
}

@Test
fun `not applicable to building passage openings tagged only with unusual covered values`() {
val mapData = TestMapDataWithGeometry(
listOf(
node(1),
node(2),
node(3),
node(4),
node(30),
way(1L, listOf(1, 2, 3, 4), mapOf(
"building" to "apartments"
)),
way(2L, listOf(1, 3), mapOf(
"highway" to "footway",
"covered" to "weird_value",
)),
way(3L, listOf(3, 30), mapOf(
"highway" to "footway",
)),
),
)
Assert.assertEquals(0, questType.getApplicableElements(mapData).toList().size)
}

@Test
fun `not applicable to building passage openings tagged only with unusual tunnel values`() {
val mapData = TestMapDataWithGeometry(
listOf(
node(1),
node(2),
node(3),
node(4),
node(30),
way(1L, listOf(1, 2, 3, 4), mapOf(
"building" to "apartments"
)),
way(2L, listOf(1, 3), mapOf(
"highway" to "footway",
"tunnel" to "weird_value",
)),
way(3L, listOf(3, 30), mapOf(
"highway" to "footway",
Expand Down

0 comments on commit 3bdfe67

Please sign in to comment.