-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from OvertureMaps/building_parts
Introduce building parts
- Loading branch information
Showing
12 changed files
with
315 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
title: part | ||
--- | ||
|
||
import CodeBlock from '@theme/CodeBlock'; | ||
import JSONSchemaViewer from "@theme/JSONSchemaViewer"; | ||
import generateResolverOptions from "@site/src/components/shared-libs/generateResolverOptions" | ||
import yamlLoad from "@site/src/components/yamlLoad" | ||
import BuildingPartSchema from "!!raw-loader!@site/docs/_schema/buildings/part.yaml"; | ||
|
||
import BuildingPartExample from "!!raw-loader!@site/docs/_examples/buildings/building-part-basic.yaml"; | ||
|
||
import Tabs from '@theme/Tabs'; | ||
import TabItem from '@theme/TabItem'; | ||
|
||
# Building Part | ||
|
||
<table> | ||
<tr> | ||
<th>Geometry Type</th> | ||
<td><code>Polygon</code> or <code>MultiPolygon</code></td> | ||
</tr> | ||
<tr> | ||
<th>Theme</th> | ||
<td><code>buildings</code></td> | ||
</tr> | ||
<tr> | ||
<th>Type</th> | ||
<td><code>part</code></td> | ||
</tr> | ||
</table> | ||
|
||
|
||
## Schema | ||
|
||
<Tabs> | ||
<TabItem value="browsable" label="Browsable" default> | ||
<JSONSchemaViewer schema={ yamlLoad(BuildingPartSchema) } resolverOptions={ generateResolverOptions({remote: true, yamlBasePath: '/buildings'})}/> | ||
</TabItem> | ||
<TabItem value="yaml" label="YAML" default> | ||
<CodeBlock language="jsx">{BuildingPartSchema}</CodeBlock> | ||
</TabItem> | ||
</Tabs> | ||
|
||
## Examples | ||
|
||
<Tabs> | ||
<TabItem value="1" label="Building Part" default> | ||
<CodeBlock language="json">{ JSON.stringify(yamlLoad(BuildingPartExample), null, 2) }</CodeBlock> | ||
</TabItem> | ||
</Tabs> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
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" | ||
buildingId: abc123 | ||
height: 21.34 | ||
numFloors: 4 | ||
minHeight: 15.0 | ||
roofShape: dome | ||
roofOrientation: across | ||
roofDirection: 23.4 | ||
sources: | ||
- property: "" | ||
dataset: microsoftMLBuildings | ||
- property: /properties/height | ||
dataset: metaLidarExtractions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# https://www.openstreetmap.org/way/30407741 | ||
id: overture:buildings:building:1234 | ||
type: Feature | ||
geometry: | ||
type: Polygon | ||
coordinates: [[ | ||
[-117.1710888, 32.7238481], | ||
[-117.1711025, 32.7239038], | ||
[-117.1711923, 32.7238882], | ||
[-117.1712198, 32.724], | ||
[-117.1712713, 32.7242091], | ||
[-117.1706665, 32.7243145], | ||
[-117.1705738, 32.7239379], | ||
[-117.1707783, 32.7239022], | ||
[-117.1710888, 32.7238481] | ||
]] | ||
properties: | ||
extFoo: I am a customer user property. | ||
extBar: Me too! | ||
theme: buildings | ||
type: building | ||
version: 1 | ||
level: 1 | ||
updateTime: '2023-06-06T10:30:00-08:00' | ||
names: | ||
common: | ||
- value: Valentina by Alta | ||
language: local | ||
numFloors: 8 | ||
class: commercial | ||
sources: | ||
- property: '' | ||
dataset: OpenStreetMap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
id: overture:buildings:part:100 | ||
type: Feature | ||
geometry: | ||
type: Polygon | ||
coordinates: [[ | ||
[-117.1707971, 32.7240658], | ||
[-117.1712198, 32.724], | ||
[-117.1712713, 32.7242091], | ||
[-117.1706665, 32.7243145], | ||
[-117.1705738, 32.7239379], | ||
[-117.1707783, 32.7239022], | ||
[-117.1707949, 32.7240226], | ||
[-117.1707279, 32.7240319], | ||
[-117.1707635, 32.7241786], | ||
[-117.1708208, 32.7241677], | ||
[-117.1707971, 32.7240658] | ||
]] | ||
properties: | ||
buildingId: '1234' | ||
extFoo: I am a customer user property. | ||
extBar: Me too! | ||
theme: buildings | ||
type: part | ||
version: 1 | ||
level: 1 | ||
updateTime: '2023-06-06T10:30:00-08:00' | ||
numFloors: 8 | ||
sources: | ||
- property: '' | ||
dataset: OpenStreetMap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
id: overture:buildings:part:101 | ||
type: Feature | ||
geometry: | ||
type: Polygon | ||
coordinates: [[ | ||
[-117.1712198, 32.724], | ||
[-117.1711923, 32.7238882], | ||
[-117.1711025, 32.7239038], | ||
[-117.1710888, 32.7238481], | ||
[-117.1707783, 32.7239022], | ||
[-117.1707949, 32.7240226], | ||
[-117.1707279, 32.7240319], | ||
[-117.1707635, 32.7241786], | ||
[-117.1708208, 32.7241677], | ||
[-117.1707971, 32.7240658], | ||
[-117.1712198, 32.724] | ||
]] | ||
properties: | ||
buildingId: '1234' | ||
extFoo: I am a customer user property. | ||
extBar: Me too! | ||
theme: buildings | ||
type: part | ||
version: 1 | ||
level: 1 | ||
updateTime: '2023-06-06T10:30:00-08:00' | ||
numFloors: 3 | ||
sources: | ||
- property: '' | ||
dataset: OpenStreetMap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
--- | ||
"$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: | ||
title: Shape | ||
description: Properties of the buildings shape, such as height or roof type. | ||
properties: | ||
height: | ||
description: >- | ||
Height of the building or part in meters. The height is the distance from the lowest point to the highest point. | ||
type: number | ||
exclusiveMinimum: 0 | ||
numFloors: | ||
description: >- | ||
Number of above-ground floors of the building or part. | ||
type: integer | ||
exclusiveMinimum: 0 | ||
minHeight: | ||
description: >- | ||
The height of the bottom part of building in meters. Used if a building or part of building starts above the ground level. | ||
type: number | ||
facadeColor: | ||
description: >- | ||
The color (name or color triplet) of the facade of a building or building part in hexadecimal | ||
type: string | ||
facadeMaterial: | ||
description: >- | ||
The outer surface material of building facade. | ||
type: string | ||
enum: | ||
- brick | ||
- cement_block | ||
- concrete | ||
- glass | ||
- metal | ||
- mud | ||
- plaster | ||
- plastic | ||
- stone | ||
- wood | ||
- other | ||
roofMaterial: | ||
description: >- | ||
The outermost material of the roof. | ||
type: string | ||
enum: | ||
- concrete | ||
- copper | ||
- eternit | ||
- glass | ||
- grass | ||
- metal | ||
- plastic | ||
- roof_tiles | ||
- slate | ||
- tar_paper | ||
- thatch | ||
- wood | ||
- other | ||
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: >- | ||
Bearing of the roof ridge line. | ||
type: number | ||
exclusiveMinimum: 0 | ||
exclusiveMaximum: 360 | ||
roofOrientation: | ||
description: >- | ||
Orientation of the roof shape relative to the footprint shape. Either "along" or "across". | ||
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 meters | ||
type: number |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 Part 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#/shapeContainer | ||
- "$ref": ../defs.yaml#/$defs/propertyContainers/overtureFeaturePropertiesContainer | ||
- "$ref": ../defs.yaml#/$defs/propertyContainers/levelContainer | ||
required: [buildingId] | ||
properties: | ||
buildingId: | ||
description: The building ID to which this part belongs | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters