Skip to content

Commit

Permalink
stop duplicating office lists, use full list in each quest (#1522)
Browse files Browse the repository at this point in the history
* stop duplicating office lists, use full list in each quest

* show OH quest only for offices with walk-in

* Fix missed office

Co-Authored-By: Tobias Zwick <newton@westnordost.de>
  • Loading branch information
matkoniecz and westnordost committed Aug 19, 2019
1 parent ab28141 commit 51a32ec
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,13 @@ public class OsmTaggings
};

public static final String SURVEY_MARK_KEY = "check_date";

public static final String[] OFFICES_VISITED_BY_GENERAL_PUBLIC = {
"insurance", "government", "travel_agent", "tax_advisor", "therapist", "religion",
"lawyer", "estate_agent", "political_party"
};

public static final String[] OFFICES_WITH_WALK_IN_BY_GENERAL_PUBLIC = {
"insurance", "government", "travel_agent", "tax_advisor", "religion"
};
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package de.westnordost.streetcomplete.quests.opening_hours

import de.westnordost.streetcomplete.R
import de.westnordost.streetcomplete.data.meta.OsmTaggings
import de.westnordost.streetcomplete.data.osm.SimpleOverpassQuestType
import de.westnordost.streetcomplete.data.osm.download.OverpassMapDataDao
import de.westnordost.streetcomplete.data.osm.changes.StringMapChangesBuilder
Expand Down Expand Up @@ -39,9 +40,7 @@ class AddOpeningHours (o: OverpassMapDataDao) : SimpleOverpassQuestType<OpeningH
"miniature_golf", "bowling_alley", "horse_riding", "amusement_arcade",
"adult_gaming_centre", "tanning_salon"
),
"office" to arrayOf(
"insurance", "government", "estate_agent", "travel_agent", "religion"
)
"office" to OsmTaggings.OFFICES_WITH_WALK_IN_BY_GENERAL_PUBLIC
).map { it.key + " ~ " + it.value.joinToString("|") }.joinToString(" or ") +
" )" +
" and !opening_hours and name and opening_hours:signed != no" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import de.westnordost.osmapi.map.data.BoundingBox
import de.westnordost.osmapi.map.data.Element
import de.westnordost.osmfeatures.FeatureDictionary
import de.westnordost.streetcomplete.R
import de.westnordost.streetcomplete.data.meta.OsmTaggings
import de.westnordost.streetcomplete.data.osm.OsmElementQuestType
import de.westnordost.streetcomplete.data.osm.changes.StringMapChangesBuilder
import de.westnordost.streetcomplete.data.osm.download.MapDataWithGeometryHandler
Expand Down Expand Up @@ -47,9 +48,7 @@ class AddPlaceName(
"water_park", "miniature_golf", "stadium", "marina", "bowling_alley",
"amusement_arcade", "adult_gaming_centre", "tanning_salon", "horse_riding"
),
"office" to arrayOf(
"insurance", "estate_agent", "travel_agent"
)
"office" to OsmTaggings.OFFICES_VISITED_BY_GENERAL_PUBLIC
).map { it.key + " ~ " + it.value.joinToString("|") }.joinToString(" or ") +
")"
)}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package de.westnordost.streetcomplete.quests.wheelchair_access

import de.westnordost.streetcomplete.R
import de.westnordost.streetcomplete.data.meta.OsmTaggings
import de.westnordost.streetcomplete.data.osm.SimpleOverpassQuestType
import de.westnordost.streetcomplete.data.osm.changes.StringMapChangesBuilder
import de.westnordost.streetcomplete.data.osm.download.OverpassMapDataDao
Expand Down Expand Up @@ -32,10 +33,7 @@ class AddWheelchairAccessBusiness(o: OverpassMapDataDao) : SimpleOverpassQuestTy
"bowling_alley", "horse_riding", "sports_centre", "fitness_centre",
"amusement_arcade", "adult_gaming_centre", "tanning_salon"
),
"office" to arrayOf(
"insurance", "government", "lawyer", "estate_agent", "political_party", "travel_agent",
"tax_advisor", "therapist", "religion"
)
"office" to OsmTaggings.OFFICES_VISITED_BY_GENERAL_PUBLIC
).map { it.key + " ~ " + it.value.joinToString("|") }.joinToString(" or ") +
" )" +
" and !wheelchair and name"
Expand Down

0 comments on commit 51a32ec

Please sign in to comment.