Skip to content

Commit

Permalink
Merge pull request #89 from OvertureMaps/building-material-and-roofs-…
Browse files Browse the repository at this point in the history
…mappings

Supporting files for buildings theme
  • Loading branch information
jenningsanderson authored Feb 28, 2024
2 parents 525bd78 + 0968d40 commit 5ddb3a8
Show file tree
Hide file tree
Showing 7 changed files with 464 additions and 6 deletions.
18 changes: 12 additions & 6 deletions schema/buildings/defs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ shapeContainer:
enum:
- brick
- cement_block
- clay
- concrete
- glass
- metal
- mud
- plaster
- plastic
- stone
- timber_framing
- wood
roof_material:
description: >-
Expand All @@ -49,27 +50,32 @@ shapeContainer:
- eternit
- glass
- grass
- gravel
- metal
- plastic
- roof_tiles
- slate
- tar_paper
- solar_panels
- thatch
- tar_paper
- wood
roof_shape:
description: The shape of the roof
type: string
enum:
- dome
- flat
- gable
- gabled
- gambrel
- half_hip
- hip
- half_hipped
- hipped
- mansard
- onion
- pyramid
- pyramidal
- round
- saltbox
- sawtooth
- skillion
- spherical
roof_direction:
description: >-
Expand Down
19 changes: 19 additions & 0 deletions task-force-docs/buildings/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Description of the mappings files
===

### `class_mapping.json`
The mapping for OSM's `building` tag to Overture `class` attribute.

### `facade_material_mapping.json`
OSM tags used for mapping in order:
- `building:material` (documentation: https://wiki.openstreetmap.org/wiki/Key:building:material)
- `building:facade:material` (documentation: https://wiki.openstreetmap.org/wiki/Key:building:facade:material)

### `roof_material_mapping.json`
OSM tags used for mapping:
- `roof:material` (documentation: https://wiki.openstreetmap.org/wiki/Key:roof:material)

## `roof_shape_mapping.json`
OSM tags used for mapping in order:
- `roof:shape` (documentation: https://wiki.openstreetmap.org/wiki/Key:roof:shape)
- `building:roof:shape` (deprecated, documentation: https://wiki.openstreetmap.org/wiki/Key:building:roof:shape)
201 changes: 201 additions & 0 deletions task-force-docs/buildings/building_class_query.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
CASE
-- Agricultural
WHEN tags['building'] IN (
'agricultural',
'barn',
'cowshed',
'farm',
'farm_auxiliary',
'glasshouse',
'greenhouse',
'silo',
'stable',
'sty'
) THEN 'agricultural'

-- Civic
WHEN tags['building'] IN (
'civic',
'fire_station',
'government',
'government_office',
'public'
) OR tags['amenity'] IN (
'animal_shelter',
'community_centre',
'courthouse',
'fire_station',
'library',
'police',
'post_office',
'public_bath',
'public_building',
'ranger_station',
'shelter',
'social_centre',
'townhall',
'veterinary'
) THEN 'civic'

--Commercial
WHEN tags['building'] IN (
'commercial',
'hotel',
'kiosk',
'marketplace',
'office',
'restaurant',
'retail',
'shop',
'supermarket',
'warehouse'
) OR tags['amenity'] IN (
'bar',
'cafe',
'fast_food',
'food_court',
'fuel',
'ice_cream',
'pub',
'restaurant'
) THEN 'commercial'

--Education
WHEN tags['building'] IN (
'college',
'kindergarten',
'school',
'university'
) OR tags['amenity'] IN (
'college',
'driving_school',
'kindergarten',
'music_school',
'school',
'university'
) THEN 'education'

--Entertainment
WHEN tags['building'] IN (
'grandstand',
'pavillion',
'sports_centre',
'sports_hall',
'stadium'
) OR tags['amenity'] IN (
'casino',
'conference_centre',
'events_venue',
'cinema',
'theatre',
'arts_centre',
'nightclub'
) OR tags['tourism'] IN (
'aquarium',
'attraction',
'gallery',
'museum'
) THEN 'entertainment'

--Industrial
WHEN tags['building'] IN (
'factory',
'industrial',
'manufacture'
) THEN 'industrial'

--Medical
WHEN tags['building'] IN (
'clinic',
'hospital'
) OR tags['amenity'] IN (
'clinic',
'dentist',
'doctors',
'hospital',
'pharmacy'
) THEN 'medical'

--Military
WHEN tags['building'] IN (
'bunker',
'military'
) THEN 'military'

--Outbuilding
WHEN tags['building'] IN (
'allotment_house',
'carport',
'outbuilding',
'shed'
) THEN 'outbuilding'

--Religious
WHEN tags['building'] IN (
'cathedral',
'chapel',
'church',
'monastary',
'mosque',
'presbytery',
'religious',
'shrine',
'synagogue',
'temple',
'wayside_shrine'
) OR tags['amenity'] = 'place_of_worship'
THEN 'religious'

--Residential
WHEN tags['building'] IN (
'apartments',
'bungalow',
'cabin',
'detached',
'dormitory',
'duplex',
'dwelling_house',
'garage',
'garages',
'ger',
'house',
'houseboat',
'hut',
'residential',
'semi',
'semidetached_house',
'static_caravan',
'stilt_house',
'terrace',
'townhouse',
'trullo'
) OR tags['amenity'] IN (
'nursing_home'
) THEN 'residential'

--Service
WHEN tags['building'] IN (
'beach_hut',
'boathouse',
'digester',
'guardhouse',
'parking',
'service',
'slurry_tank',
'storage_tank',
'toilets',
'transformer_tower'
) THEN 'service'

--Transportation
WHEN tags['building'] IN (
'hangar',
'train_station',
'transportation'
) OR tags['amenity'] IN (
'bicycle_parking',
'bus_station',
'parking'
) THEN 'transportation'
ELSE NULL
END
86 changes: 86 additions & 0 deletions task-force-docs/buildings/facade_material_mapping.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"brick": [
"brick",
"slate",
"ladrillos",
"masonry",
"silicate brick",
"bricks",
"unburnt brick",
"silicate_brick",
"brick_block",
"muddy_brick"
],
"cement_block": [
"cement_block",
"block",
"cement block",
"cement_blocks",
"cement blocks"
],
"clay": [
"clay",
"mud",
"rammed_earth",
"loam",
"earth",
"grass",
"pressed_soil_blocks"
],
"concrete": [
"concrete",
"concrete masonry unit",
"cement",
"concrete_reinforced",
"reinforced_concrete"
],
"glass": [
"glass",
"mirror"
],
"metal": [
"metal",
"steel",
"metal_plates",
"tin",
"iron_sheet",
"copper",
"metal_sheet",
"ironsheets",
"panel",
"aluminium"
],
"plaster": [
"plaster",
"plastered",
"hard"
],
"plastic": [
"plastic",
"vinyl",
"plastic_sheeting",
"composite",
"vinyl_siding"
],
"stone": [
"stone",
"limestone",
"sandstone",
"granite",
"marble",
"tiles"
],
"timber_framing": [
"timber_framing",
"traditional"
],
"wood": [
"wood",
"reed",
"wattle_and_daub",
"timber_planks",
"wood/masonry",
"wood/bamboo",
"bamboo"
]
}
Loading

0 comments on commit 5ddb3a8

Please sign in to comment.