$schema: https://json-schema.org/draft/2020-12/schema
title: building
description: A building is a man-made structure with a roof that exists permanently
  in one place. Buildings are compatible with GeoJSON Polygon features.
type: object
properties:
  id:
    $ref: https://ogcincubator.github.io/bblocks-overturemaps/build/annotated/overturemaps/schemas/definitions/schema.yaml#/$defs/propertyDefinitions/id
  geometry:
    description: A regular building's geometry is defined as its footprint or roofprint
      (if traced from aerial/satellite imagery). It MUST be a Polygon or MultiPolygon
      as defined by the GeoJSON schema.
    unevaluatedProperties: false
    oneOf:
    - $ref: https://geojson.org/schema/Polygon.json
    - $ref: https://geojson.org/schema/MultiPolygon.json
  properties:
    unevaluatedProperties: false
    allOf:
    - $ref: https://ogcincubator.github.io/bblocks-overturemaps/build/annotated/overturemaps/schemas/definitions/schema.yaml#/$defs/propertyContainers/overtureFeaturePropertiesContainer
    - $ref: https://ogcincubator.github.io/bblocks-overturemaps/build/annotated/overturemaps/schemas/definitions/schema.yaml#/$defs/propertyContainers/namesContainer
    - $ref: https://ogcincubator.github.io/bblocks-overturemaps/build/annotated/overturemaps/schemas/definitions/schema.yaml#/$defs/propertyContainers/levelContainer
    - $ref: https://ogcincubator.github.io/bblocks-overturemaps/build/annotated/overturemaps/schemas/buildings/definitions/schema.yaml#/$defs/propertyContainers/shapeContainer
    required:
    - theme
    - type
    properties:
      theme:
        const: buildings
      type:
        const: building
      subtype:
        description: A broad category of the building type/purpose. When the current
          use of the building does not match the built purpose, the subtype should
          be set to represent the current use of the building.
        type: string
        enum:
        - agricultural
        - civic
        - commercial
        - education
        - entertainment
        - industrial
        - medical
        - military
        - outbuilding
        - religious
        - residential
        - service
        - transportation
      class:
        description: Further delineation of the building's built purpose.
        type: string
        enum:
        - agricultural
        - allotment_house
        - apartments
        - barn
        - beach_hut
        - boathouse
        - bridge_structure
        - bungalow
        - bunker
        - cabin
        - carport
        - cathedral
        - chapel
        - church
        - civic
        - college
        - commercial
        - cowshed
        - detached
        - digester
        - dormitory
        - dwelling_house
        - factory
        - farm
        - farm_auxiliary
        - fire_station
        - garage
        - garages
        - ger
        - glasshouse
        - government
        - grandstand
        - greenhouse
        - guardhouse
        - hangar
        - hospital
        - hotel
        - house
        - houseboat
        - hut
        - industrial
        - kindergarten
        - kiosk
        - library
        - manufacture
        - military
        - monastery
        - mosque
        - office
        - outbuilding
        - parking
        - pavilion
        - post_office
        - presbytery
        - public
        - religious
        - residential
        - retail
        - roof
        - school
        - semi
        - semidetached_house
        - service
        - shed
        - shrine
        - silo
        - slurry_tank
        - sports_centre
        - sports_hall
        - stable
        - stadium
        - static_caravan
        - stilt_house
        - storage_tank
        - sty
        - supermarket
        - synagogue
        - temple
        - terrace
        - toilets
        - train_station
        - transformer_tower
        - transportation
        - trullo
        - university
        - warehouse
        - wayside_shrine
      has_parts:
        description: Flag indicating whether the building has parts
        type: boolean
