Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osmox #40

Merged
merged 8 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ jobs:
miniforge-version: latest
use-mamba: true

# https://pypi.org/project/osmium/
- name: Install osmium deps
shell: bash -el {0}
run: |
sudo apt-get update
sudo apt-get install build-essential cmake libboost-dev \
libexpat1-dev zlib1g-dev libbz2-dev

- name: Create conda environment
shell: bash -el {0}
run: |
Expand Down
180 changes: 180 additions & 0 deletions osmox/config_osmox.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
{
"filter": {
"building": [
"apartments",
"bungalow",
"detached",
"dormitory",
"hotel",
"house",
"residential",
"semidetached_house",
"terrace",
"commercial",
"retail",
"supermarket",
"industrial",
"office",
"warehouse",
"bakehouse",
"firestation",
"government",
"cathedral",
"chapel",
"church",
"mosque",
"other",
"shrine",
"synagogue",
"temple",
"hospital",
"kindergarden",
"school",
"university",
"college",
"sports_hall",
"stadium",
"yes"
],
"public_transport": ["*"],
"highway": ["bus_stop"]
},

"object_features": ["units", "levels", "area", "floor_area"],

"distance_to_nearest": ["transit", "shop", "medical"],

"default_tags": [["building", "residential"]],

"activity_mapping": {
"public_transport": {
"*": ["transit"]
},
"highway": {
"bus_stop": ["transit"]
},
"building": {
"apartments": ["home"],
"bungalow": ["home"],
"detached": ["home"],
"dormitory": ["home"],
"hotel": ["home"],
"house": ["home"],
"residential": ["home"],
"semidetached_house": ["home"],
"terrace": ["home"],
"commercial": ["shop", "work"],
"retail": ["shop", "work"],
"supermarket": ["shop", "work"],
"industrial": ["work"],
"office": ["work"],
"warehouse": ["work"],
"bakehouse": ["work"],
"firestation": ["work"],
"government": ["work"],
"cathedral": ["other"],
"chapel": ["other"],
"church": ["other"],
"mosque": ["other"],
"other": ["other"],
"shrine": ["other"],
"synagogue": ["other"],
"temple": ["other"],
"hospital": ["medical", "work"],
"kindergarden": ["education_kg", "work"],
"school": ["education_school", "work"],
"university": ["education_university", "work"],
"college": ["education_college", "work"],
"sports_hall": ["other", "work"],
"stadium": ["other", "work"]
},
"amenity": {
"bar": ["visit", "work"],
"pub": ["visit", "work"],
"cafe": ["visit", "work", "shop"],
"fast_food": ["work", "shop"],
"food_court": ["work", "shop"],
"ice_cream": ["work", "shop"],
"restaurant": ["work", "shop"],
"college": ["education_college", "work"],
"kindergarten": ["education_kg", "work"],
"language_school": ["education_school", "work"],
"library": ["other", "work"],
"music_school": ["education_school", "work"],
"school": ["education_school", "work"],
"university": ["education_university", "work"],
"bank": ["other", "work"],
"clinic": ["medical", "work"],
"dentist": ["medical", "work"],
"doctors": ["medical", "work"],
"hospital": ["medical", "work"],
"pharmacy": ["shop", "work"],
"visit_facility": ["medical", "work"],
"vetinary": ["other", "work"],
"arts_centre": ["other", "work"],
"casino": ["other", "work"],
"cinema": ["other", "work"],
"community_centre": ["other"],
"gambling": ["other", "work"],
"studio": ["other", "work"],
"theatre": ["other", "work"],
"courthouse": ["other", "work"],
"crematorium": ["other", "work"],
"embassy": ["other", "work"],
"fire_station": ["work"],
"funeral_hall": ["other", "work"],
"internet_cafe": ["other", "work"],
"marketplace": ["shop", "work"],
"place_of_worship": ["other"],
"police": ["other", "work"],
"post_box": ["other", "work"],
"post_work": ["other", "work"],
"post_office": ["other", "work"],
"prison": ["other", "work"],
"townhall": ["other", "work"]
},
"healthcare": {
"*": ["medical", "work"]
},
"landuse": {
"commercial": ["shop", "work"],
"industrial": ["work"],
"residential": ["home"],
"retail": ["shop", "work"],
"work": ["work"],
"port": ["work"],
"quary": ["work"],
"other": ["other"]
},
"other": {
"adult_gaming_centre": ["other", "work"],
"amusement_arcade": ["other", "work"],
"beach_resort": ["other"],
"dance": ["other", "work"],
"escape_game": ["other", "work"],
"fishing": ["other"],
"fitness_centre": ["other", "work"],
"fitness_station": ["other"],
"garden": ["other"],
"horse_riding": ["other", "work"],
"ice_rink": ["other", "work"],
"marina": ["other", "work"],
"miniature_golf": ["other"],
"nature_reserve": ["other"],
"park": ["other"],
"pitch": ["other"],
"playground": ["other"],
"sports_centre": ["other", "work"],
"stadium": ["other", "work"],
"swimming_pool": ["other", "work"],
"track": ["other"],
"water_park": ["other", "work"]
},
"office": {
"*": ["work"]
},
"shop": {
"*": ["shop", "work"]
}
}
}
8 changes: 8 additions & 0 deletions osmox/osmox_notes.txt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we can move these osmox notes to a section in the documentation as part of #63?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to add the notes as a subsection under the Installation section of the main README? If that sounds good, do you mind doing it? I think you're better placed to add the notes than I am.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, I'll go ahead and add these notes to the docs as part of #63. I think we can have a section on configuration of the pipeline and we can include a subsection on osmox and mention the default config file JSON (config_osmox.json) along with the descriptions here.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- filter: which POIs to keep

- object_features: which features to retain
- can I retain isced to distinguish between primary and secondary schools? See here: https://wiki.openstreetmap.org/wiki/Tag:amenity%3Dschool

- distance to nearest: list that can include any of the activities that you have included in activity mapping. e.g.: ["transit", "education", "shop", "medical"],

- fill_missing_activities: only include if you want to fill missing activities
Loading
Loading