From 70b87d16d65db94a63d6618e1bc50004d54dd917 Mon Sep 17 00:00:00 2001 From: Jonah Adkins Date: Sat, 7 Sep 2024 09:05:59 -0400 Subject: [PATCH] take 2 :movie_camera: --- docs/schema/reference/base/bathymetry.mdx | 45 +++++++++++++++++++++++ examples/base/bathymetry-example.yaml | 20 ++++++++++ schema/base/bathymetry.yaml | 23 ++++++++++++ schema/defs.yaml | 1 + schema/schema.yaml | 8 ++++ 5 files changed, 97 insertions(+) create mode 100644 docs/schema/reference/base/bathymetry.mdx create mode 100644 examples/base/bathymetry-example.yaml create mode 100644 schema/base/bathymetry.yaml diff --git a/docs/schema/reference/base/bathymetry.mdx b/docs/schema/reference/base/bathymetry.mdx new file mode 100644 index 00000000..c515ad5c --- /dev/null +++ b/docs/schema/reference/base/bathymetry.mdx @@ -0,0 +1,45 @@ +--- +title: bathymetry +--- +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 BathymetrySchema from "!!raw-loader!@site/docs/_schema/base/bathymetry.yaml"; +import BathymetryExample from "!!raw-loader!@site/docs/_examples/base/bathymetry-example.yaml"; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +# Bathymetry + + + + + + + + + + + + + + + +
Geometry Type + Polygon +
Themebase
Typebathymetry
+## Schema + + + + + + {BathymetrySchema} + + +## Examples + + + { JSON.stringify(yamlLoad(BathymetryExample), null, 2) } + + diff --git a/examples/base/bathymetry-example.yaml b/examples/base/bathymetry-example.yaml new file mode 100644 index 00000000..e5d1ded1 --- /dev/null +++ b/examples/base/bathymetry-example.yaml @@ -0,0 +1,20 @@ +--- +id: "overture:bathymetry:example:1" +type: Feature +geometry: + type: Polygon + coordinates: [[[-73.1902319,41.6678018],[-73.1896302,41.667817],[-73.1890448,41.6667723],[-73.1899188,41.6666994],[-73.1902319,41.6678018]]] +properties: + theme: base + type: bathymetry + depth: -2500 + cartography: + min_zoom: 0 + max_zoom: 23 + sort_key: 7 + sources: + - record_id: x123 + property: "" + dataset: some source + version: 0 + update_time: "2023-05-30T00:00:00Z" diff --git a/schema/base/bathymetry.yaml b/schema/base/bathymetry.yaml new file mode 100644 index 00000000..711a1529 --- /dev/null +++ b/schema/base/bathymetry.yaml @@ -0,0 +1,23 @@ +--- +"$schema": https://json-schema.org/draft/2020-12/schema +title: bathymetry +description: topographic representation of the ocean floor +type: object +properties: + id: + "$ref": ../defs.yaml#/$defs/propertyDefinitions/id + geometry: + 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#/$defs/propertyContainers/cartographyContainer + required: + - depth + properties: + depth: { "$ref": ./defs.yaml#/$defs/propertyDefinitions/depth } diff --git a/schema/defs.yaml b/schema/defs.yaml index fc5f17d0..18900514 100644 --- a/schema/defs.yaml +++ b/schema/defs.yaml @@ -21,6 +21,7 @@ description: Common schema definitions shared by all themes type: string enum: - address + - bathymetry - building - connector - division diff --git a/schema/schema.yaml b/schema/schema.yaml index 25e8dd6b..d842897c 100644 --- a/schema/schema.yaml +++ b/schema/schema.yaml @@ -26,6 +26,14 @@ oneOf: type: { enum: [infrastructure] } then: { "$ref": base/infrastructure.yaml } else: { propertyNames: false } + - if: + properties: + properties: + properties: + theme: { enum: [base] } + type: { enum: [bathymetry] } + then: { "$ref": base/bathymetry.yaml } + else: { propertyNames: false } - if: properties: properties: