Skip to content

Commit

Permalink
Merge pull request #56 from arup-group/feature-json-schema
Browse files Browse the repository at this point in the history
Feature json schema
  • Loading branch information
brynpickering authored May 1, 2024
2 parents d48e69a + 80a3098 commit 7202670
Show file tree
Hide file tree
Showing 16 changed files with 740 additions and 425 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Configuration validation to use a JSON schema. Partially **backward-incompatible** since configuration errors now raise exceptions rather than logging a message to the `error` level [#56](https://github.com/arup-group/osmox/pull/56).
- Recommended installation instructions changed from using `pip` to creating a `mamba` environment [#38](https://github.com/arup-group/osmox/pull/38).
- Supported and tested Python versions updated to py3.10 - py3.12 [#38](https://github.com/arup-group/osmox/pull/38).
- Majority of documentation moved from README to dedicated documentation site: https://arup-group.github.io/osmox [#40](https://github.com/arup-group/osmox/pull/40).
- Default output format changed from `.geojson` to `.gpkg` & support for multiple file formats (`.gpkg`, `.geojson`, `.parquet`) [#41](https://github.com/arup-group/osmox/issues/41)

### Added

- Rendered JSON schema in documentation [#56](https://github.com/arup-group/osmox/pull/56).
- Activity infilling can use a geospatial point data source to fill OSM `landuse` areas, e.g. postcode data points.
- Activity infilling can take place in target areas that have existing facilities, using the `max_existing_acts_fraction` argument to set the area that existing facilities can already take up in the target geometry while still allowing infilling.

Expand Down
349 changes: 175 additions & 174 deletions configs/config_UK.json
Original file line number Diff line number Diff line change
@@ -1,180 +1,181 @@
{
"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"]
},
"$schema": "../src/osmox/schema.json",
"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"],
"object_features": ["units", "levels", "area", "floor_area"],

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

"default_tags": [["building", "residential"]],
"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", "work"],
"school": ["education", "work"],
"university": ["education", "work"],
"college": ["education", "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", "work"],
"kindergarten": ["education", "work"],
"language_school": ["education", "work"],
"library": ["other", "work"],
"music_school": ["education", "work"],
"school": ["education", "work"],
"university": ["education", "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"]
}
}
"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", "work"],
"school": ["education", "work"],
"university": ["education", "work"],
"college": ["education", "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", "work"],
"kindergarten": ["education", "work"],
"language_school": ["education", "work"],
"library": ["other", "work"],
"music_school": ["education", "work"],
"school": ["education", "work"],
"university": ["education", "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"]
}
}
}
Loading

0 comments on commit 7202670

Please sign in to comment.