mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-28 03:35:51 +03:00
Correlate some more activities with OSM tags. (#423)
Thanks to Tom Skinner (@trskinner) for the patch!
This commit is contained in:
parent
634b6ad375
commit
5c09e24225
@ -73,6 +73,8 @@ pub enum Activity {
|
||||
School,
|
||||
Entertainment,
|
||||
Errands,
|
||||
Financial,
|
||||
Healthcare,
|
||||
Home,
|
||||
Work,
|
||||
}
|
||||
|
@ -72,7 +72,62 @@ fn find_building_for_activity(
|
||||
) -> Option<BuildingID> {
|
||||
// What types of OpenStreetMap amenities will satisfy each activity?
|
||||
let categories: HashSet<&'static str> = match activity {
|
||||
Activity::Entertainment => vec!["cinema", "theatre"],
|
||||
Activity::Breakfast => vec!["cafe"],
|
||||
Activity::Lunch => vec!["pub", "food_court", "fast_food"],
|
||||
Activity::Dinner => vec!["restaurant", "theatre", "biergarten"],
|
||||
Activity::School => vec![
|
||||
"college",
|
||||
"kindergarten",
|
||||
"language_school",
|
||||
"library",
|
||||
"music_school",
|
||||
"university",
|
||||
],
|
||||
Activity::Entertainment => vec![
|
||||
"arts_centre",
|
||||
"casino",
|
||||
"cinema",
|
||||
"community_centre",
|
||||
"fountain",
|
||||
"gambling",
|
||||
"nightclub",
|
||||
"planetarium",
|
||||
"public_bookcase",
|
||||
"pool",
|
||||
"dojo",
|
||||
"social_centre",
|
||||
"social_centre",
|
||||
"studio",
|
||||
"theatre",
|
||||
"bar",
|
||||
"bbq",
|
||||
"bicycle_rental",
|
||||
"boat_rental",
|
||||
"boat_sharing",
|
||||
"dive_centre",
|
||||
"internet_cafe",
|
||||
],
|
||||
Activity::Errands => vec![
|
||||
"marketplace",
|
||||
"post_box",
|
||||
"photo_booth",
|
||||
"recycling",
|
||||
"townhall",
|
||||
],
|
||||
Activity::Financial => vec!["bank", "atm", "bureau_de_change"],
|
||||
Activity::Healthcare => vec![
|
||||
"baby_hatch",
|
||||
"clinic",
|
||||
"dentist",
|
||||
"doctors",
|
||||
"hospital",
|
||||
"nursing_home",
|
||||
"pharmacy",
|
||||
"social_facility",
|
||||
"veterinary",
|
||||
"childcare",
|
||||
],
|
||||
Activity::Work => vec!["bank", "clinic"],
|
||||
// TODO Fill this out. amenity_type in map_gui/src/tools/mod.rs might be helpful. It might
|
||||
// also be helpful to edit the list of possible activities in lib.rs too.
|
||||
_ => vec![],
|
||||
|
Loading…
Reference in New Issue
Block a user