Skip to content

Commit

Permalink
Initial building part definition
Browse files Browse the repository at this point in the history
Add the notion of a building part. Both building footprints and building
parts share in some shape definitions. These are pulled out in a common
defs.yaml file which are shared by buildings (footprints) and parts.

Validated/tested with the test.sh script
  • Loading branch information
jwass committed Sep 18, 2023
1 parent d3ea409 commit cbdc2bc
Show file tree
Hide file tree
Showing 6 changed files with 122 additions and 8 deletions.
33 changes: 33 additions & 0 deletions examples/buildings/building-part-basic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
id: overture:buildings:part:1234
type: Feature
geometry:
type: Polygon
coordinates: [[
[-77.036873, 38.897804],
[-77.036873, 38.897559],
[-77.036260, 38.897559],
[-77.036260, 38.897804],
[-77.036873, 38.897804]
]]
properties:
# Custom user properties.
extFoo: I am a customer user property.
extBar: Me too!
# Overture properties
theme: buildings
type: part
version: 1
level: 1
updateTime: "2023-06-06T10:30:00-08:00"
height: 21.34
numFloors: 4
minHeight: 15.0
roofShape: dome
roofOrientation: across
roofDirection: 23.4
sources:
- property: ""
dataset: microsoftMLBuildings
- property: /properties/height
dataset: metaLidarExtractions
12 changes: 4 additions & 8 deletions schema/buildings/building.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,9 @@ properties:
allOf:
- "$ref": ../defs.yaml#/$defs/propertyContainers/overtureFeaturePropertiesContainer
- "$ref": ../defs.yaml#/$defs/propertyContainers/levelContainer
- "$ref": ./defs.yaml#/shapeContainer
properties:
names: { "$ref": "../defs.yaml#/$defs/propertyDefinitions/names" }
height:
description: Height of the building in meters
type: number
exclusiveMinimum: 0
numFloors:
description: Number of above-ground floors of the building
type: integer
exclusiveMinimum: 0
class:
description: >-
A broad category of the building type / purpose. When the current use of the building does not match the built purpose, the class should
Expand All @@ -48,3 +41,6 @@ properties:
- medical
- entertainment
- military
hasParts:
description: Flag indicating whether the building has parts
type: boolean
26 changes: 26 additions & 0 deletions schema/buildings/building_part.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
"$schema": https://json-schema.org/draft/2020-12/schema
title: Building Footprint Schema
description: >-
A single building part. Parts describe their shape and color and other properties. Each
building part must contain the building with which it is associated.
type: object
properties:
geometry:
description: >-
The part's geometry. It must be a polygon or multipolygon.
unevaluatedProperties: false
oneOf:
- "$ref": https://geojson.org/schema/Polygon.json
- "$ref": https://geojson.org/schema/MultiPolygon.json
properties:
unevaluatedProperties: false
allOf:
- "$ref": ../defs.yaml#/$defs/propertyContainers/overtureFeaturePropertiesContainer
- "$ref": ../defs.yaml#/$defs/propertyContainers/levelContainer
- "$ref": ./defs.yaml#/shapeContainer
properties:
building:
description: The building ID that this part belongs to
type: string

50 changes: 50 additions & 0 deletions schema/buildings/defs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
"$schema": https://json-schema.org/draft/2020-12/schema
title: Overture Maps Shared Building Properties
description: Common schema definitions shared by building footprints and building parts
shapeContainer:
properties:
height:
description: Height of the building in meters
type: number
exclusiveMinimum: 0
numFloors:
description: Number of above-ground floors of the building
type: integer
exclusiveMinimum: 0
minHeight:
description: The height of the bottom part of building in Height Units. Used if a building or part of building starts above the ground leve
type: number
roofShape:
description: The shape of the roof
type: string
enum:
- dome
- flat
- gable
- gambrel
- half-hip
- hip
- mansard
- onion
- pyramid
- round
- spherical
- other
roofDirection:
description: Direction of the roof shape.
type: number
exclusiveMinimum: 0
exclusiveMaximum: 360
roofOrientation:
description: The shape of the roof
type: string
enum:
- across
- along
roofColor:
description: The color (name or color triplet) of the roof of a building or building part in hexadecimal
type: string
eaveHeight:
description: The height of the building eave in Height Units
type: number
1 change: 1 addition & 0 deletions schema/defs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ description: Common schema definitions shared by all themes
enum:
- connector
- building
- part
- segment
- locality
- administrativeBoundary
Expand Down
8 changes: 8 additions & 0 deletions schema/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ oneOf:
type: { enum: [building] }
then: { "$ref": buildings/building.yaml }
else: { propertyNames: false }
- if:
properties:
properties:
properties:
theme: { enum: [buildings] }
type: { enum: [part] }
then: { "$ref": buildings/building_part.yaml }
else: { propertyNames: false }
- if:
properties:
properties:
Expand Down

0 comments on commit cbdc2bc

Please sign in to comment.