Skip to content

Commit

Permalink
support popular craft values and more office values (#1526)
Browse files Browse the repository at this point in the history
* support popular craft values

fixes #1525

* a bit more offices, more things to name among crafts and offices

* drop single-use constants

* simplify name quest, ask about all craft=* and office=*

I decided to ask ask about office=yes and craft=yes

* drop electrician and plumber from wheelchair quest

I admit that I have no idea why I added them
  • Loading branch information
matkoniecz authored and westnordost committed Aug 21, 2019
1 parent 51a32ec commit 3b82890
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 14 deletions.
Expand Up @@ -22,13 +22,4 @@ 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"
};
}
Expand Up @@ -40,7 +40,15 @@ class AddOpeningHours (o: OverpassMapDataDao) : SimpleOverpassQuestType<OpeningH
"miniature_golf", "bowling_alley", "horse_riding", "amusement_arcade",
"adult_gaming_centre", "tanning_salon"
),
"office" to OsmTaggings.OFFICES_WITH_WALK_IN_BY_GENERAL_PUBLIC
"office" to arrayOf(
// also listed for AddWheelchair quest
"insurance", "government", "travel_agent", "tax_advisor", "religion", "employment_agency"
),
"craft" to arrayOf(
// also listed for AddWheelchair quest
"carpenter", "shoemaker", "tailor", "photographer", "dressmaker",
"electronics_repair", "key_cutter", "stonemason"
)
).map { it.key + " ~ " + it.value.joinToString("|") }.joinToString(" or ") +
" )" +
" and !opening_hours and name and opening_hours:signed != no" +
Expand Down
Expand Up @@ -20,7 +20,7 @@ class AddPlaceName(

private val filter by lazy { FiltersParser().parse(
"nodes, ways, relations with !name and !brand and noname != yes " +
" and (shop and shop !~ no|vacant or tourism = information and information = office " +
" and (shop and shop !~ no|vacant or craft or office or tourism = information and information = office " +
" or " +
mapOf(
"amenity" to arrayOf(
Expand All @@ -47,8 +47,7 @@ class AddPlaceName(
"nature_reserve", "sports_centre", "fitness_centre", "dance", "golf_course",
"water_park", "miniature_golf", "stadium", "marina", "bowling_alley",
"amusement_arcade", "adult_gaming_centre", "tanning_salon", "horse_riding"
),
"office" to OsmTaggings.OFFICES_VISITED_BY_GENERAL_PUBLIC
)
).map { it.key + " ~ " + it.value.joinToString("|") }.joinToString(" or ") +
")"
)}
Expand Down
Expand Up @@ -33,7 +33,19 @@ class AddWheelchairAccessBusiness(o: OverpassMapDataDao) : SimpleOverpassQuestTy
"bowling_alley", "horse_riding", "sports_centre", "fitness_centre",
"amusement_arcade", "adult_gaming_centre", "tanning_salon"
),
"office" to OsmTaggings.OFFICES_VISITED_BY_GENERAL_PUBLIC
"office" to arrayOf(
// also listed for AddOpeningHours quest
"insurance", "government", "travel_agent", "tax_advisor", "religion", "employment_agency",
// not listed manually for other quests
"lawyer", "estate_agent", "political_party", "therapist"
),
"craft" to arrayOf(
// also listed for AddOpeningHours quest
"carpenter", "shoemaker", "tailor", "photographer", "dressmaker",
"electronics_repair", "key_cutter", "stonemason",
// not listed manually for other quests
"winery"
)
).map { it.key + " ~ " + it.value.joinToString("|") }.joinToString(" or ") +
" )" +
" and !wheelchair and name"
Expand Down

0 comments on commit 3b82890

Please sign in to comment.