From 10cb05d690d6038c9c2e43ccfb7c8e1e73918294 Mon Sep 17 00:00:00 2001 From: Pete Gadomski Date: Mon, 23 Oct 2023 11:34:35 -0400 Subject: [PATCH] Update datacube extension (#1269) * feat: update datacube extension * chore: update changelog --- CHANGELOG.md | 1 + pystac/extensions/datacube.py | 83 +- tests/data-files/datacube/item.json | 18 +- .../test_datacube/test_set_dimensions.yaml | 244 +++--- .../test_datacube/test_set_variables.yaml | 827 ++++++++++++++--- .../test_datacube/test_validate.yaml | 829 +++++++++++++++--- tests/extensions/test_datacube.py | 39 +- 7 files changed, 1697 insertions(+), 344 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d2403c4fb..b5b8af7b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - `validate_all` now accepts a `STACObject` (in addition to accepting a dict, which is now deprecated), but prohibits supplying a value for `href`, which must be supplied _only_ when supplying an object as a dict. Once `validate_all` removes support for an object as a dict, the `href` parameter will also be removed. ([#1246](https://github.com/stac-utils/pystac/pull/1246)) - Report `href` when schema url resolution fails ([#1263](https://github.com/stac-utils/pystac/pull/1263)) - Version extension updated to v1.2.0 ([#1262](https://github.com/stac-utils/pystac/pull/1262)) +- Datacube extension updated to v2.2.0 ([#1269](https://github.com/stac-utils/pystac/pull/1269)) ### Fixed diff --git a/pystac/extensions/datacube.py b/pystac/extensions/datacube.py index bcebd684d..e615b442e 100644 --- a/pystac/extensions/datacube.py +++ b/pystac/extensions/datacube.py @@ -15,7 +15,7 @@ "T", pystac.Collection, pystac.Item, pystac.Asset, item_assets.AssetDefinition ) -SCHEMA_URI = "https://stac-extensions.github.io/datacube/v2.0.0/schema.json" +SCHEMA_URI = "https://stac-extensions.github.io/datacube/v2.2.0/schema.json" PREFIX: str = "cube:" DIMENSIONS_PROP = PREFIX + "dimensions" @@ -44,6 +44,7 @@ class DimensionType(StringEnum): """Dimension object types for spatial and temporal Dimension Objects.""" SPATIAL = "spatial" + GEOMETRIES = "geometries" TEMPORAL = "temporal" @@ -75,12 +76,16 @@ def __init__(self, properties: dict[str, Any]) -> None: @property def dim_type(self) -> DimensionType | str: - """The type of the dimension. Must be ``"spatial"`` for :stac-ext:`Horizontal - Spatial Dimension Objects ` or + """The type of the dimension. Must be ``"spatial"`` for + :stac-ext:`Horizontal Spatial Dimension Objects + ` or :stac-ext:`Vertical Spatial Dimension Objects - `, and ``"temporal"`` for - :stac-ext:`Temporal Dimension Objects `. May - be an arbitrary string for :stac-ext:`Additional Dimension Objects + `, ``geometries`` for + :stac-ext:`Spatial Vector Dimension Objects + ` ``"temporal"`` for + :stac-ext:`Temporal Dimension Objects + `. May be an arbitrary string for + :stac-ext:`Additional Dimension Objects `.""" return get_required( self.properties.get(DIM_TYPE_PROP), "cube:dimension", DIM_TYPE_PROP @@ -119,6 +124,8 @@ def from_dict(d: dict[str, Any]) -> Dimension: return VerticalSpatialDimension(d) else: return HorizontalSpatialDimension(d) + elif dim_type == DimensionType.GEOMETRIES: + return VectorSpatialDimension(d) elif dim_type == DimensionType.TEMPORAL: # The v1.0.0 spec says that AdditionalDimensions can have # type 'temporal', but it is unclear how to differentiate that @@ -225,6 +232,68 @@ def unit(self, v: str | None) -> None: self.properties[DIM_UNIT_PROP] = v +class VectorSpatialDimension(Dimension): + @property + def axes(self) -> list[str] | None: + """Axes of the vector dimension as an ordered set of `x`, `y` and `z`.""" + return self.properties.get("axes") + + @axes.setter + def axes(self, v: list[str]) -> None: + if v is None: + self.properties.pop("axes", None) + else: + self.properties["axes"] = v + + @property + def bbox(self) -> list[float]: + """A single bounding box of the geometries as defined for STAC + Collections but not nested.""" + return get_required(self.properties.get("bbox"), "cube:bbox", "bbox") + + @bbox.setter + def bbox(self, v: list[float]) -> None: + self.properties["bbox"] = v + + @property + def values(self) -> list[str] | None: + """Optionally, a representation of the geometries. This could be a list + of WKT strings or other identifiers.""" + return self.properties.get(DIM_VALUES_PROP) + + @values.setter + def values(self, v: list[str] | None) -> None: + if v is None: + self.properties.pop(DIM_VALUES_PROP, None) + else: + self.properties[DIM_VALUES_PROP] = v + + @property + def geometry_types(self) -> list[str] | None: + """A set of geometry types. If not present, mixed geometry types must be + assumed.""" + return self.properties.get("geometry_types") + + @geometry_types.setter + def geometry_types(self, v: list[str] | None) -> None: + if v is None: + self.properties.pop("geometry_types", None) + else: + self.properties["geometry_types"] = v + + @property + def reference_system(self) -> str | float | dict[str, Any] | None: + """The reference system for the data.""" + return self.properties.get(DIM_REF_SYS_PROP) + + @reference_system.setter + def reference_system(self, v: str | float | dict[str, Any] | None) -> None: + if v is None: + self.properties.pop(DIM_REF_SYS_PROP, None) + else: + self.properties[DIM_REF_SYS_PROP] = v + + class TemporalDimension(Dimension): @property def extent(self) -> list[str | None] | None: @@ -636,6 +705,8 @@ class DatacubeExtensionHooks(ExtensionHooks): prev_extension_ids = { "datacube", "https://stac-extensions.github.io/datacube/v1.0.0/schema.json", + "https://stac-extensions.github.io/datacube/v2.0.0/schema.json", + "https://stac-extensions.github.io/datacube/v2.1.0/schema.json", } stac_object_types = { pystac.STACObjectType.COLLECTION, diff --git a/tests/data-files/datacube/item.json b/tests/data-files/datacube/item.json index 194b1a70a..cdedc5272 100644 --- a/tests/data-files/datacube/item.json +++ b/tests/data-files/datacube/item.json @@ -1,7 +1,7 @@ { "stac_version": "1.0.0", "stac_extensions": [ - "https://stac-extensions.github.io/datacube/v2.0.0/schema.json" + "https://stac-extensions.github.io/datacube/v2.2.0/schema.json" ], "id": "datacube-123", "type": "Feature", @@ -100,15 +100,15 @@ }, "cube:variables": { "temp": { - "dimensions": [ - "time", - "y", - "x", - "pressure_levels" - ], - "type": "data" + "dimensions": [ + "time", + "y", + "x", + "pressure_levels" + ], + "type": "data" } - } + } }, "assets": { "data": { diff --git a/tests/extensions/cassettes/test_datacube/test_set_dimensions.yaml b/tests/extensions/cassettes/test_datacube/test_set_dimensions.yaml index 4cac8415a..5859d0575 100644 --- a/tests/extensions/cassettes/test_datacube/test_set_dimensions.yaml +++ b/tests/extensions/cassettes/test_datacube/test_set_dimensions.yaml @@ -9,57 +9,59 @@ interactions: User-Agent: - Python-urllib/3.11 method: GET - uri: https://stac-extensions.github.io/datacube/v2.0.0/schema.json + uri: https://stac-extensions.github.io/datacube/v2.2.0/schema.json response: body: string: "{\n \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n \"$id\": - \"https://stac-extensions.github.io/datacube/v2.0.0/schema.json\",\n \"title\": - \"Datacube Extension\",\n \"description\": \"Datacube Extension for STAC - Items and STAC Collections.\",\n \"oneOf\": [\n {\n \"$comment\": - \"This is the schema for STAC Items. Remove this object if this extension - only applies to Collections.\",\n \"allOf\": [\n {\n \"$ref\": - \"#/definitions/stac_extensions\"\n },\n {\n \"type\": - \"object\",\n \"required\": [\n \"type\",\n \"properties\",\n - \ \"assets\"\n ],\n \"properties\": {\n \"type\": - {\n \"const\": \"Feature\"\n },\n \"properties\": - {\n \"allOf\": [\n {\n \"$comment\": - \"Require fields here for Item Properties.\",\n \"required\": - [\n \"cube:dimensions\"\n ]\n },\n - \ {\n \"$ref\": \"#/definitions/fields\"\n - \ }\n ]\n },\n \"assets\": - {\n \"$comment\": \"This validates the fields in Item Assets, - but does not require them.\",\n \"type\": \"object\",\n \"additionalProperties\": - {\n \"$ref\": \"#/definitions/fields\"\n }\n }\n - \ }\n }\n ]\n },\n {\n \"$comment\": \"This - is the schema for STAC Collections.\",\n \"type\": \"object\",\n \"allOf\": - [\n {\n \"required\": [\n \"type\"\n ],\n + \"https://stac-extensions.github.io/datacube/v2.2.0/schema.json\",\n \"title\": + \"Datacube Extension\",\n \"description\": \"STAC Datacube Extension for + STAC Items and STAC Collections.\",\n \"oneOf\": [\n {\n \"$comment\": + \"This is the schema for STAC Items.\",\n \"allOf\": [\n {\n \"type\": + \"object\",\n \"required\": [\n \"type\"\n ],\n \ \"properties\": {\n \"type\": {\n \"const\": - \"Collection\"\n }\n }\n },\n {\n \"$ref\": + \"Feature\"\n }\n }\n },\n {\n \"$ref\": \"#/definitions/stac_extensions\"\n }\n ],\n \"anyOf\": [\n - \ {\n \"$comment\": \"This is the schema for the top-level - fields in a Collection. Remove this if this extension does not define top-level - fields for Collections.\",\n \"allOf\": [\n {\n \"$comment\": - \"Require fields here for Collections (top-level).\",\n \"required\": - [\n \"cube:dimensions\"\n ]\n },\n - \ {\n \"$ref\": \"#/definitions/fields\"\n }\n - \ ]\n },\n {\n \"$comment\": \"This validates - the fields in Collection Assets, but does not require them.\",\n \"required\": - [\n \"assets\"\n ],\n \"properties\": {\n \"assets\": - {\n \"type\": \"object\",\n \"not\": {\n \"additionalProperties\": + \ {\n \"type\": \"object\",\n \"required\": [\n \"properties\"\n + \ ],\n \"properties\": {\n \"properties\": {\n + \ \"allOf\": [\n {\n \"$ref\": + \"#/definitions/require_field\"\n },\n {\n \"$ref\": + \"#/definitions/fields\"\n }\n ]\n }\n + \ }\n },\n {\n \"$comment\": \"This validates + the fields in Item Assets.\",\n \"required\": [\n \"assets\"\n + \ ],\n \"properties\": {\n \"assets\": {\n \"type\": + \"object\",\n \"not\": {\n \"additionalProperties\": {\n \"not\": {\n \"allOf\": [\n {\n - \ \"$ref\": \"#/definitions/require_any_field\"\n },\n + \ \"$ref\": \"#/definitions/require_field\"\n },\n \ {\n \"$ref\": \"#/definitions/fields\"\n \ }\n ]\n }\n }\n - \ }\n }\n }\n },\n {\n \"$comment\": - \"This is the schema for the fields in Item Asset Definitions. It doesn't - require any fields.\",\n \"required\": [\n \"item_assets\"\n - \ ],\n \"properties\": {\n \"item_assets\": {\n - \ \"type\": \"object\",\n \"not\": {\n \"additionalProperties\": + \ }\n }\n }\n }\n ]\n },\n + \ {\n \"$comment\": \"This is the schema for STAC Collections.\",\n + \ \"type\": \"object\",\n \"allOf\": [\n {\n \"required\": + [\n \"type\"\n ],\n \"properties\": {\n \"type\": + {\n \"const\": \"Collection\"\n }\n }\n },\n + \ {\n \"$ref\": \"#/definitions/stac_extensions\"\n }\n + \ ],\n \"anyOf\": [\n {\n \"$comment\": \"This is + the schema for the top-level fields in a Collection.\",\n \"allOf\": + [\n {\n \"$ref\": \"#/definitions/require_field\"\n + \ },\n {\n \"$ref\": \"#/definitions/fields\"\n + \ }\n ]\n },\n {\n \"$comment\": + \"This validates the fields in Collection Assets.\",\n \"required\": + [\n \"assets\"\n ],\n \"properties\": {\n \"assets\": + {\n \"type\": \"object\",\n \"not\": {\n \"additionalProperties\": {\n \"not\": {\n \"allOf\": [\n {\n - \ \"$ref\": \"#/definitions/require_any_field\"\n },\n + \ \"$ref\": \"#/definitions/require_field\"\n },\n \ {\n \"$ref\": \"#/definitions/fields\"\n \ }\n ]\n }\n }\n \ }\n }\n }\n },\n {\n \"$comment\": + \"This is the schema for the fields in Item Asset Definitions.\",\n \"required\": + [\n \"item_assets\"\n ],\n \"properties\": {\n + \ \"item_assets\": {\n \"type\": \"object\",\n \"not\": + {\n \"additionalProperties\": {\n \"not\": + {\n \"allOf\": [\n {\n \"$ref\": + \"#/definitions/require_any_field\"\n },\n {\n + \ \"$ref\": \"#/definitions/fields\"\n }\n + \ ]\n }\n }\n }\n + \ }\n }\n },\n {\n \"$comment\": \"This is the schema for the fields in Summaries. By default, only checks the existance of the properties, but not the schema of the summaries.\",\n \ \"required\": [\n \"summaries\"\n ],\n \"properties\": @@ -68,22 +70,24 @@ interactions: {\n \"stac_extensions\": {\n \"type\": \"object\",\n \"required\": [\n \"stac_extensions\"\n ],\n \"properties\": {\n \"stac_extensions\": {\n \"type\": \"array\",\n \"contains\": {\n \"const\": - \"https://stac-extensions.github.io/datacube/v2.0.0/schema.json\"\n }\n + \"https://stac-extensions.github.io/datacube/v2.2.0/schema.json\"\n }\n \ }\n }\n },\n \"require_any_field\": {\n \"$comment\": \"Please list all fields here so that we can force the existance of one of them in other parts of the schemas.\",\n \"anyOf\": [\n {\"required\": [\"cube:dimensions\"]},\n {\"required\": [\"cube:variables\"]}\n ]\n - \ },\n \"fields\": {\n \"$comment\": \"Add your new fields here. - Don't require them here, do that above in the corresponding schema.\",\n \"type\": - \"object\",\n \"properties\": {\n \"cube:dimensions\": {\n \"$ref\": - \"#/definitions/cube:dimensions\"\n },\n \"cube:variables\": + \ },\n \"require_field\": {\n \"required\": [\n \"cube:dimensions\"\n + \ ]\n },\n \"fields\": {\n \"$comment\": \"Add your new fields + here. Don't require them here, do that above in the corresponding schema.\",\n + \ \"type\": \"object\",\n \"properties\": {\n \"cube:dimensions\": + {\n \"$ref\": \"#/definitions/cube:dimensions\"\n },\n \"cube:variables\": {\n \"$ref\": \"#/definitions/cube:variables\"\n }\n },\n \ \"patternProperties\": {\n \"^(?!cube:)\": {}\n },\n \"additionalProperties\": false\n },\n \"cube:dimensions\": {\n \"type\": \"object\",\n \"additionalProperties\": - {\n \"anyOf\": [\n {\n \"$ref\": \"#/definitions/additional_dimension\"\n + {\n \"anyOf\": [\n {\n \"$ref\": \"#/definitions/vector_dimension\"\n \ },\n {\n \"$ref\": \"#/definitions/horizontal_spatial_dimension\"\n \ },\n {\n \"$ref\": \"#/definitions/vertical_spatial_dimension\"\n \ },\n {\n \"$ref\": \"#/definitions/temporal_dimension\"\n + \ },\n {\n \"$ref\": \"#/definitions/additional_dimension\"\n \ }\n ]\n }\n },\n \"cube:variables\": {\n \"type\": \"object\",\n \"additionalProperties\": {\n \"$ref\": \"#/definitions/variable\"\n \ }\n },\n \"additional_dimension\": {\n \"title\": \"Additional @@ -92,29 +96,29 @@ interactions: \ ]\n },\n {\n \"required\": [\n \"type\",\n \ \"values\"\n ]\n }\n ],\n \"not\": {\n \ \"required\": [\n \"axis\"\n ]\n },\n \"properties\": - {\n \"type\": {\n \"allOf\": [\n {\n \"type\": - \"string\"\n },\n {\n \"not\": {\n \"type\": - \"string\",\n \"const\": \"spatial\"\n }\n }\n - \ ]\n },\n \"description\": {\n \"$ref\": \"#/definitions/description\"\n - \ },\n \"extent\": {\n \"$ref\": \"#/definitions/extent_open\"\n - \ },\n \"values\": {\n \"$ref\": \"#/definitions/values\"\n - \ },\n \"step\": {\n \"$ref\": \"#/definitions/step\"\n - \ },\n \"unit\": {\n \"$ref\": \"#/definitions/unit\"\n - \ },\n \"reference_system\": {\n \"type\": \"string\"\n - \ },\n \"dimensions\": {\n \"type\": \"array\",\n \"items\": - {\n \"type\": [\n \"string\"\n ]\n }\n - \ }\n }\n },\n \"horizontal_spatial_dimension\": {\n \"title\": - \"Horizontal Spatial Dimension Object\",\n \"type\": \"object\",\n \"required\": - [\n \"type\",\n \"axis\",\n \"extent\"\n ],\n \"properties\": - {\n \"type\": {\n \"$ref\": \"#/definitions/type_spatial\"\n - \ },\n \"axis\": {\n \"$ref\": \"#/definitions/axis_xy\"\n - \ },\n \"description\": {\n \"$ref\": \"#/definitions/description\"\n - \ },\n \"extent\": {\n \"$ref\": \"#/definitions/extent_closed\"\n - \ },\n \"values\": {\n \"$ref\": \"#/definitions/values_numeric\"\n - \ },\n \"step\": {\n \"$ref\": \"#/definitions/step\"\n - \ },\n \"reference_system\": {\n \"$ref\": \"#/definitions/reference_system_spatial\"\n - \ }\n }\n },\n \"vertical_spatial_dimension\": {\n \"title\": - \"Vertical Spatial Dimension Object\",\n \"type\": \"object\",\n \"anyOf\": + {\n \"type\": {\n \"type\": \"string\",\n \"not\": + {\n \"enum\": [\n \"spatial\",\n \"geometry\"\n + \ ]\n }\n },\n \"description\": {\n \"$ref\": + \"#/definitions/description\"\n },\n \"extent\": {\n \"$ref\": + \"#/definitions/extent_open\"\n },\n \"values\": {\n \"$ref\": + \"#/definitions/values\"\n },\n \"step\": {\n \"$ref\": + \"#/definitions/step\"\n },\n \"unit\": {\n \"$ref\": + \"#/definitions/unit\"\n },\n \"reference_system\": {\n \"type\": + \"string\"\n },\n \"dimensions\": {\n \"type\": \"array\",\n + \ \"items\": {\n \"type\": [\n \"string\"\n + \ ]\n }\n }\n }\n },\n \"horizontal_spatial_dimension\": + {\n \"title\": \"Horizontal Spatial Raster Dimension Object\",\n \"type\": + \"object\",\n \"required\": [\n \"type\",\n \"axis\",\n + \ \"extent\"\n ],\n \"properties\": {\n \"type\": {\n + \ \"$ref\": \"#/definitions/type_spatial\"\n },\n \"axis\": + {\n \"$ref\": \"#/definitions/axis_xy\"\n },\n \"description\": + {\n \"$ref\": \"#/definitions/description\"\n },\n \"extent\": + {\n \"$ref\": \"#/definitions/extent_closed\"\n },\n \"values\": + {\n \"$ref\": \"#/definitions/values_numeric\"\n },\n \"step\": + {\n \"$ref\": \"#/definitions/step\"\n },\n \"reference_system\": + {\n \"$ref\": \"#/definitions/reference_system_spatial\"\n }\n + \ }\n },\n \"vertical_spatial_dimension\": {\n \"title\": \"Vertical + Spatial Dimension Object\",\n \"type\": \"object\",\n \"anyOf\": [\n {\n \"required\": [\n \"type\",\n \"axis\",\n \ \"extent\"\n ]\n },\n {\n \"required\": [\n \"type\",\n \"axis\",\n \"values\"\n @@ -127,36 +131,57 @@ interactions: {\n \"$ref\": \"#/definitions/step\"\n },\n \"unit\": {\n \"$ref\": \"#/definitions/unit\"\n },\n \"reference_system\": {\n \"$ref\": \"#/definitions/reference_system_spatial\"\n }\n - \ }\n },\n \"temporal_dimension\": {\n \"title\": \"Temporal + \ }\n },\n \"vector_dimension\": {\n \"title\": \"Spatial Vector Dimension Object\",\n \"type\": \"object\",\n \"required\": [\n - \ \"type\",\n \"extent\"\n ],\n \"not\": {\n \"required\": - [\n \"axis\"\n ]\n },\n \"properties\": {\n \"type\": - {\n \"type\": \"string\",\n \"const\": \"temporal\"\n },\n - \ \"description\": {\n \"$ref\": \"#/definitions/description\"\n - \ },\n \"values\": {\n \"type\": \"array\",\n \"minItems\": - 1,\n \"items\": {\n \"type\": \"string\"\n }\n - \ },\n \"extent\": {\n \"type\": \"array\",\n \"minItems\": + \ \"type\",\n \"bbox\"\n ],\n \"properties\": {\n \"type\": + {\n \"type\": \"string\",\n \"const\": \"geometry\"\n },\n + \ \"axes\": {\n \"type\": \"array\",\n \"uniqueItems\": + true,\n \"items\": {\n \"type\": \"string\",\n \"enum\": + [\n \"x\",\n \"y\",\n \"z\"\n ]\n + \ }\n },\n \"description\": {\n \"$ref\": \"#/definitions/description\"\n + \ },\n \"bbox\": {\n \"title\": \"Spatial extent\",\n + \ \"type\": \"array\",\n \"oneOf\": [\n {\n \"minItems\":4,\n + \ \"maxItems\":4\n },\n {\n \"minItems\":6,\n + \ \"maxItems\":6\n }\n ],\n \"items\": + {\n \"type\": \"number\"\n }\n },\n \"values\": + {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": + {\n \"description\": \"WKT or Identifier\",\n \"type\": + \"string\"\n }\n },\n \"geometry_types\": {\n \"type\": + \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": + \"string\",\n \"enum\": [\n \"Point\",\n \"MultiPoint\",\n + \ \"LineString\",\n \"MultiLineString\",\n \"Polygon\",\n + \ \"MultiPolygon\",\n \"GeometryCollection\"\n ]\n + \ }\n },\n \"reference_system\": {\n \"$ref\": + \"#/definitions/reference_system_spatial\"\n }\n }\n },\n \"temporal_dimension\": + {\n \"title\": \"Temporal Dimension Object\",\n \"type\": \"object\",\n + \ \"required\": [\n \"type\",\n \"extent\"\n ],\n \"not\": + {\n \"required\": [\n \"axis\"\n ]\n },\n \"properties\": + {\n \"type\": {\n \"type\": \"string\",\n \"const\": + \"temporal\"\n },\n \"description\": {\n \"$ref\": + \"#/definitions/description\"\n },\n \"values\": {\n \"type\": + \"array\",\n \"minItems\": 1,\n \"items\": {\n \"type\": + \"string\"\n }\n },\n \"extent\": {\n \"type\": + \"array\",\n \"minItems\": 2,\n \"maxItems\": 2,\n \"items\": + {\n \"type\": [\n \"string\",\n \"null\"\n + \ ]\n }\n },\n \"step\": {\n \"type\": + [\n \"string\",\n \"null\"\n ]\n }\n + \ }\n },\n \"variable\": {\n \"title\": \"Variable Object\",\n + \ \"type\": \"object\",\n \"required\": [\n \"dimensions\"\n + \ ],\n \"properties\": {\n \"variable_type\": {\n \"type\": + \"string\",\n \"enum\": [\n \"data\",\n \"auxiliary\"\n + \ ]\n },\n \"description\": {\n \"$ref\": \"#/definitions/description\"\n + \ },\n \"dimensions\": {\n \"type\": \"array\",\n \"items\": + {\n \"type\": \"string\"\n }\n },\n \"values\": + {\n \"type\": \"array\",\n \"minItems\": 1\n },\n + \ \"extent\": {\n \"type\": \"array\",\n \"minItems\": 2,\n \"maxItems\": 2,\n \"items\": {\n \"type\": - [\n \"string\",\n \"null\"\n ]\n }\n - \ },\n \"step\": {\n \"type\": [\n \"string\",\n - \ \"null\"\n ]\n }\n }\n },\n \"variable\": - {\n \"title\": \"Variable Object\",\n \"type\": \"object\",\n \"required\": - [\n \"dimensions\"\n ],\n \"properties\": {\n \"variable_type\": - {\n \"type\": \"string\",\n \"enum\": [\n \"data\",\n - \ \"auxiliary\"\n ]\n },\n \"description\": - {\n \"$ref\": \"#/definitions/description\"\n },\n \"dimensions\": - {\n \"type\": \"array\",\n \"items\": {\n \"type\": - \"string\"\n }\n },\n \"values\": {\n \"type\": - \"array\",\n \"minItems\": 1\n },\n \"extent\": {\n - \ \"type\": \"array\",\n \"minItems\": 2,\n \"maxItems\": - 2,\n \"items\": {\n \"type\": [\n \"string\",\n - \ \"number\",\n \"null\"\n ]\n }\n - \ },\n \"unit\": {\n \"$ref\": \"#/definitions/unit\"\n - \ }\n }\n },\n \"type_spatial\": {\n \"type\": \"string\",\n - \ \"const\": \"spatial\"\n },\n \"axis_xy\": {\n \"type\": - \"string\",\n \"enum\": [\n \"x\",\n \"y\"\n ]\n },\n - \ \"axis_z\": {\n \"type\": \"string\",\n \"const\": \"z\"\n },\n - \ \"extent_closed\": {\n \"type\": \"array\",\n \"minItems\": + [\n \"string\",\n \"number\",\n \"null\"\n + \ ]\n }\n },\n \"unit\": {\n \"$ref\": + \"#/definitions/unit\"\n }\n }\n },\n \"type_spatial\": + {\n \"type\": \"string\",\n \"const\": \"spatial\"\n },\n \"axis_xy\": + {\n \"type\": \"string\",\n \"enum\": [\n \"x\",\n \"y\"\n + \ ]\n },\n \"axis_z\": {\n \"type\": \"string\",\n \"const\": + \"z\"\n },\n \"extent_closed\": {\n \"type\": \"array\",\n \"minItems\": 2,\n \"maxItems\": 2,\n \"items\": {\n \"type\": \"number\"\n \ }\n },\n \"extent_open\": {\n \"type\": \"array\",\n \"minItems\": 2,\n \"maxItems\": 2,\n \"items\": {\n \"type\": [\n \"number\",\n @@ -168,28 +193,31 @@ interactions: \"string\"\n }\n ]\n }\n },\n \"step\": {\n \"type\": [\n \"number\",\n \"null\"\n ]\n },\n \"unit\": {\n \ \"type\": \"string\"\n },\n \"reference_system_spatial\": {\n - \ \"type\": [\n \"string\",\n \"number\",\n \"object\"\n - \ ],\n \"default\": 4326\n },\n \"description\": {\n \"type\": - \"string\"\n }\n }\n}" + \ \"oneOf\": [\n {\n \"description\": \"WKT2\",\n \"type\": + \"string\"\n },\n {\n \"description\": \"EPSG code\",\n + \ \"type\": \"integer\",\n \"minimum\": 0\n },\n {\n + \ \"$ref\": \"https://proj.org/schemas/v0.4/projjson.schema.json\"\n + \ }\n ],\n \"default\": 4326\n },\n \"description\": + {\n \"type\": \"string\"\n }\n }\n}\n" headers: Accept-Ranges: - bytes Access-Control-Allow-Origin: - '*' Age: - - '502' + - '2' Cache-Control: - max-age=600 Connection: - close Content-Length: - - '11920' + - '13997' Content-Type: - application/json; charset=utf-8 Date: - - Wed, 27 Sep 2023 21:20:29 GMT + - Wed, 18 Oct 2023 22:03:20 GMT ETag: - - '"64527b1d-2e90"' + - '"64527b1d-36ad"' Last-Modified: - Wed, 03 May 2023 15:17:49 GMT Server: @@ -205,15 +233,15 @@ interactions: X-Cache-Hits: - '1' X-Fastly-Request-ID: - - 3494b41852149cd5a45b4dece775f61c6c800982 + - 19fc8f125fccc12d1bf7c7d39b26fcd06efe4321 X-GitHub-Request-Id: - - AAC6:3224:2D88AB:3D9637:65149AA7 + - F256:2098:FF3D8:146C4D:65305625 X-Served-By: - - cache-lga21983-LGA + - cache-den8225-DEN X-Timer: - - S1695849630.549557,VS0,VE2 + - S1697666600.411233,VS0,VE2 expires: - - Wed, 27 Sep 2023 21:22:07 GMT + - Wed, 18 Oct 2023 22:13:18 GMT permissions-policy: - interest-cohort=() x-proxy-cache: diff --git a/tests/extensions/cassettes/test_datacube/test_set_variables.yaml b/tests/extensions/cassettes/test_datacube/test_set_variables.yaml index c5e8883bb..0cc187143 100644 --- a/tests/extensions/cassettes/test_datacube/test_set_variables.yaml +++ b/tests/extensions/cassettes/test_datacube/test_set_variables.yaml @@ -9,57 +9,59 @@ interactions: User-Agent: - Python-urllib/3.11 method: GET - uri: https://stac-extensions.github.io/datacube/v2.0.0/schema.json + uri: https://stac-extensions.github.io/datacube/v2.2.0/schema.json response: body: string: "{\n \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n \"$id\": - \"https://stac-extensions.github.io/datacube/v2.0.0/schema.json\",\n \"title\": - \"Datacube Extension\",\n \"description\": \"Datacube Extension for STAC - Items and STAC Collections.\",\n \"oneOf\": [\n {\n \"$comment\": - \"This is the schema for STAC Items. Remove this object if this extension - only applies to Collections.\",\n \"allOf\": [\n {\n \"$ref\": - \"#/definitions/stac_extensions\"\n },\n {\n \"type\": - \"object\",\n \"required\": [\n \"type\",\n \"properties\",\n - \ \"assets\"\n ],\n \"properties\": {\n \"type\": - {\n \"const\": \"Feature\"\n },\n \"properties\": - {\n \"allOf\": [\n {\n \"$comment\": - \"Require fields here for Item Properties.\",\n \"required\": - [\n \"cube:dimensions\"\n ]\n },\n - \ {\n \"$ref\": \"#/definitions/fields\"\n - \ }\n ]\n },\n \"assets\": - {\n \"$comment\": \"This validates the fields in Item Assets, - but does not require them.\",\n \"type\": \"object\",\n \"additionalProperties\": - {\n \"$ref\": \"#/definitions/fields\"\n }\n }\n - \ }\n }\n ]\n },\n {\n \"$comment\": \"This - is the schema for STAC Collections.\",\n \"type\": \"object\",\n \"allOf\": - [\n {\n \"required\": [\n \"type\"\n ],\n + \"https://stac-extensions.github.io/datacube/v2.2.0/schema.json\",\n \"title\": + \"Datacube Extension\",\n \"description\": \"STAC Datacube Extension for + STAC Items and STAC Collections.\",\n \"oneOf\": [\n {\n \"$comment\": + \"This is the schema for STAC Items.\",\n \"allOf\": [\n {\n \"type\": + \"object\",\n \"required\": [\n \"type\"\n ],\n \ \"properties\": {\n \"type\": {\n \"const\": - \"Collection\"\n }\n }\n },\n {\n \"$ref\": + \"Feature\"\n }\n }\n },\n {\n \"$ref\": \"#/definitions/stac_extensions\"\n }\n ],\n \"anyOf\": [\n - \ {\n \"$comment\": \"This is the schema for the top-level - fields in a Collection. Remove this if this extension does not define top-level - fields for Collections.\",\n \"allOf\": [\n {\n \"$comment\": - \"Require fields here for Collections (top-level).\",\n \"required\": - [\n \"cube:dimensions\"\n ]\n },\n - \ {\n \"$ref\": \"#/definitions/fields\"\n }\n - \ ]\n },\n {\n \"$comment\": \"This validates - the fields in Collection Assets, but does not require them.\",\n \"required\": - [\n \"assets\"\n ],\n \"properties\": {\n \"assets\": - {\n \"type\": \"object\",\n \"not\": {\n \"additionalProperties\": + \ {\n \"type\": \"object\",\n \"required\": [\n \"properties\"\n + \ ],\n \"properties\": {\n \"properties\": {\n + \ \"allOf\": [\n {\n \"$ref\": + \"#/definitions/require_field\"\n },\n {\n \"$ref\": + \"#/definitions/fields\"\n }\n ]\n }\n + \ }\n },\n {\n \"$comment\": \"This validates + the fields in Item Assets.\",\n \"required\": [\n \"assets\"\n + \ ],\n \"properties\": {\n \"assets\": {\n \"type\": + \"object\",\n \"not\": {\n \"additionalProperties\": {\n \"not\": {\n \"allOf\": [\n {\n - \ \"$ref\": \"#/definitions/require_any_field\"\n },\n + \ \"$ref\": \"#/definitions/require_field\"\n },\n \ {\n \"$ref\": \"#/definitions/fields\"\n \ }\n ]\n }\n }\n - \ }\n }\n }\n },\n {\n \"$comment\": - \"This is the schema for the fields in Item Asset Definitions. It doesn't - require any fields.\",\n \"required\": [\n \"item_assets\"\n - \ ],\n \"properties\": {\n \"item_assets\": {\n - \ \"type\": \"object\",\n \"not\": {\n \"additionalProperties\": + \ }\n }\n }\n }\n ]\n },\n + \ {\n \"$comment\": \"This is the schema for STAC Collections.\",\n + \ \"type\": \"object\",\n \"allOf\": [\n {\n \"required\": + [\n \"type\"\n ],\n \"properties\": {\n \"type\": + {\n \"const\": \"Collection\"\n }\n }\n },\n + \ {\n \"$ref\": \"#/definitions/stac_extensions\"\n }\n + \ ],\n \"anyOf\": [\n {\n \"$comment\": \"This is + the schema for the top-level fields in a Collection.\",\n \"allOf\": + [\n {\n \"$ref\": \"#/definitions/require_field\"\n + \ },\n {\n \"$ref\": \"#/definitions/fields\"\n + \ }\n ]\n },\n {\n \"$comment\": + \"This validates the fields in Collection Assets.\",\n \"required\": + [\n \"assets\"\n ],\n \"properties\": {\n \"assets\": + {\n \"type\": \"object\",\n \"not\": {\n \"additionalProperties\": {\n \"not\": {\n \"allOf\": [\n {\n - \ \"$ref\": \"#/definitions/require_any_field\"\n },\n + \ \"$ref\": \"#/definitions/require_field\"\n },\n \ {\n \"$ref\": \"#/definitions/fields\"\n \ }\n ]\n }\n }\n \ }\n }\n }\n },\n {\n \"$comment\": + \"This is the schema for the fields in Item Asset Definitions.\",\n \"required\": + [\n \"item_assets\"\n ],\n \"properties\": {\n + \ \"item_assets\": {\n \"type\": \"object\",\n \"not\": + {\n \"additionalProperties\": {\n \"not\": + {\n \"allOf\": [\n {\n \"$ref\": + \"#/definitions/require_any_field\"\n },\n {\n + \ \"$ref\": \"#/definitions/fields\"\n }\n + \ ]\n }\n }\n }\n + \ }\n }\n },\n {\n \"$comment\": \"This is the schema for the fields in Summaries. By default, only checks the existance of the properties, but not the schema of the summaries.\",\n \ \"required\": [\n \"summaries\"\n ],\n \"properties\": @@ -68,22 +70,24 @@ interactions: {\n \"stac_extensions\": {\n \"type\": \"object\",\n \"required\": [\n \"stac_extensions\"\n ],\n \"properties\": {\n \"stac_extensions\": {\n \"type\": \"array\",\n \"contains\": {\n \"const\": - \"https://stac-extensions.github.io/datacube/v2.0.0/schema.json\"\n }\n + \"https://stac-extensions.github.io/datacube/v2.2.0/schema.json\"\n }\n \ }\n }\n },\n \"require_any_field\": {\n \"$comment\": \"Please list all fields here so that we can force the existance of one of them in other parts of the schemas.\",\n \"anyOf\": [\n {\"required\": [\"cube:dimensions\"]},\n {\"required\": [\"cube:variables\"]}\n ]\n - \ },\n \"fields\": {\n \"$comment\": \"Add your new fields here. - Don't require them here, do that above in the corresponding schema.\",\n \"type\": - \"object\",\n \"properties\": {\n \"cube:dimensions\": {\n \"$ref\": - \"#/definitions/cube:dimensions\"\n },\n \"cube:variables\": + \ },\n \"require_field\": {\n \"required\": [\n \"cube:dimensions\"\n + \ ]\n },\n \"fields\": {\n \"$comment\": \"Add your new fields + here. Don't require them here, do that above in the corresponding schema.\",\n + \ \"type\": \"object\",\n \"properties\": {\n \"cube:dimensions\": + {\n \"$ref\": \"#/definitions/cube:dimensions\"\n },\n \"cube:variables\": {\n \"$ref\": \"#/definitions/cube:variables\"\n }\n },\n \ \"patternProperties\": {\n \"^(?!cube:)\": {}\n },\n \"additionalProperties\": false\n },\n \"cube:dimensions\": {\n \"type\": \"object\",\n \"additionalProperties\": - {\n \"anyOf\": [\n {\n \"$ref\": \"#/definitions/additional_dimension\"\n + {\n \"anyOf\": [\n {\n \"$ref\": \"#/definitions/vector_dimension\"\n \ },\n {\n \"$ref\": \"#/definitions/horizontal_spatial_dimension\"\n \ },\n {\n \"$ref\": \"#/definitions/vertical_spatial_dimension\"\n \ },\n {\n \"$ref\": \"#/definitions/temporal_dimension\"\n + \ },\n {\n \"$ref\": \"#/definitions/additional_dimension\"\n \ }\n ]\n }\n },\n \"cube:variables\": {\n \"type\": \"object\",\n \"additionalProperties\": {\n \"$ref\": \"#/definitions/variable\"\n \ }\n },\n \"additional_dimension\": {\n \"title\": \"Additional @@ -92,29 +96,29 @@ interactions: \ ]\n },\n {\n \"required\": [\n \"type\",\n \ \"values\"\n ]\n }\n ],\n \"not\": {\n \ \"required\": [\n \"axis\"\n ]\n },\n \"properties\": - {\n \"type\": {\n \"allOf\": [\n {\n \"type\": - \"string\"\n },\n {\n \"not\": {\n \"type\": - \"string\",\n \"const\": \"spatial\"\n }\n }\n - \ ]\n },\n \"description\": {\n \"$ref\": \"#/definitions/description\"\n - \ },\n \"extent\": {\n \"$ref\": \"#/definitions/extent_open\"\n - \ },\n \"values\": {\n \"$ref\": \"#/definitions/values\"\n - \ },\n \"step\": {\n \"$ref\": \"#/definitions/step\"\n - \ },\n \"unit\": {\n \"$ref\": \"#/definitions/unit\"\n - \ },\n \"reference_system\": {\n \"type\": \"string\"\n - \ },\n \"dimensions\": {\n \"type\": \"array\",\n \"items\": - {\n \"type\": [\n \"string\"\n ]\n }\n - \ }\n }\n },\n \"horizontal_spatial_dimension\": {\n \"title\": - \"Horizontal Spatial Dimension Object\",\n \"type\": \"object\",\n \"required\": - [\n \"type\",\n \"axis\",\n \"extent\"\n ],\n \"properties\": - {\n \"type\": {\n \"$ref\": \"#/definitions/type_spatial\"\n - \ },\n \"axis\": {\n \"$ref\": \"#/definitions/axis_xy\"\n - \ },\n \"description\": {\n \"$ref\": \"#/definitions/description\"\n - \ },\n \"extent\": {\n \"$ref\": \"#/definitions/extent_closed\"\n - \ },\n \"values\": {\n \"$ref\": \"#/definitions/values_numeric\"\n - \ },\n \"step\": {\n \"$ref\": \"#/definitions/step\"\n - \ },\n \"reference_system\": {\n \"$ref\": \"#/definitions/reference_system_spatial\"\n - \ }\n }\n },\n \"vertical_spatial_dimension\": {\n \"title\": - \"Vertical Spatial Dimension Object\",\n \"type\": \"object\",\n \"anyOf\": + {\n \"type\": {\n \"type\": \"string\",\n \"not\": + {\n \"enum\": [\n \"spatial\",\n \"geometry\"\n + \ ]\n }\n },\n \"description\": {\n \"$ref\": + \"#/definitions/description\"\n },\n \"extent\": {\n \"$ref\": + \"#/definitions/extent_open\"\n },\n \"values\": {\n \"$ref\": + \"#/definitions/values\"\n },\n \"step\": {\n \"$ref\": + \"#/definitions/step\"\n },\n \"unit\": {\n \"$ref\": + \"#/definitions/unit\"\n },\n \"reference_system\": {\n \"type\": + \"string\"\n },\n \"dimensions\": {\n \"type\": \"array\",\n + \ \"items\": {\n \"type\": [\n \"string\"\n + \ ]\n }\n }\n }\n },\n \"horizontal_spatial_dimension\": + {\n \"title\": \"Horizontal Spatial Raster Dimension Object\",\n \"type\": + \"object\",\n \"required\": [\n \"type\",\n \"axis\",\n + \ \"extent\"\n ],\n \"properties\": {\n \"type\": {\n + \ \"$ref\": \"#/definitions/type_spatial\"\n },\n \"axis\": + {\n \"$ref\": \"#/definitions/axis_xy\"\n },\n \"description\": + {\n \"$ref\": \"#/definitions/description\"\n },\n \"extent\": + {\n \"$ref\": \"#/definitions/extent_closed\"\n },\n \"values\": + {\n \"$ref\": \"#/definitions/values_numeric\"\n },\n \"step\": + {\n \"$ref\": \"#/definitions/step\"\n },\n \"reference_system\": + {\n \"$ref\": \"#/definitions/reference_system_spatial\"\n }\n + \ }\n },\n \"vertical_spatial_dimension\": {\n \"title\": \"Vertical + Spatial Dimension Object\",\n \"type\": \"object\",\n \"anyOf\": [\n {\n \"required\": [\n \"type\",\n \"axis\",\n \ \"extent\"\n ]\n },\n {\n \"required\": [\n \"type\",\n \"axis\",\n \"values\"\n @@ -127,36 +131,57 @@ interactions: {\n \"$ref\": \"#/definitions/step\"\n },\n \"unit\": {\n \"$ref\": \"#/definitions/unit\"\n },\n \"reference_system\": {\n \"$ref\": \"#/definitions/reference_system_spatial\"\n }\n - \ }\n },\n \"temporal_dimension\": {\n \"title\": \"Temporal + \ }\n },\n \"vector_dimension\": {\n \"title\": \"Spatial Vector Dimension Object\",\n \"type\": \"object\",\n \"required\": [\n - \ \"type\",\n \"extent\"\n ],\n \"not\": {\n \"required\": - [\n \"axis\"\n ]\n },\n \"properties\": {\n \"type\": - {\n \"type\": \"string\",\n \"const\": \"temporal\"\n },\n - \ \"description\": {\n \"$ref\": \"#/definitions/description\"\n - \ },\n \"values\": {\n \"type\": \"array\",\n \"minItems\": - 1,\n \"items\": {\n \"type\": \"string\"\n }\n - \ },\n \"extent\": {\n \"type\": \"array\",\n \"minItems\": + \ \"type\",\n \"bbox\"\n ],\n \"properties\": {\n \"type\": + {\n \"type\": \"string\",\n \"const\": \"geometry\"\n },\n + \ \"axes\": {\n \"type\": \"array\",\n \"uniqueItems\": + true,\n \"items\": {\n \"type\": \"string\",\n \"enum\": + [\n \"x\",\n \"y\",\n \"z\"\n ]\n + \ }\n },\n \"description\": {\n \"$ref\": \"#/definitions/description\"\n + \ },\n \"bbox\": {\n \"title\": \"Spatial extent\",\n + \ \"type\": \"array\",\n \"oneOf\": [\n {\n \"minItems\":4,\n + \ \"maxItems\":4\n },\n {\n \"minItems\":6,\n + \ \"maxItems\":6\n }\n ],\n \"items\": + {\n \"type\": \"number\"\n }\n },\n \"values\": + {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": + {\n \"description\": \"WKT or Identifier\",\n \"type\": + \"string\"\n }\n },\n \"geometry_types\": {\n \"type\": + \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": + \"string\",\n \"enum\": [\n \"Point\",\n \"MultiPoint\",\n + \ \"LineString\",\n \"MultiLineString\",\n \"Polygon\",\n + \ \"MultiPolygon\",\n \"GeometryCollection\"\n ]\n + \ }\n },\n \"reference_system\": {\n \"$ref\": + \"#/definitions/reference_system_spatial\"\n }\n }\n },\n \"temporal_dimension\": + {\n \"title\": \"Temporal Dimension Object\",\n \"type\": \"object\",\n + \ \"required\": [\n \"type\",\n \"extent\"\n ],\n \"not\": + {\n \"required\": [\n \"axis\"\n ]\n },\n \"properties\": + {\n \"type\": {\n \"type\": \"string\",\n \"const\": + \"temporal\"\n },\n \"description\": {\n \"$ref\": + \"#/definitions/description\"\n },\n \"values\": {\n \"type\": + \"array\",\n \"minItems\": 1,\n \"items\": {\n \"type\": + \"string\"\n }\n },\n \"extent\": {\n \"type\": + \"array\",\n \"minItems\": 2,\n \"maxItems\": 2,\n \"items\": + {\n \"type\": [\n \"string\",\n \"null\"\n + \ ]\n }\n },\n \"step\": {\n \"type\": + [\n \"string\",\n \"null\"\n ]\n }\n + \ }\n },\n \"variable\": {\n \"title\": \"Variable Object\",\n + \ \"type\": \"object\",\n \"required\": [\n \"dimensions\"\n + \ ],\n \"properties\": {\n \"variable_type\": {\n \"type\": + \"string\",\n \"enum\": [\n \"data\",\n \"auxiliary\"\n + \ ]\n },\n \"description\": {\n \"$ref\": \"#/definitions/description\"\n + \ },\n \"dimensions\": {\n \"type\": \"array\",\n \"items\": + {\n \"type\": \"string\"\n }\n },\n \"values\": + {\n \"type\": \"array\",\n \"minItems\": 1\n },\n + \ \"extent\": {\n \"type\": \"array\",\n \"minItems\": 2,\n \"maxItems\": 2,\n \"items\": {\n \"type\": - [\n \"string\",\n \"null\"\n ]\n }\n - \ },\n \"step\": {\n \"type\": [\n \"string\",\n - \ \"null\"\n ]\n }\n }\n },\n \"variable\": - {\n \"title\": \"Variable Object\",\n \"type\": \"object\",\n \"required\": - [\n \"dimensions\"\n ],\n \"properties\": {\n \"variable_type\": - {\n \"type\": \"string\",\n \"enum\": [\n \"data\",\n - \ \"auxiliary\"\n ]\n },\n \"description\": - {\n \"$ref\": \"#/definitions/description\"\n },\n \"dimensions\": - {\n \"type\": \"array\",\n \"items\": {\n \"type\": - \"string\"\n }\n },\n \"values\": {\n \"type\": - \"array\",\n \"minItems\": 1\n },\n \"extent\": {\n - \ \"type\": \"array\",\n \"minItems\": 2,\n \"maxItems\": - 2,\n \"items\": {\n \"type\": [\n \"string\",\n - \ \"number\",\n \"null\"\n ]\n }\n - \ },\n \"unit\": {\n \"$ref\": \"#/definitions/unit\"\n - \ }\n }\n },\n \"type_spatial\": {\n \"type\": \"string\",\n - \ \"const\": \"spatial\"\n },\n \"axis_xy\": {\n \"type\": - \"string\",\n \"enum\": [\n \"x\",\n \"y\"\n ]\n },\n - \ \"axis_z\": {\n \"type\": \"string\",\n \"const\": \"z\"\n },\n - \ \"extent_closed\": {\n \"type\": \"array\",\n \"minItems\": + [\n \"string\",\n \"number\",\n \"null\"\n + \ ]\n }\n },\n \"unit\": {\n \"$ref\": + \"#/definitions/unit\"\n }\n }\n },\n \"type_spatial\": + {\n \"type\": \"string\",\n \"const\": \"spatial\"\n },\n \"axis_xy\": + {\n \"type\": \"string\",\n \"enum\": [\n \"x\",\n \"y\"\n + \ ]\n },\n \"axis_z\": {\n \"type\": \"string\",\n \"const\": + \"z\"\n },\n \"extent_closed\": {\n \"type\": \"array\",\n \"minItems\": 2,\n \"maxItems\": 2,\n \"items\": {\n \"type\": \"number\"\n \ }\n },\n \"extent_open\": {\n \"type\": \"array\",\n \"minItems\": 2,\n \"maxItems\": 2,\n \"items\": {\n \"type\": [\n \"number\",\n @@ -168,28 +193,31 @@ interactions: \"string\"\n }\n ]\n }\n },\n \"step\": {\n \"type\": [\n \"number\",\n \"null\"\n ]\n },\n \"unit\": {\n \ \"type\": \"string\"\n },\n \"reference_system_spatial\": {\n - \ \"type\": [\n \"string\",\n \"number\",\n \"object\"\n - \ ],\n \"default\": 4326\n },\n \"description\": {\n \"type\": - \"string\"\n }\n }\n}" + \ \"oneOf\": [\n {\n \"description\": \"WKT2\",\n \"type\": + \"string\"\n },\n {\n \"description\": \"EPSG code\",\n + \ \"type\": \"integer\",\n \"minimum\": 0\n },\n {\n + \ \"$ref\": \"https://proj.org/schemas/v0.4/projjson.schema.json\"\n + \ }\n ],\n \"default\": 4326\n },\n \"description\": + {\n \"type\": \"string\"\n }\n }\n}\n" headers: Accept-Ranges: - bytes Access-Control-Allow-Origin: - '*' Age: - - '502' + - '1' Cache-Control: - max-age=600 Connection: - close Content-Length: - - '11920' + - '13997' Content-Type: - application/json; charset=utf-8 Date: - - Wed, 27 Sep 2023 21:20:29 GMT + - Wed, 18 Oct 2023 22:03:19 GMT ETag: - - '"64527b1d-2e90"' + - '"64527b1d-36ad"' Last-Modified: - Wed, 03 May 2023 15:17:49 GMT Server: @@ -205,15 +233,15 @@ interactions: X-Cache-Hits: - '1' X-Fastly-Request-ID: - - 71f26459c55644735a4670270079a8b6697a853d + - 8aff0cdeb7252aee7023b0590fe79712eedacec4 X-GitHub-Request-Id: - - AAC6:3224:2D88AB:3D9637:65149AA7 + - F256:2098:FF3D8:146C4D:65305625 X-Served-By: - - cache-lga21932-LGA + - cache-den8232-DEN X-Timer: - - S1695849629.409080,VS0,VE2 + - S1697666600.714729,VS0,VE2 expires: - - Wed, 27 Sep 2023 21:22:07 GMT + - Wed, 18 Oct 2023 22:13:18 GMT permissions-policy: - interest-cohort=() x-proxy-cache: @@ -221,4 +249,587 @@ interactions: status: code: 200 message: OK +- request: + body: null + headers: + Connection: + - close + Host: + - proj.org + User-Agent: + - Python-urllib/3.11 + method: GET + uri: https://proj.org/schemas/v0.4/projjson.schema.json + response: + body: + string: '' + headers: + Age: + - '0' + CDN-Cache-Control: + - public + CF-Cache-Status: + - HIT + CF-Ray: + - 81841218ef7051df-DEN + Cache-Control: + - max-age=1200 + Connection: + - close + Content-Language: + - en + Content-Length: + - '0' + Content-Type: + - text/html; charset=utf-8 + Cross-Origin-Opener-Policy: + - same-origin + Date: + - Wed, 18 Oct 2023 22:03:19 GMT + Location: + - https://proj.org/en/9.3/schemas/v0.4/projjson.schema.json + Referrer-Policy: + - no-referrer-when-downgrade + Server: + - cloudflare + Vary: + - Accept-Language, Cookie, Accept-Encoding + X-Backend: + - web-i-0786f8752dd181c0f + X-Content-Type-Options: + - nosniff + X-RTD-Domain: + - proj.org + X-RTD-Project: + - osgeo-proj + X-RTD-Project-Method: + - custom_domain + X-RTD-Redirect: + - user + X-RTD-Version-Method: + - path + X-Served: + - Proxito-404 + alt-svc: + - h3=":443"; ma=86400 + status: + code: 302 + message: Found +- request: + body: null + headers: + Connection: + - close + Host: + - proj.org + User-Agent: + - Python-urllib/3.11 + method: GET + uri: https://proj.org/en/9.3/schemas/v0.4/projjson.schema.json + response: + body: + string: "{\n \"$id\": \"https://proj.org/schemas/v0.4/projjson.schema.json\",\n + \ \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n \"description\": + \"Schema for PROJJSON (v0.4)\",\n \"$comment\": \"This file exists both in + data/ and in schemas/vXXX/. Keep both in sync. And if changing the value of + $id, change PROJJSON_CURRENT_VERSION accordingly in io.cpp\",\n\n \"oneOf\": + [\n { \"$ref\": \"#/definitions/crs\" },\n { \"$ref\": \"#/definitions/datum\" + },\n { \"$ref\": \"#/definitions/datum_ensemble\" },\n { \"$ref\": \"#/definitions/ellipsoid\" + },\n { \"$ref\": \"#/definitions/prime_meridian\" },\n { \"$ref\": \"#/definitions/single_operation\" + },\n { \"$ref\": \"#/definitions/concatenated_operation\" }\n ],\n\n \"definitions\": + {\n\n \"abridged_transformation\": {\n \"type\": \"object\",\n \"properties\": + {\n \"$schema\" : { \"type\": \"string\" },\n \"type\": { \"type\": + \"string\", \"enum\": [\"AbridgedTransformation\"] },\n \"name\": { + \"type\": \"string\" },\n \"method\": { \"$ref\": \"#/definitions/method\" + },\n \"parameters\": {\n \"type\": \"array\",\n \"items\": + { \"$ref\": \"#/definitions/parameter_value\" }\n },\n \"id\": + { \"$ref\": \"#/definitions/id\" },\n \"ids\": { \"$ref\": \"#/definitions/ids\" + }\n },\n \"required\" : [ \"name\", \"method\", \"parameters\" ],\n + \ \"allOf\": [\n { \"$ref\": \"#/definitions/id_ids_mutually_exclusive\" + }\n ],\n \"additionalProperties\": false\n },\n\n \"axis\": + {\n \"type\": \"object\",\n \"properties\": {\n \"$schema\" + : { \"type\": \"string\" },\n \"type\": { \"type\": \"string\", \"enum\": + [\"Axis\"] },\n \"name\": { \"type\": \"string\" },\n \"abbreviation\": + { \"type\": \"string\" },\n \"direction\": { \"type\": \"string\",\n + \ \"enum\": [ \"north\",\n \"northNorthEast\",\n + \ \"northEast\",\n \"eastNorthEast\",\n + \ \"east\",\n \"eastSouthEast\",\n + \ \"southEast\",\n \"southSouthEast\",\n + \ \"south\",\n \"southSouthWest\",\n + \ \"southWest\",\n \"westSouthWest\",\n + \ \"west\",\n \"westNorthWest\",\n + \ \"northWest\",\n \"northNorthWest\",\n + \ \"up\",\n \"down\",\n + \ \"geocentricX\",\n \"geocentricY\",\n + \ \"geocentricZ\",\n \"columnPositive\",\n + \ \"columnNegative\",\n \"rowPositive\",\n + \ \"rowNegative\",\n \"displayRight\",\n + \ \"displayLeft\",\n \"displayUp\",\n + \ \"displayDown\",\n \"forward\",\n + \ \"aft\",\n \"port\",\n + \ \"starboard\",\n \"clockwise\",\n + \ \"counterClockwise\",\n \"towards\",\n + \ \"awayFrom\",\n \"future\",\n + \ \"past\",\n \"unspecified\" + ] },\n \"unit\": { \"$ref\": \"#/definitions/unit\" },\n \"id\": + { \"$ref\": \"#/definitions/id\" },\n \"ids\": { \"$ref\": \"#/definitions/ids\" + }\n },\n \"required\" : [ \"name\", \"abbreviation\", \"direction\" + ],\n \"allOf\": [\n { \"$ref\": \"#/definitions/id_ids_mutually_exclusive\" + }\n ],\n \"additionalProperties\": false\n },\n\n \"bbox\": + {\n \"type\": \"object\",\n \"properties\": {\n \"east_longitude\": + { \"type\": \"number\" },\n \"west_longitude\": { \"type\": \"number\" + },\n \"south_latitude\": { \"type\": \"number\" },\n \"north_latitude\": + { \"type\": \"number\" }\n },\n \"required\" : [ \"east_longitude\", + \"west_longitude\",\n \"south_latitude\", \"north_latitude\" + ],\n \"additionalProperties\": false\n },\n\n \"bound_crs\": {\n + \ \"type\": \"object\",\n \"allOf\": [{ \"$ref\": \"#/definitions/object_usage\" + }],\n \"properties\": {\n \"$schema\" : { \"type\": \"string\" + },\n \"type\": { \"type\": \"string\", \"enum\": [\"BoundCRS\"] },\n + \ \"name\": { \"type\": \"string\" },\n \"source_crs\": { \"$ref\": + \"#/definitions/crs\" },\n \"target_crs\": { \"$ref\": \"#/definitions/crs\" + },\n \"transformation\": { \"$ref\": \"#/definitions/abridged_transformation\" + },\n \"scope\": {},\n \"area\": {},\n \"bbox\": {},\n + \ \"usages\": {},\n \"remarks\": {},\n \"id\": {}, \"ids\": + {}\n },\n \"required\" : [ \"source_crs\", \"target_crs\", \"transformation\" + ],\n \"additionalProperties\": false\n },\n\n \"compound_crs\": + {\n \"type\": \"object\",\n \"allOf\": [{ \"$ref\": \"#/definitions/object_usage\" + }],\n \"properties\": {\n \"type\": { \"type\": \"string\", \"enum\": + [\"CompoundCRS\"] },\n \"name\": { \"type\": \"string\" },\n \"components\": + \ {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/definitions/crs\" + }\n },\n \"$schema\" : {},\n \"scope\": {},\n \"area\": + {},\n \"bbox\": {},\n \"usages\": {},\n \"remarks\": + {},\n \"id\": {}, \"ids\": {}\n },\n \"required\" : [ \"name\", + \"components\" ],\n \"additionalProperties\": false\n },\n\n \"concatenated_operation\": + {\n \"type\": \"object\",\n \"allOf\": [{ \"$ref\": \"#/definitions/object_usage\" + }],\n \"properties\": {\n \"type\": { \"type\": \"string\", \"enum\": + [\"ConcatenatedOperation\"] },\n \"name\": { \"type\": \"string\" },\n + \ \"source_crs\": { \"$ref\": \"#/definitions/crs\" },\n \"target_crs\": + { \"$ref\": \"#/definitions/crs\" },\n \"steps\": {\n \"type\": + \"array\",\n \"items\": { \"$ref\": \"#/definitions/single_operation\" + }\n },\n \"$schema\" : {},\n \"scope\": {},\n \"area\": + {},\n \"bbox\": {},\n \"usages\": {},\n \"remarks\": + {},\n \"id\": {}, \"ids\": {}\n },\n \"required\" : [ \"name\", + \"source_crs\", \"target_crs\", \"steps\" ],\n \"additionalProperties\": + false\n },\n\n \"conversion\": {\n \"type\": \"object\",\n \"properties\": + {\n \"$schema\" : { \"type\": \"string\" },\n \"type\": { \"type\": + \"string\", \"enum\": [\"Conversion\"] },\n \"name\": { \"type\": \"string\" + },\n \"method\": { \"$ref\": \"#/definitions/method\" },\n \"parameters\": + {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/definitions/parameter_value\" + }\n },\n \"id\": { \"$ref\": \"#/definitions/id\" },\n \"ids\": + { \"$ref\": \"#/definitions/ids\" }\n },\n \"required\" : [ \"name\", + \"method\" ],\n \"allOf\": [\n { \"$ref\": \"#/definitions/id_ids_mutually_exclusive\" + }\n ],\n \"additionalProperties\": false\n },\n\n \"coordinate_system\": + {\n \"type\": \"object\",\n \"properties\": {\n \"$schema\" + : { \"type\": \"string\" },\n \"type\": { \"type\": \"string\", \"enum\": + [\"CoordinateSystem\"] },\n \"name\": { \"type\": \"string\" },\n \"subtype\": + { \"type\": \"string\",\n \"enum\": [\"Cartesian\",\n + \ \"spherical\",\n \"ellipsoidal\",\n + \ \"vertical\",\n \"ordinal\",\n + \ \"parametric\",\n \"TemporalDateTime\",\n + \ \"TemporalCount\",\n \"TemporalMeasure\"] + \ },\n \"axis\": {\n \"type\": \"array\",\n \"items\": + { \"$ref\": \"#/definitions/axis\" }\n },\n \"id\": { \"$ref\": + \"#/definitions/id\" },\n \"ids\": { \"$ref\": \"#/definitions/ids\" + }\n },\n \"required\" : [ \"subtype\", \"axis\" ],\n \"allOf\": + [\n { \"$ref\": \"#/definitions/id_ids_mutually_exclusive\" }\n ],\n + \ \"additionalProperties\": false\n },\n\n \"crs\": {\n \"oneOf\": + [\n { \"$ref\": \"#/definitions/bound_crs\" },\n { \"$ref\": + \"#/definitions/compound_crs\" },\n { \"$ref\": \"#/definitions/derived_engineering_crs\" + },\n { \"$ref\": \"#/definitions/derived_geodetic_crs\" },\n { + \"$ref\": \"#/definitions/derived_parametric_crs\" },\n { \"$ref\": + \"#/definitions/derived_projected_crs\" },\n { \"$ref\": \"#/definitions/derived_temporal_crs\" + },\n { \"$ref\": \"#/definitions/derived_vertical_crs\" },\n { + \"$ref\": \"#/definitions/engineering_crs\" },\n { \"$ref\": \"#/definitions/geodetic_crs\" + },\n { \"$ref\": \"#/definitions/parametric_crs\" },\n { \"$ref\": + \"#/definitions/projected_crs\" },\n { \"$ref\": \"#/definitions/temporal_crs\" + },\n { \"$ref\": \"#/definitions/vertical_crs\" }\n ]\n },\n\n + \ \"datum\": {\n \"oneOf\": [\n { \"$ref\": \"#/definitions/geodetic_reference_frame\" + },\n { \"$ref\": \"#/definitions/vertical_reference_frame\" },\n { + \"$ref\": \"#/definitions/dynamic_geodetic_reference_frame\" },\n { + \"$ref\": \"#/definitions/dynamic_vertical_reference_frame\" },\n { + \"$ref\": \"#/definitions/temporal_datum\" },\n { \"$ref\": \"#/definitions/parametric_datum\" + },\n { \"$ref\": \"#/definitions/engineering_datum\" }\n ]\n },\n\n + \ \"datum_ensemble\": {\n \"type\": \"object\",\n \"properties\": + {\n \"$schema\" : { \"type\": \"string\" },\n \"type\": { \"type\": + \"string\", \"enum\": [\"DatumEnsemble\"] },\n \"name\": { \"type\": + \"string\" },\n \"members\": {\n \"type\": \"array\",\n + \ \"items\": {\n \"type\": \"object\",\n \"properties\": + {\n \"name\": { \"type\": \"string\" },\n \"id\": + { \"$ref\": \"#/definitions/id\" },\n \"ids\": { \"$ref\": + \"#/definitions/ids\" }\n },\n \"required\" + : [ \"name\" ],\n \"allOf\": [\n { \"$ref\": + \"#/definitions/id_ids_mutually_exclusive\" }\n ],\n \"additionalProperties\": + false\n }\n },\n \"ellipsoid\": { \"$ref\": \"#/definitions/ellipsoid\" + },\n \"accuracy\": { \"type\": \"string\" },\n \"id\": { \"$ref\": + \"#/definitions/id\" },\n \"ids\": { \"$ref\": \"#/definitions/ids\" + }\n },\n \"required\" : [ \"name\", \"members\", \"accuracy\" ],\n + \ \"allOf\": [\n { \"$ref\": \"#/definitions/id_ids_mutually_exclusive\" + }\n ],\n \"additionalProperties\": false\n },\n\n \"derived_engineering_crs\": + {\n \"type\": \"object\",\n \"allOf\": [{ \"$ref\": \"#/definitions/object_usage\" + }],\n \"properties\": {\n \"type\": { \"type\": \"string\",\n + \ \"enum\": [\"DerivedEngineeringCRS\"] },\n \"name\": + { \"type\": \"string\" },\n \"base_crs\": { \"$ref\": \"#/definitions/engineering_crs\" + },\n \"conversion\": { \"$ref\": \"#/definitions/conversion\" },\n + \ \"coordinate_system\": { \"$ref\": \"#/definitions/coordinate_system\" + },\n \"$schema\" : {},\n \"scope\": {},\n \"area\": {},\n + \ \"bbox\": {},\n \"usages\": {},\n \"remarks\": {},\n + \ \"id\": {}, \"ids\": {}\n },\n \"required\" : [ \"name\", + \"base_crs\", \"conversion\", \"coordinate_system\" ],\n \"additionalProperties\": + false\n },\n\n \"derived_geodetic_crs\": {\n \"type\": \"object\",\n + \ \"allOf\": [{ \"$ref\": \"#/definitions/object_usage\" }],\n \"properties\": + {\n \"type\": { \"type\": \"string\",\n \"enum\": + [\"DerivedGeodeticCRS\",\n \"DerivedGeographicCRS\"] + },\n \"name\": { \"type\": \"string\" },\n \"base_crs\": { \"$ref\": + \"#/definitions/geodetic_crs\" },\n \"conversion\": { \"$ref\": \"#/definitions/conversion\" + },\n \"coordinate_system\": { \"$ref\": \"#/definitions/coordinate_system\" + },\n \"$schema\" : {},\n \"scope\": {},\n \"area\": {},\n + \ \"bbox\": {},\n \"usages\": {},\n \"remarks\": {},\n + \ \"id\": {}, \"ids\": {}\n },\n \"required\" : [ \"name\", + \"base_crs\", \"conversion\", \"coordinate_system\" ],\n \"additionalProperties\": + false\n },\n\n \"derived_parametric_crs\": {\n \"type\": \"object\",\n + \ \"allOf\": [{ \"$ref\": \"#/definitions/object_usage\" }],\n \"properties\": + {\n \"type\": { \"type\": \"string\",\n \"enum\": + [\"DerivedParametricCRS\"] },\n \"name\": { \"type\": \"string\" },\n + \ \"base_crs\": { \"$ref\": \"#/definitions/parametric_crs\" },\n \"conversion\": + { \"$ref\": \"#/definitions/conversion\" },\n \"coordinate_system\": + { \"$ref\": \"#/definitions/coordinate_system\" },\n \"$schema\" : + {},\n \"scope\": {},\n \"area\": {},\n \"bbox\": {},\n + \ \"usages\": {},\n \"remarks\": {},\n \"id\": {}, \"ids\": + {}\n },\n \"required\" : [ \"name\", \"base_crs\", \"conversion\", + \"coordinate_system\" ],\n \"additionalProperties\": false\n },\n\n + \ \"derived_projected_crs\": {\n \"type\": \"object\",\n \"allOf\": + [{ \"$ref\": \"#/definitions/object_usage\" }],\n \"properties\": {\n + \ \"type\": { \"type\": \"string\",\n \"enum\": [\"DerivedProjectedCRS\"] + },\n \"name\": { \"type\": \"string\" },\n \"base_crs\": { \"$ref\": + \"#/definitions/projected_crs\" },\n \"conversion\": { \"$ref\": \"#/definitions/conversion\" + },\n \"coordinate_system\": { \"$ref\": \"#/definitions/coordinate_system\" + },\n \"$schema\" : {},\n \"scope\": {},\n \"area\": {},\n + \ \"bbox\": {},\n \"usages\": {},\n \"remarks\": {},\n + \ \"id\": {}, \"ids\": {}\n },\n \"required\" : [ \"name\", + \"base_crs\", \"conversion\", \"coordinate_system\" ],\n \"additionalProperties\": + false\n },\n\n \"derived_temporal_crs\": {\n \"type\": \"object\",\n + \ \"allOf\": [{ \"$ref\": \"#/definitions/object_usage\" }],\n \"properties\": + {\n \"type\": { \"type\": \"string\",\n \"enum\": + [\"DerivedTemporalCRS\"] },\n \"name\": { \"type\": \"string\" },\n + \ \"base_crs\": { \"$ref\": \"#/definitions/temporal_crs\" },\n \"conversion\": + { \"$ref\": \"#/definitions/conversion\" },\n \"coordinate_system\": + { \"$ref\": \"#/definitions/coordinate_system\" },\n \"$schema\" : + {},\n \"scope\": {},\n \"area\": {},\n \"bbox\": {},\n + \ \"usages\": {},\n \"remarks\": {},\n \"id\": {}, \"ids\": + {}\n },\n \"required\" : [ \"name\", \"base_crs\", \"conversion\", + \"coordinate_system\" ],\n \"additionalProperties\": false\n },\n\n + \ \"derived_vertical_crs\": {\n \"type\": \"object\",\n \"allOf\": + [{ \"$ref\": \"#/definitions/object_usage\" }],\n \"properties\": {\n + \ \"type\": { \"type\": \"string\",\n \"enum\": [\"DerivedVerticalCRS\"] + },\n \"name\": { \"type\": \"string\" },\n \"base_crs\": { \"$ref\": + \"#/definitions/vertical_crs\" },\n \"conversion\": { \"$ref\": \"#/definitions/conversion\" + },\n \"coordinate_system\": { \"$ref\": \"#/definitions/coordinate_system\" + },\n \"$schema\" : {},\n \"scope\": {},\n \"area\": {},\n + \ \"bbox\": {},\n \"usages\": {},\n \"remarks\": {},\n + \ \"id\": {}, \"ids\": {}\n },\n \"required\" : [ \"name\", + \"base_crs\", \"conversion\", \"coordinate_system\" ],\n \"additionalProperties\": + false\n },\n\n \"dynamic_geodetic_reference_frame\": {\n \"type\": + \"object\",\n \"allOf\": [{ \"$ref\": \"#/definitions/geodetic_reference_frame\" + }],\n \"properties\": {\n \"type\": { \"type\": \"string\", \"enum\": + [\"DynamicGeodeticReferenceFrame\"] },\n \"name\": {},\n \"anchor\": + {},\n \"ellipsoid\": {},\n \"prime_meridian\": {},\n \"frame_reference_epoch\": + { \"type\": \"number\" },\n \"deformation_model\": { \"type\": \"string\" + },\n \"$schema\" : {},\n \"scope\": {},\n \"area\": {},\n + \ \"bbox\": {},\n \"usages\": {},\n \"remarks\": {},\n + \ \"id\": {}, \"ids\": {}\n },\n \"required\" : [ \"name\", + \"ellipsoid\", \"frame_reference_epoch\" ],\n \"additionalProperties\": + false\n },\n\n \"dynamic_vertical_reference_frame\": {\n \"type\": + \"object\",\n \"allOf\": [{ \"$ref\": \"#/definitions/vertical_reference_frame\" + }],\n \"properties\": {\n \"type\": { \"type\": \"string\", \"enum\": + [\"DynamicVerticalReferenceFrame\"] },\n \"name\": {},\n \"anchor\": + {},\n \"frame_reference_epoch\": { \"type\": \"number\" },\n \"deformation_model\": + { \"type\": \"string\" },\n \"$schema\" : {},\n \"scope\": {},\n + \ \"area\": {},\n \"bbox\": {},\n \"usages\": {},\n \"remarks\": + {},\n \"id\": {}, \"ids\": {}\n },\n \"required\" : [ \"name\", + \"frame_reference_epoch\" ],\n \"additionalProperties\": false\n },\n\n + \ \"ellipsoid\": {\n \"type\": \"object\",\n \"oneOf\":[\n {\n + \ \"properties\": {\n \"$schema\" : { \"type\": \"string\" + },\n \"type\": { \"type\": \"string\", \"enum\": [\"Ellipsoid\"] + },\n \"name\": { \"type\": \"string\" },\n \"semi_major_axis\": + { \"$ref\": \"#/definitions/value_in_metre_or_value_and_unit\" },\n \"semi_minor_axis\": + { \"$ref\": \"#/definitions/value_in_metre_or_value_and_unit\" },\n \"id\": + { \"$ref\": \"#/definitions/id\" },\n \"ids\": { \"$ref\": \"#/definitions/ids\" + }\n },\n \"required\" : [ \"name\", \"semi_major_axis\", + \"semi_minor_axis\" ],\n \"additionalProperties\": false\n },\n + \ {\n \"properties\": {\n \"$schema\" : { \"type\": + \"string\" },\n \"type\": { \"type\": \"string\", \"enum\": [\"Ellipsoid\"] + },\n \"name\": { \"type\": \"string\" },\n \"semi_major_axis\": + { \"$ref\": \"#/definitions/value_in_metre_or_value_and_unit\" },\n \"inverse_flattening\": + { \"type\": \"number\" },\n \"id\": { \"$ref\": \"#/definitions/id\" + },\n \"ids\": { \"$ref\": \"#/definitions/ids\" }\n },\n + \ \"required\" : [ \"name\", \"semi_major_axis\", \"inverse_flattening\" + ],\n \"additionalProperties\": false\n },\n {\n \"properties\": + {\n \"$schema\" : { \"type\": \"string\" },\n \"type\": + { \"type\": \"string\", \"enum\": [\"Ellipsoid\"] },\n \"name\": + { \"type\": \"string\" },\n \"radius\": { \"$ref\": \"#/definitions/value_in_metre_or_value_and_unit\" + },\n \"id\": { \"$ref\": \"#/definitions/id\" },\n \"ids\": + { \"$ref\": \"#/definitions/ids\" }\n },\n \"required\" + : [ \"name\", \"radius\" ],\n \"additionalProperties\": false\n }\n + \ ],\n \"allOf\": [\n { \"$ref\": \"#/definitions/id_ids_mutually_exclusive\" + }\n ]\n },\n\n \"engineering_crs\": {\n \"type\": \"object\",\n + \ \"allOf\": [{ \"$ref\": \"#/definitions/object_usage\" }],\n \"properties\": + {\n \"type\": { \"type\": \"string\", \"enum\": [\"EngineeringCRS\"] + },\n \"name\": { \"type\": \"string\" },\n \"datum\": { \"$ref\": + \"#/definitions/engineering_datum\" },\n \"coordinate_system\": { \"$ref\": + \"#/definitions/coordinate_system\" },\n \"$schema\" : {},\n \"scope\": + {},\n \"area\": {},\n \"bbox\": {},\n \"usages\": {},\n + \ \"remarks\": {},\n \"id\": {}, \"ids\": {}\n },\n \"required\" + : [ \"name\", \"datum\" ],\n \"additionalProperties\": false\n },\n\n + \ \"engineering_datum\": {\n \"type\": \"object\",\n \"allOf\": + [{ \"$ref\": \"#/definitions/object_usage\" }],\n \"properties\": {\n + \ \"type\": { \"type\": \"string\", \"enum\": [\"EngineeringDatum\"] + },\n \"name\": { \"type\": \"string\" },\n \"anchor\": { \"type\": + \"string\" },\n \"$schema\" : {},\n \"scope\": {},\n \"area\": + {},\n \"bbox\": {},\n \"usages\": {},\n \"remarks\": + {},\n \"id\": {}, \"ids\": {}\n },\n \"required\" : [ \"name\" + ],\n \"additionalProperties\": false\n },\n\n \"geodetic_crs\": + {\n \"type\": \"object\",\n \"properties\": {\n \"type\": + { \"type\": \"string\", \"enum\": [\"GeodeticCRS\", \"GeographicCRS\"] },\n + \ \"name\": { \"type\": \"string\" },\n \"datum\": {\n \"oneOf\": + [\n { \"$ref\": \"#/definitions/geodetic_reference_frame\" + },\n { \"$ref\": \"#/definitions/dynamic_geodetic_reference_frame\" + }\n ]\n },\n \"datum_ensemble\": { \"$ref\": \"#/definitions/datum_ensemble\" + },\n \"coordinate_system\": { \"$ref\": \"#/definitions/coordinate_system\" + },\n \"$schema\" : {},\n \"scope\": {},\n \"area\": {},\n + \ \"bbox\": {},\n \"usages\": {},\n \"remarks\": {},\n + \ \"id\": {}, \"ids\": {}\n },\n \"required\" : [ \"name\" + ],\n \"description\": \"One and only one of datum and datum_ensemble + must be provided\",\n \"allOf\": [\n { \"$ref\": \"#/definitions/object_usage\" + },\n { \"$ref\": \"#/definitions/one_and_only_one_of_datum_or_datum_ensemble\" + }\n ],\n \"additionalProperties\": false\n },\n\n \"geodetic_reference_frame\": + {\n \"type\": \"object\",\n \"allOf\": [{ \"$ref\": \"#/definitions/object_usage\" + }],\n \"properties\": {\n \"type\": { \"type\": \"string\", \"enum\": + [\"GeodeticReferenceFrame\"] },\n \"name\": { \"type\": \"string\" + },\n \"anchor\": { \"type\": \"string\" },\n \"ellipsoid\": + { \"$ref\": \"#/definitions/ellipsoid\" },\n \"prime_meridian\": { + \"$ref\": \"#/definitions/prime_meridian\" },\n \"$schema\" : {},\n + \ \"scope\": {},\n \"area\": {},\n \"bbox\": {},\n \"usages\": + {},\n \"remarks\": {},\n \"id\": {}, \"ids\": {}\n },\n + \ \"required\" : [ \"name\", \"ellipsoid\" ],\n \"additionalProperties\": + false\n },\n\n \"id\": {\n \"type\": \"object\",\n \"properties\": + {\n \"authority\": { \"type\": \"string\" },\n \"code\": {\n + \ \"oneOf\": [ { \"type\": \"string\" }, { \"type\": \"integer\" } + ]\n },\n \"version\": {\n \"oneOf\": [ { \"type\": + \"string\" }, { \"type\": \"number\" } ]\n },\n \"authority_citation\": + { \"type\": \"string\" },\n \"uri\": { \"type\": \"string\" }\n },\n + \ \"required\" : [ \"authority\", \"code\" ],\n \"additionalProperties\": + false\n },\n\n \"ids\": {\n \"type\": \"array\",\n \"items\": + { \"$ref\": \"#/definitions/id\" }\n },\n\n \"method\": {\n \"type\": + \"object\",\n \"properties\": {\n \"$schema\" : { \"type\": \"string\" + },\n \"type\": { \"type\": \"string\", \"enum\": [\"OperationMethod\"]},\n + \ \"name\": { \"type\": \"string\" },\n \"id\": { \"$ref\": \"#/definitions/id\" + },\n \"ids\": { \"$ref\": \"#/definitions/ids\" }\n },\n \"required\" + : [ \"name\" ],\n \"allOf\": [\n { \"$ref\": \"#/definitions/id_ids_mutually_exclusive\" + }\n ],\n \"additionalProperties\": false\n },\n\n \"id_ids_mutually_exclusive\": + {\n \"not\": {\n \"type\": \"object\",\n \"required\": + [ \"id\", \"ids\" ]\n }\n },\n\n \"one_and_only_one_of_datum_or_datum_ensemble\": + {\n \"allOf\": [\n {\n \"not\": {\n \"type\": + \"object\",\n \"required\": [ \"datum\", \"datum_ensemble\" + ]\n }\n },\n {\n \"oneOf\": [\n { + \"type\": \"object\", \"required\": [\"datum\"] },\n { \"type\": + \"object\", \"required\": [\"datum_ensemble\"] }\n ]\n }\n + \ ]\n },\n\n \"object_usage\": {\n \"anyOf\": [\n {\n + \ \"type\": \"object\",\n \"properties\": {\n \"$schema\" + : { \"type\": \"string\" },\n \"scope\": { \"type\": \"string\" + },\n \"area\": { \"type\": \"string\" },\n \"bbox\": + { \"$ref\": \"#/definitions/bbox\" },\n \"remarks\": { \"type\": + \"string\" },\n \"id\": { \"$ref\": \"#/definitions/id\" },\n \"ids\": + { \"$ref\": \"#/definitions/ids\" }\n },\n \"allOf\": [\n { + \"$ref\": \"#/definitions/id_ids_mutually_exclusive\" }\n ]\n },\n + \ {\n \"type\": \"object\",\n \"properties\": {\n \"$schema\" + : { \"type\": \"string\" },\n \"usages\": { \"$ref\": \"#/definitions/usages\" + },\n \"remarks\": { \"type\": \"string\" },\n \"id\": + { \"$ref\": \"#/definitions/id\" },\n \"ids\": { \"$ref\": \"#/definitions/ids\" + }\n },\n \"allOf\": [\n { \"$ref\": \"#/definitions/id_ids_mutually_exclusive\" + }\n ]\n }\n ]\n },\n\n \"parameter_value\": {\n \"type\": + \"object\",\n \"properties\": {\n \"$schema\" : { \"type\": \"string\" + },\n \"type\": { \"type\": \"string\", \"enum\": [\"ParameterValue\"] + },\n \"name\": { \"type\": \"string\" },\n \"value\": {\n \"oneOf\": + [\n { \"type\": \"string\" },\n { \"type\": \"number\" + }\n ]\n },\n \"unit\": { \"$ref\": \"#/definitions/unit\" + },\n \"id\": { \"$ref\": \"#/definitions/id\" },\n \"ids\": + { \"$ref\": \"#/definitions/ids\" }\n },\n \"required\" : [ \"name\", + \"value\" ],\n \"allOf\": [\n { \"$ref\": \"#/definitions/id_ids_mutually_exclusive\" + }\n ],\n \"additionalProperties\": false\n },\n\n \"parametric_crs\": + {\n \"type\": \"object\",\n \"allOf\": [{ \"$ref\": \"#/definitions/object_usage\" + }],\n \"properties\": {\n \"type\": { \"type\": \"string\", \"enum\": + [\"ParametricCRS\"] },\n \"name\": { \"type\": \"string\" },\n \"datum\": + { \"$ref\": \"#/definitions/parametric_datum\" },\n \"coordinate_system\": + { \"$ref\": \"#/definitions/coordinate_system\" },\n \"$schema\" : + {},\n \"scope\": {},\n \"area\": {},\n \"bbox\": {},\n + \ \"usages\": {},\n \"remarks\": {},\n \"id\": {}, \"ids\": + {}\n },\n \"required\" : [ \"name\", \"datum\" ],\n \"additionalProperties\": + false\n },\n\n \"parametric_datum\": {\n \"type\": \"object\",\n + \ \"allOf\": [{ \"$ref\": \"#/definitions/object_usage\" }],\n \"properties\": + {\n \"type\": { \"type\": \"string\", \"enum\": [\"ParametricDatum\"] + },\n \"name\": { \"type\": \"string\" },\n \"anchor\": { \"type\": + \"string\" },\n \"$schema\" : {},\n \"scope\": {},\n \"area\": + {},\n \"bbox\": {},\n \"usages\": {},\n \"remarks\": + {},\n \"id\": {}, \"ids\": {}\n },\n \"required\" : [ \"name\" + ],\n \"additionalProperties\": false\n },\n\n \"prime_meridian\": + {\n \"type\": \"object\",\n \"properties\": {\n \"$schema\" + : { \"type\": \"string\" },\n \"type\": { \"type\": \"string\", \"enum\": + [\"PrimeMeridian\"] },\n \"name\": { \"type\": \"string\" },\n \"longitude\": + { \"$ref\": \"#/definitions/value_in_degree_or_value_and_unit\" },\n \"id\": + { \"$ref\": \"#/definitions/id\" },\n \"ids\": { \"$ref\": \"#/definitions/ids\" + }\n },\n \"required\" : [ \"name\" ],\n \"allOf\": [\n { + \"$ref\": \"#/definitions/id_ids_mutually_exclusive\" }\n ],\n \"additionalProperties\": + false\n },\n\n \"single_operation\": {\n \"oneOf\": [\n { + \"$ref\": \"#/definitions/conversion\" },\n { \"$ref\": \"#/definitions/transformation\" + }\n ]\n },\n\n \"projected_crs\": {\n \"type\": \"object\",\n + \ \"allOf\": [{ \"$ref\": \"#/definitions/object_usage\" }],\n \"properties\": + {\n \"type\": { \"type\": \"string\",\n \"enum\": + [\"ProjectedCRS\"] },\n \"name\": { \"type\": \"string\" },\n \"base_crs\": + { \"$ref\": \"#/definitions/geodetic_crs\" },\n \"conversion\": { \"$ref\": + \"#/definitions/conversion\" },\n \"coordinate_system\": { \"$ref\": + \"#/definitions/coordinate_system\" },\n \"$schema\" : {},\n \"scope\": + {},\n \"area\": {},\n \"bbox\": {},\n \"usages\": {},\n + \ \"remarks\": {},\n \"id\": {}, \"ids\": {}\n },\n \"required\" + : [ \"name\", \"base_crs\", \"conversion\", \"coordinate_system\" ],\n \"additionalProperties\": + false\n },\n\n \"temporal_crs\": {\n \"type\": \"object\",\n \"allOf\": + [{ \"$ref\": \"#/definitions/object_usage\" }],\n \"properties\": {\n + \ \"type\": { \"type\": \"string\", \"enum\": [\"TemporalCRS\"] },\n + \ \"name\": { \"type\": \"string\" },\n \"datum\": { \"$ref\": + \"#/definitions/temporal_datum\" },\n \"coordinate_system\": { \"$ref\": + \"#/definitions/coordinate_system\" },\n \"$schema\" : {},\n \"scope\": + {},\n \"area\": {},\n \"bbox\": {},\n \"usages\": {},\n + \ \"remarks\": {},\n \"id\": {}, \"ids\": {}\n },\n \"required\" + : [ \"name\", \"datum\" ],\n \"additionalProperties\": false\n },\n\n + \ \"temporal_datum\": {\n \"type\": \"object\",\n \"allOf\": [{ + \"$ref\": \"#/definitions/object_usage\" }],\n \"properties\": {\n \"type\": + { \"type\": \"string\", \"enum\": [\"TemporalDatum\"] },\n \"name\": + { \"type\": \"string\" },\n \"calendar\": { \"type\": \"string\" },\n + \ \"time_origin\": { \"type\": \"string\" },\n \"$schema\" : + {},\n \"scope\": {},\n \"area\": {},\n \"bbox\": {},\n + \ \"usages\": {},\n \"remarks\": {},\n \"id\": {}, \"ids\": + {}\n },\n \"required\" : [ \"name\", \"calendar\" ],\n \"additionalProperties\": + false\n },\n\n \"transformation\": {\n \"type\": \"object\",\n + \ \"allOf\": [{ \"$ref\": \"#/definitions/object_usage\" }],\n \"properties\": + {\n \"type\": { \"type\": \"string\", \"enum\": [\"Transformation\"] + },\n \"name\": { \"type\": \"string\" },\n \"source_crs\": { + \"$ref\": \"#/definitions/crs\" },\n \"target_crs\": { \"$ref\": \"#/definitions/crs\" + },\n \"interpolation_crs\": { \"$ref\": \"#/definitions/crs\" },\n + \ \"method\": { \"$ref\": \"#/definitions/method\" },\n \"parameters\": + {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/definitions/parameter_value\" + }\n },\n \"accuracy\": { \"type\": \"string\" },\n \"$schema\" + : {},\n \"scope\": {},\n \"area\": {},\n \"bbox\": {},\n + \ \"usages\": {},\n \"remarks\": {},\n \"id\": {}, \"ids\": + {}\n },\n \"required\" : [ \"name\", \"source_crs\", \"target_crs\", + \"method\", \"parameters\" ],\n \"additionalProperties\": false\n },\n\n + \ \"unit\": {\n \"oneOf\": [\n {\n \"type\": \"string\",\n + \ \"enum\": [\"metre\", \"degree\", \"unity\"]\n },\n {\n + \ \"type\": \"object\",\n \"properties\": {\n \"type\": + { \"type\": \"string\",\n \"enum\": [\"LinearUnit\", \"AngularUnit\", + \"ScaleUnit\",\n \"TimeUnit\", \"ParametricUnit\", + \"Unit\"] },\n \"name\": { \"type\": \"string\" },\n \"conversion_factor\": + { \"type\": \"number\" },\n \"id\": { \"$ref\": \"#/definitions/id\" + },\n \"ids\": { \"$ref\": \"#/definitions/ids\" }\n },\n + \ \"required\" : [ \"type\", \"name\" ],\n \"allOf\": [\n { + \"$ref\": \"#/definitions/id_ids_mutually_exclusive\" }\n ],\n \"additionalProperties\": + false\n }\n ]\n },\n\n \"usages\": {\n \"type\": \"array\",\n + \ \"items\": {\n \"type\": \"object\",\n \"properties\": + {\n \"scope\": { \"type\": \"string\" },\n \"area\": + { \"type\": \"string\" },\n \"bbox\": { \"$ref\": \"#/definitions/bbox\" + }\n },\n \"additionalProperties\": false\n }\n },\n\n + \ \"value_and_unit\": {\n \"type\": \"object\",\n \"properties\": + {\n \"value\": { \"type\": \"number\" },\n \"unit\": { \"$ref\": + \"#/definitions/unit\" }\n },\n \"required\" : [ \"value\", \"unit\" + ],\n \"additionalProperties\": false\n },\n\n \"value_in_degree_or_value_and_unit\": + {\n \"oneOf\": [\n { \"type\": \"number\" },\n { \"$ref\": + \"#/definitions/value_and_unit\" }\n ]\n },\n\n \"value_in_metre_or_value_and_unit\": + {\n \"oneOf\": [\n { \"type\": \"number\" },\n { \"$ref\": + \"#/definitions/value_and_unit\" }\n ]\n },\n\n \"vertical_crs\": + {\n \"type\": \"object\",\n \"properties\": {\n \"type\": + { \"type\": \"string\", \"enum\": [\"VerticalCRS\"] },\n \"name\": + { \"type\": \"string\" },\n \"datum\": {\n \"oneOf\": [\n + \ { \"$ref\": \"#/definitions/vertical_reference_frame\" },\n + \ { \"$ref\": \"#/definitions/dynamic_vertical_reference_frame\" + }\n ]\n },\n \"datum_ensemble\": { \"$ref\": \"#/definitions/datum_ensemble\" + },\n \"coordinate_system\": { \"$ref\": \"#/definitions/coordinate_system\" + },\n \"geoid_model\": {\n \"type\": \"object\",\n \"properties\": + {\n \"name\": { \"type\": \"string\" },\n \"interpolation_crs\": + { \"$ref\": \"#/definitions/crs\" },\n \"id\": { \"$ref\": \"#/definitions/id\" + }\n },\n \"required\" : [ \"name\" ],\n \"additionalProperties\": + false\n },\n \"$schema\" : {},\n \"scope\": {},\n \"area\": + {},\n \"bbox\": {},\n \"usages\": {},\n \"remarks\": + {},\n \"id\": {}, \"ids\": {}\n },\n \"required\" : [ \"name\"],\n + \ \"description\": \"One and only one of datum and datum_ensemble must + be provided\",\n \"allOf\": [\n { \"$ref\": \"#/definitions/object_usage\" + },\n { \"$ref\": \"#/definitions/one_and_only_one_of_datum_or_datum_ensemble\" + }\n ],\n \"additionalProperties\": false\n },\n\n \"vertical_reference_frame\": + {\n \"type\": \"object\",\n \"allOf\": [{ \"$ref\": \"#/definitions/object_usage\" + }],\n \"properties\": {\n \"type\": { \"type\": \"string\", \"enum\": + [\"VerticalReferenceFrame\"] },\n \"name\": { \"type\": \"string\" + },\n \"anchor\": { \"type\": \"string\" },\n \"$schema\" : {},\n + \ \"scope\": {},\n \"area\": {},\n \"bbox\": {},\n \"usages\": + {},\n \"remarks\": {},\n \"id\": {}, \"ids\": {}\n },\n + \ \"required\" : [ \"name\" ],\n \"additionalProperties\": false\n + \ }\n\n }\n}\n" + headers: + Access-Control-Allow-Methods: + - HEAD, OPTIONS, GET + Access-Control-Allow-Origin: + - '*' + CDN-Cache-Control: + - public + CF-Cache-Status: + - MISS + CF-Ray: + - 81841219ab801f3e-DEN + Cache-Control: + - max-age=1200 + Connection: + - close + Content-Type: + - application/json + Date: + - Wed, 18 Oct 2023 22:03:20 GMT + ETag: + - W/"165f7cf0ab48a343b939bc9bd70e6d5f" + Last-Modified: + - Sun, 03 Sep 2023 09:10:52 GMT + Referrer-Policy: + - no-referrer-when-downgrade + Server: + - cloudflare + Transfer-Encoding: + - chunked + Vary: + - Accept-Encoding + X-Backend: + - web-i-07cbc6c25e6fd4100 + X-Content-Type-Options: + - nosniff + X-RTD-Domain: + - proj.org + X-RTD-Path: + - /proxito/html/osgeo-proj/9.3/schemas/v0.4/projjson.schema.json + X-RTD-Project: + - osgeo-proj + X-RTD-Project-Method: + - custom_domain + X-RTD-Version: + - '9.3' + X-RTD-Version-Method: + - path + X-Served: + - Nginx-Proxito-Sendfile + alt-svc: + - h3=":443"; ma=86400 + x-amz-id-2: + - fteQcGYhs32YraALul5sFqhEkhfr34IyA04tlsiUxW9bH20HZ70Walet/h2DDM1Rh3EDdIq/83g= + x-amz-meta-mtime: + - '1693732240.238196845' + x-amz-request-id: + - AHX423EZWH0SWXQ9 + x-amz-server-side-encryption: + - AES256 + status: + code: 200 + message: OK version: 1 diff --git a/tests/extensions/cassettes/test_datacube/test_validate.yaml b/tests/extensions/cassettes/test_datacube/test_validate.yaml index 301741a64..19766f0ef 100644 --- a/tests/extensions/cassettes/test_datacube/test_validate.yaml +++ b/tests/extensions/cassettes/test_datacube/test_validate.yaml @@ -9,57 +9,59 @@ interactions: User-Agent: - Python-urllib/3.11 method: GET - uri: https://stac-extensions.github.io/datacube/v2.0.0/schema.json + uri: https://stac-extensions.github.io/datacube/v2.2.0/schema.json response: body: string: "{\n \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n \"$id\": - \"https://stac-extensions.github.io/datacube/v2.0.0/schema.json\",\n \"title\": - \"Datacube Extension\",\n \"description\": \"Datacube Extension for STAC - Items and STAC Collections.\",\n \"oneOf\": [\n {\n \"$comment\": - \"This is the schema for STAC Items. Remove this object if this extension - only applies to Collections.\",\n \"allOf\": [\n {\n \"$ref\": - \"#/definitions/stac_extensions\"\n },\n {\n \"type\": - \"object\",\n \"required\": [\n \"type\",\n \"properties\",\n - \ \"assets\"\n ],\n \"properties\": {\n \"type\": - {\n \"const\": \"Feature\"\n },\n \"properties\": - {\n \"allOf\": [\n {\n \"$comment\": - \"Require fields here for Item Properties.\",\n \"required\": - [\n \"cube:dimensions\"\n ]\n },\n - \ {\n \"$ref\": \"#/definitions/fields\"\n - \ }\n ]\n },\n \"assets\": - {\n \"$comment\": \"This validates the fields in Item Assets, - but does not require them.\",\n \"type\": \"object\",\n \"additionalProperties\": - {\n \"$ref\": \"#/definitions/fields\"\n }\n }\n - \ }\n }\n ]\n },\n {\n \"$comment\": \"This - is the schema for STAC Collections.\",\n \"type\": \"object\",\n \"allOf\": - [\n {\n \"required\": [\n \"type\"\n ],\n + \"https://stac-extensions.github.io/datacube/v2.2.0/schema.json\",\n \"title\": + \"Datacube Extension\",\n \"description\": \"STAC Datacube Extension for + STAC Items and STAC Collections.\",\n \"oneOf\": [\n {\n \"$comment\": + \"This is the schema for STAC Items.\",\n \"allOf\": [\n {\n \"type\": + \"object\",\n \"required\": [\n \"type\"\n ],\n \ \"properties\": {\n \"type\": {\n \"const\": - \"Collection\"\n }\n }\n },\n {\n \"$ref\": + \"Feature\"\n }\n }\n },\n {\n \"$ref\": \"#/definitions/stac_extensions\"\n }\n ],\n \"anyOf\": [\n - \ {\n \"$comment\": \"This is the schema for the top-level - fields in a Collection. Remove this if this extension does not define top-level - fields for Collections.\",\n \"allOf\": [\n {\n \"$comment\": - \"Require fields here for Collections (top-level).\",\n \"required\": - [\n \"cube:dimensions\"\n ]\n },\n - \ {\n \"$ref\": \"#/definitions/fields\"\n }\n - \ ]\n },\n {\n \"$comment\": \"This validates - the fields in Collection Assets, but does not require them.\",\n \"required\": - [\n \"assets\"\n ],\n \"properties\": {\n \"assets\": - {\n \"type\": \"object\",\n \"not\": {\n \"additionalProperties\": + \ {\n \"type\": \"object\",\n \"required\": [\n \"properties\"\n + \ ],\n \"properties\": {\n \"properties\": {\n + \ \"allOf\": [\n {\n \"$ref\": + \"#/definitions/require_field\"\n },\n {\n \"$ref\": + \"#/definitions/fields\"\n }\n ]\n }\n + \ }\n },\n {\n \"$comment\": \"This validates + the fields in Item Assets.\",\n \"required\": [\n \"assets\"\n + \ ],\n \"properties\": {\n \"assets\": {\n \"type\": + \"object\",\n \"not\": {\n \"additionalProperties\": {\n \"not\": {\n \"allOf\": [\n {\n - \ \"$ref\": \"#/definitions/require_any_field\"\n },\n + \ \"$ref\": \"#/definitions/require_field\"\n },\n \ {\n \"$ref\": \"#/definitions/fields\"\n \ }\n ]\n }\n }\n - \ }\n }\n }\n },\n {\n \"$comment\": - \"This is the schema for the fields in Item Asset Definitions. It doesn't - require any fields.\",\n \"required\": [\n \"item_assets\"\n - \ ],\n \"properties\": {\n \"item_assets\": {\n - \ \"type\": \"object\",\n \"not\": {\n \"additionalProperties\": + \ }\n }\n }\n }\n ]\n },\n + \ {\n \"$comment\": \"This is the schema for STAC Collections.\",\n + \ \"type\": \"object\",\n \"allOf\": [\n {\n \"required\": + [\n \"type\"\n ],\n \"properties\": {\n \"type\": + {\n \"const\": \"Collection\"\n }\n }\n },\n + \ {\n \"$ref\": \"#/definitions/stac_extensions\"\n }\n + \ ],\n \"anyOf\": [\n {\n \"$comment\": \"This is + the schema for the top-level fields in a Collection.\",\n \"allOf\": + [\n {\n \"$ref\": \"#/definitions/require_field\"\n + \ },\n {\n \"$ref\": \"#/definitions/fields\"\n + \ }\n ]\n },\n {\n \"$comment\": + \"This validates the fields in Collection Assets.\",\n \"required\": + [\n \"assets\"\n ],\n \"properties\": {\n \"assets\": + {\n \"type\": \"object\",\n \"not\": {\n \"additionalProperties\": {\n \"not\": {\n \"allOf\": [\n {\n - \ \"$ref\": \"#/definitions/require_any_field\"\n },\n + \ \"$ref\": \"#/definitions/require_field\"\n },\n \ {\n \"$ref\": \"#/definitions/fields\"\n \ }\n ]\n }\n }\n \ }\n }\n }\n },\n {\n \"$comment\": + \"This is the schema for the fields in Item Asset Definitions.\",\n \"required\": + [\n \"item_assets\"\n ],\n \"properties\": {\n + \ \"item_assets\": {\n \"type\": \"object\",\n \"not\": + {\n \"additionalProperties\": {\n \"not\": + {\n \"allOf\": [\n {\n \"$ref\": + \"#/definitions/require_any_field\"\n },\n {\n + \ \"$ref\": \"#/definitions/fields\"\n }\n + \ ]\n }\n }\n }\n + \ }\n }\n },\n {\n \"$comment\": \"This is the schema for the fields in Summaries. By default, only checks the existance of the properties, but not the schema of the summaries.\",\n \ \"required\": [\n \"summaries\"\n ],\n \"properties\": @@ -68,22 +70,24 @@ interactions: {\n \"stac_extensions\": {\n \"type\": \"object\",\n \"required\": [\n \"stac_extensions\"\n ],\n \"properties\": {\n \"stac_extensions\": {\n \"type\": \"array\",\n \"contains\": {\n \"const\": - \"https://stac-extensions.github.io/datacube/v2.0.0/schema.json\"\n }\n + \"https://stac-extensions.github.io/datacube/v2.2.0/schema.json\"\n }\n \ }\n }\n },\n \"require_any_field\": {\n \"$comment\": \"Please list all fields here so that we can force the existance of one of them in other parts of the schemas.\",\n \"anyOf\": [\n {\"required\": [\"cube:dimensions\"]},\n {\"required\": [\"cube:variables\"]}\n ]\n - \ },\n \"fields\": {\n \"$comment\": \"Add your new fields here. - Don't require them here, do that above in the corresponding schema.\",\n \"type\": - \"object\",\n \"properties\": {\n \"cube:dimensions\": {\n \"$ref\": - \"#/definitions/cube:dimensions\"\n },\n \"cube:variables\": + \ },\n \"require_field\": {\n \"required\": [\n \"cube:dimensions\"\n + \ ]\n },\n \"fields\": {\n \"$comment\": \"Add your new fields + here. Don't require them here, do that above in the corresponding schema.\",\n + \ \"type\": \"object\",\n \"properties\": {\n \"cube:dimensions\": + {\n \"$ref\": \"#/definitions/cube:dimensions\"\n },\n \"cube:variables\": {\n \"$ref\": \"#/definitions/cube:variables\"\n }\n },\n \ \"patternProperties\": {\n \"^(?!cube:)\": {}\n },\n \"additionalProperties\": false\n },\n \"cube:dimensions\": {\n \"type\": \"object\",\n \"additionalProperties\": - {\n \"anyOf\": [\n {\n \"$ref\": \"#/definitions/additional_dimension\"\n + {\n \"anyOf\": [\n {\n \"$ref\": \"#/definitions/vector_dimension\"\n \ },\n {\n \"$ref\": \"#/definitions/horizontal_spatial_dimension\"\n \ },\n {\n \"$ref\": \"#/definitions/vertical_spatial_dimension\"\n \ },\n {\n \"$ref\": \"#/definitions/temporal_dimension\"\n + \ },\n {\n \"$ref\": \"#/definitions/additional_dimension\"\n \ }\n ]\n }\n },\n \"cube:variables\": {\n \"type\": \"object\",\n \"additionalProperties\": {\n \"$ref\": \"#/definitions/variable\"\n \ }\n },\n \"additional_dimension\": {\n \"title\": \"Additional @@ -92,29 +96,29 @@ interactions: \ ]\n },\n {\n \"required\": [\n \"type\",\n \ \"values\"\n ]\n }\n ],\n \"not\": {\n \ \"required\": [\n \"axis\"\n ]\n },\n \"properties\": - {\n \"type\": {\n \"allOf\": [\n {\n \"type\": - \"string\"\n },\n {\n \"not\": {\n \"type\": - \"string\",\n \"const\": \"spatial\"\n }\n }\n - \ ]\n },\n \"description\": {\n \"$ref\": \"#/definitions/description\"\n - \ },\n \"extent\": {\n \"$ref\": \"#/definitions/extent_open\"\n - \ },\n \"values\": {\n \"$ref\": \"#/definitions/values\"\n - \ },\n \"step\": {\n \"$ref\": \"#/definitions/step\"\n - \ },\n \"unit\": {\n \"$ref\": \"#/definitions/unit\"\n - \ },\n \"reference_system\": {\n \"type\": \"string\"\n - \ },\n \"dimensions\": {\n \"type\": \"array\",\n \"items\": - {\n \"type\": [\n \"string\"\n ]\n }\n - \ }\n }\n },\n \"horizontal_spatial_dimension\": {\n \"title\": - \"Horizontal Spatial Dimension Object\",\n \"type\": \"object\",\n \"required\": - [\n \"type\",\n \"axis\",\n \"extent\"\n ],\n \"properties\": - {\n \"type\": {\n \"$ref\": \"#/definitions/type_spatial\"\n - \ },\n \"axis\": {\n \"$ref\": \"#/definitions/axis_xy\"\n - \ },\n \"description\": {\n \"$ref\": \"#/definitions/description\"\n - \ },\n \"extent\": {\n \"$ref\": \"#/definitions/extent_closed\"\n - \ },\n \"values\": {\n \"$ref\": \"#/definitions/values_numeric\"\n - \ },\n \"step\": {\n \"$ref\": \"#/definitions/step\"\n - \ },\n \"reference_system\": {\n \"$ref\": \"#/definitions/reference_system_spatial\"\n - \ }\n }\n },\n \"vertical_spatial_dimension\": {\n \"title\": - \"Vertical Spatial Dimension Object\",\n \"type\": \"object\",\n \"anyOf\": + {\n \"type\": {\n \"type\": \"string\",\n \"not\": + {\n \"enum\": [\n \"spatial\",\n \"geometry\"\n + \ ]\n }\n },\n \"description\": {\n \"$ref\": + \"#/definitions/description\"\n },\n \"extent\": {\n \"$ref\": + \"#/definitions/extent_open\"\n },\n \"values\": {\n \"$ref\": + \"#/definitions/values\"\n },\n \"step\": {\n \"$ref\": + \"#/definitions/step\"\n },\n \"unit\": {\n \"$ref\": + \"#/definitions/unit\"\n },\n \"reference_system\": {\n \"type\": + \"string\"\n },\n \"dimensions\": {\n \"type\": \"array\",\n + \ \"items\": {\n \"type\": [\n \"string\"\n + \ ]\n }\n }\n }\n },\n \"horizontal_spatial_dimension\": + {\n \"title\": \"Horizontal Spatial Raster Dimension Object\",\n \"type\": + \"object\",\n \"required\": [\n \"type\",\n \"axis\",\n + \ \"extent\"\n ],\n \"properties\": {\n \"type\": {\n + \ \"$ref\": \"#/definitions/type_spatial\"\n },\n \"axis\": + {\n \"$ref\": \"#/definitions/axis_xy\"\n },\n \"description\": + {\n \"$ref\": \"#/definitions/description\"\n },\n \"extent\": + {\n \"$ref\": \"#/definitions/extent_closed\"\n },\n \"values\": + {\n \"$ref\": \"#/definitions/values_numeric\"\n },\n \"step\": + {\n \"$ref\": \"#/definitions/step\"\n },\n \"reference_system\": + {\n \"$ref\": \"#/definitions/reference_system_spatial\"\n }\n + \ }\n },\n \"vertical_spatial_dimension\": {\n \"title\": \"Vertical + Spatial Dimension Object\",\n \"type\": \"object\",\n \"anyOf\": [\n {\n \"required\": [\n \"type\",\n \"axis\",\n \ \"extent\"\n ]\n },\n {\n \"required\": [\n \"type\",\n \"axis\",\n \"values\"\n @@ -127,36 +131,57 @@ interactions: {\n \"$ref\": \"#/definitions/step\"\n },\n \"unit\": {\n \"$ref\": \"#/definitions/unit\"\n },\n \"reference_system\": {\n \"$ref\": \"#/definitions/reference_system_spatial\"\n }\n - \ }\n },\n \"temporal_dimension\": {\n \"title\": \"Temporal + \ }\n },\n \"vector_dimension\": {\n \"title\": \"Spatial Vector Dimension Object\",\n \"type\": \"object\",\n \"required\": [\n - \ \"type\",\n \"extent\"\n ],\n \"not\": {\n \"required\": - [\n \"axis\"\n ]\n },\n \"properties\": {\n \"type\": - {\n \"type\": \"string\",\n \"const\": \"temporal\"\n },\n - \ \"description\": {\n \"$ref\": \"#/definitions/description\"\n - \ },\n \"values\": {\n \"type\": \"array\",\n \"minItems\": - 1,\n \"items\": {\n \"type\": \"string\"\n }\n - \ },\n \"extent\": {\n \"type\": \"array\",\n \"minItems\": + \ \"type\",\n \"bbox\"\n ],\n \"properties\": {\n \"type\": + {\n \"type\": \"string\",\n \"const\": \"geometry\"\n },\n + \ \"axes\": {\n \"type\": \"array\",\n \"uniqueItems\": + true,\n \"items\": {\n \"type\": \"string\",\n \"enum\": + [\n \"x\",\n \"y\",\n \"z\"\n ]\n + \ }\n },\n \"description\": {\n \"$ref\": \"#/definitions/description\"\n + \ },\n \"bbox\": {\n \"title\": \"Spatial extent\",\n + \ \"type\": \"array\",\n \"oneOf\": [\n {\n \"minItems\":4,\n + \ \"maxItems\":4\n },\n {\n \"minItems\":6,\n + \ \"maxItems\":6\n }\n ],\n \"items\": + {\n \"type\": \"number\"\n }\n },\n \"values\": + {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": + {\n \"description\": \"WKT or Identifier\",\n \"type\": + \"string\"\n }\n },\n \"geometry_types\": {\n \"type\": + \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": + \"string\",\n \"enum\": [\n \"Point\",\n \"MultiPoint\",\n + \ \"LineString\",\n \"MultiLineString\",\n \"Polygon\",\n + \ \"MultiPolygon\",\n \"GeometryCollection\"\n ]\n + \ }\n },\n \"reference_system\": {\n \"$ref\": + \"#/definitions/reference_system_spatial\"\n }\n }\n },\n \"temporal_dimension\": + {\n \"title\": \"Temporal Dimension Object\",\n \"type\": \"object\",\n + \ \"required\": [\n \"type\",\n \"extent\"\n ],\n \"not\": + {\n \"required\": [\n \"axis\"\n ]\n },\n \"properties\": + {\n \"type\": {\n \"type\": \"string\",\n \"const\": + \"temporal\"\n },\n \"description\": {\n \"$ref\": + \"#/definitions/description\"\n },\n \"values\": {\n \"type\": + \"array\",\n \"minItems\": 1,\n \"items\": {\n \"type\": + \"string\"\n }\n },\n \"extent\": {\n \"type\": + \"array\",\n \"minItems\": 2,\n \"maxItems\": 2,\n \"items\": + {\n \"type\": [\n \"string\",\n \"null\"\n + \ ]\n }\n },\n \"step\": {\n \"type\": + [\n \"string\",\n \"null\"\n ]\n }\n + \ }\n },\n \"variable\": {\n \"title\": \"Variable Object\",\n + \ \"type\": \"object\",\n \"required\": [\n \"dimensions\"\n + \ ],\n \"properties\": {\n \"variable_type\": {\n \"type\": + \"string\",\n \"enum\": [\n \"data\",\n \"auxiliary\"\n + \ ]\n },\n \"description\": {\n \"$ref\": \"#/definitions/description\"\n + \ },\n \"dimensions\": {\n \"type\": \"array\",\n \"items\": + {\n \"type\": \"string\"\n }\n },\n \"values\": + {\n \"type\": \"array\",\n \"minItems\": 1\n },\n + \ \"extent\": {\n \"type\": \"array\",\n \"minItems\": 2,\n \"maxItems\": 2,\n \"items\": {\n \"type\": - [\n \"string\",\n \"null\"\n ]\n }\n - \ },\n \"step\": {\n \"type\": [\n \"string\",\n - \ \"null\"\n ]\n }\n }\n },\n \"variable\": - {\n \"title\": \"Variable Object\",\n \"type\": \"object\",\n \"required\": - [\n \"dimensions\"\n ],\n \"properties\": {\n \"variable_type\": - {\n \"type\": \"string\",\n \"enum\": [\n \"data\",\n - \ \"auxiliary\"\n ]\n },\n \"description\": - {\n \"$ref\": \"#/definitions/description\"\n },\n \"dimensions\": - {\n \"type\": \"array\",\n \"items\": {\n \"type\": - \"string\"\n }\n },\n \"values\": {\n \"type\": - \"array\",\n \"minItems\": 1\n },\n \"extent\": {\n - \ \"type\": \"array\",\n \"minItems\": 2,\n \"maxItems\": - 2,\n \"items\": {\n \"type\": [\n \"string\",\n - \ \"number\",\n \"null\"\n ]\n }\n - \ },\n \"unit\": {\n \"$ref\": \"#/definitions/unit\"\n - \ }\n }\n },\n \"type_spatial\": {\n \"type\": \"string\",\n - \ \"const\": \"spatial\"\n },\n \"axis_xy\": {\n \"type\": - \"string\",\n \"enum\": [\n \"x\",\n \"y\"\n ]\n },\n - \ \"axis_z\": {\n \"type\": \"string\",\n \"const\": \"z\"\n },\n - \ \"extent_closed\": {\n \"type\": \"array\",\n \"minItems\": + [\n \"string\",\n \"number\",\n \"null\"\n + \ ]\n }\n },\n \"unit\": {\n \"$ref\": + \"#/definitions/unit\"\n }\n }\n },\n \"type_spatial\": + {\n \"type\": \"string\",\n \"const\": \"spatial\"\n },\n \"axis_xy\": + {\n \"type\": \"string\",\n \"enum\": [\n \"x\",\n \"y\"\n + \ ]\n },\n \"axis_z\": {\n \"type\": \"string\",\n \"const\": + \"z\"\n },\n \"extent_closed\": {\n \"type\": \"array\",\n \"minItems\": 2,\n \"maxItems\": 2,\n \"items\": {\n \"type\": \"number\"\n \ }\n },\n \"extent_open\": {\n \"type\": \"array\",\n \"minItems\": 2,\n \"maxItems\": 2,\n \"items\": {\n \"type\": [\n \"number\",\n @@ -168,28 +193,31 @@ interactions: \"string\"\n }\n ]\n }\n },\n \"step\": {\n \"type\": [\n \"number\",\n \"null\"\n ]\n },\n \"unit\": {\n \ \"type\": \"string\"\n },\n \"reference_system_spatial\": {\n - \ \"type\": [\n \"string\",\n \"number\",\n \"object\"\n - \ ],\n \"default\": 4326\n },\n \"description\": {\n \"type\": - \"string\"\n }\n }\n}" + \ \"oneOf\": [\n {\n \"description\": \"WKT2\",\n \"type\": + \"string\"\n },\n {\n \"description\": \"EPSG code\",\n + \ \"type\": \"integer\",\n \"minimum\": 0\n },\n {\n + \ \"$ref\": \"https://proj.org/schemas/v0.4/projjson.schema.json\"\n + \ }\n ],\n \"default\": 4326\n },\n \"description\": + {\n \"type\": \"string\"\n }\n }\n}\n" headers: Accept-Ranges: - bytes Access-Control-Allow-Origin: - '*' Age: - - '502' + - '0' Cache-Control: - max-age=600 Connection: - close Content-Length: - - '11920' + - '13997' Content-Type: - application/json; charset=utf-8 Date: - - Wed, 27 Sep 2023 21:20:29 GMT + - Wed, 18 Oct 2023 22:03:18 GMT ETag: - - '"64527b1d-2e90"' + - '"64527b1d-36ad"' Last-Modified: - Wed, 03 May 2023 15:17:49 GMT Server: @@ -201,19 +229,19 @@ interactions: Via: - 1.1 varnish X-Cache: - - HIT + - MISS X-Cache-Hits: - - '1' + - '0' X-Fastly-Request-ID: - - a916a13ac9747497c6458923c0fee30f1beaa65a + - a528b2c99f71fd30aed4eb761103eb59ccb459ef X-GitHub-Request-Id: - - AAC6:3224:2D88AB:3D9637:65149AA7 + - F256:2098:FF3D8:146C4D:65305625 X-Served-By: - - cache-lga21962-LGA + - cache-den8269-DEN X-Timer: - - S1695849629.262982,VS0,VE1 + - S1697666599.614503,VS0,VE63 expires: - - Wed, 27 Sep 2023 21:22:07 GMT + - Wed, 18 Oct 2023 22:13:18 GMT permissions-policy: - interest-cohort=() x-proxy-cache: @@ -221,4 +249,585 @@ interactions: status: code: 200 message: OK +- request: + body: null + headers: + Connection: + - close + Host: + - proj.org + User-Agent: + - Python-urllib/3.11 + method: GET + uri: https://proj.org/schemas/v0.4/projjson.schema.json + response: + body: + string: '' + headers: + CDN-Cache-Control: + - public + CF-Cache-Status: + - MISS + CF-Ray: + - 818412137d04520c-DEN + Cache-Control: + - max-age=1200 + Connection: + - close + Content-Language: + - en + Content-Length: + - '0' + Content-Type: + - text/html; charset=utf-8 + Cross-Origin-Opener-Policy: + - same-origin + Date: + - Wed, 18 Oct 2023 22:03:19 GMT + Location: + - https://proj.org/en/9.3/schemas/v0.4/projjson.schema.json + Referrer-Policy: + - no-referrer-when-downgrade + Server: + - cloudflare + Vary: + - Accept-Language, Cookie, Accept-Encoding + X-Backend: + - web-i-0786f8752dd181c0f + X-Content-Type-Options: + - nosniff + X-RTD-Domain: + - proj.org + X-RTD-Project: + - osgeo-proj + X-RTD-Project-Method: + - custom_domain + X-RTD-Redirect: + - user + X-RTD-Version-Method: + - path + X-Served: + - Proxito-404 + alt-svc: + - h3=":443"; ma=86400 + status: + code: 302 + message: Found +- request: + body: null + headers: + Connection: + - close + Host: + - proj.org + User-Agent: + - Python-urllib/3.11 + method: GET + uri: https://proj.org/en/9.3/schemas/v0.4/projjson.schema.json + response: + body: + string: "{\n \"$id\": \"https://proj.org/schemas/v0.4/projjson.schema.json\",\n + \ \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n \"description\": + \"Schema for PROJJSON (v0.4)\",\n \"$comment\": \"This file exists both in + data/ and in schemas/vXXX/. Keep both in sync. And if changing the value of + $id, change PROJJSON_CURRENT_VERSION accordingly in io.cpp\",\n\n \"oneOf\": + [\n { \"$ref\": \"#/definitions/crs\" },\n { \"$ref\": \"#/definitions/datum\" + },\n { \"$ref\": \"#/definitions/datum_ensemble\" },\n { \"$ref\": \"#/definitions/ellipsoid\" + },\n { \"$ref\": \"#/definitions/prime_meridian\" },\n { \"$ref\": \"#/definitions/single_operation\" + },\n { \"$ref\": \"#/definitions/concatenated_operation\" }\n ],\n\n \"definitions\": + {\n\n \"abridged_transformation\": {\n \"type\": \"object\",\n \"properties\": + {\n \"$schema\" : { \"type\": \"string\" },\n \"type\": { \"type\": + \"string\", \"enum\": [\"AbridgedTransformation\"] },\n \"name\": { + \"type\": \"string\" },\n \"method\": { \"$ref\": \"#/definitions/method\" + },\n \"parameters\": {\n \"type\": \"array\",\n \"items\": + { \"$ref\": \"#/definitions/parameter_value\" }\n },\n \"id\": + { \"$ref\": \"#/definitions/id\" },\n \"ids\": { \"$ref\": \"#/definitions/ids\" + }\n },\n \"required\" : [ \"name\", \"method\", \"parameters\" ],\n + \ \"allOf\": [\n { \"$ref\": \"#/definitions/id_ids_mutually_exclusive\" + }\n ],\n \"additionalProperties\": false\n },\n\n \"axis\": + {\n \"type\": \"object\",\n \"properties\": {\n \"$schema\" + : { \"type\": \"string\" },\n \"type\": { \"type\": \"string\", \"enum\": + [\"Axis\"] },\n \"name\": { \"type\": \"string\" },\n \"abbreviation\": + { \"type\": \"string\" },\n \"direction\": { \"type\": \"string\",\n + \ \"enum\": [ \"north\",\n \"northNorthEast\",\n + \ \"northEast\",\n \"eastNorthEast\",\n + \ \"east\",\n \"eastSouthEast\",\n + \ \"southEast\",\n \"southSouthEast\",\n + \ \"south\",\n \"southSouthWest\",\n + \ \"southWest\",\n \"westSouthWest\",\n + \ \"west\",\n \"westNorthWest\",\n + \ \"northWest\",\n \"northNorthWest\",\n + \ \"up\",\n \"down\",\n + \ \"geocentricX\",\n \"geocentricY\",\n + \ \"geocentricZ\",\n \"columnPositive\",\n + \ \"columnNegative\",\n \"rowPositive\",\n + \ \"rowNegative\",\n \"displayRight\",\n + \ \"displayLeft\",\n \"displayUp\",\n + \ \"displayDown\",\n \"forward\",\n + \ \"aft\",\n \"port\",\n + \ \"starboard\",\n \"clockwise\",\n + \ \"counterClockwise\",\n \"towards\",\n + \ \"awayFrom\",\n \"future\",\n + \ \"past\",\n \"unspecified\" + ] },\n \"unit\": { \"$ref\": \"#/definitions/unit\" },\n \"id\": + { \"$ref\": \"#/definitions/id\" },\n \"ids\": { \"$ref\": \"#/definitions/ids\" + }\n },\n \"required\" : [ \"name\", \"abbreviation\", \"direction\" + ],\n \"allOf\": [\n { \"$ref\": \"#/definitions/id_ids_mutually_exclusive\" + }\n ],\n \"additionalProperties\": false\n },\n\n \"bbox\": + {\n \"type\": \"object\",\n \"properties\": {\n \"east_longitude\": + { \"type\": \"number\" },\n \"west_longitude\": { \"type\": \"number\" + },\n \"south_latitude\": { \"type\": \"number\" },\n \"north_latitude\": + { \"type\": \"number\" }\n },\n \"required\" : [ \"east_longitude\", + \"west_longitude\",\n \"south_latitude\", \"north_latitude\" + ],\n \"additionalProperties\": false\n },\n\n \"bound_crs\": {\n + \ \"type\": \"object\",\n \"allOf\": [{ \"$ref\": \"#/definitions/object_usage\" + }],\n \"properties\": {\n \"$schema\" : { \"type\": \"string\" + },\n \"type\": { \"type\": \"string\", \"enum\": [\"BoundCRS\"] },\n + \ \"name\": { \"type\": \"string\" },\n \"source_crs\": { \"$ref\": + \"#/definitions/crs\" },\n \"target_crs\": { \"$ref\": \"#/definitions/crs\" + },\n \"transformation\": { \"$ref\": \"#/definitions/abridged_transformation\" + },\n \"scope\": {},\n \"area\": {},\n \"bbox\": {},\n + \ \"usages\": {},\n \"remarks\": {},\n \"id\": {}, \"ids\": + {}\n },\n \"required\" : [ \"source_crs\", \"target_crs\", \"transformation\" + ],\n \"additionalProperties\": false\n },\n\n \"compound_crs\": + {\n \"type\": \"object\",\n \"allOf\": [{ \"$ref\": \"#/definitions/object_usage\" + }],\n \"properties\": {\n \"type\": { \"type\": \"string\", \"enum\": + [\"CompoundCRS\"] },\n \"name\": { \"type\": \"string\" },\n \"components\": + \ {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/definitions/crs\" + }\n },\n \"$schema\" : {},\n \"scope\": {},\n \"area\": + {},\n \"bbox\": {},\n \"usages\": {},\n \"remarks\": + {},\n \"id\": {}, \"ids\": {}\n },\n \"required\" : [ \"name\", + \"components\" ],\n \"additionalProperties\": false\n },\n\n \"concatenated_operation\": + {\n \"type\": \"object\",\n \"allOf\": [{ \"$ref\": \"#/definitions/object_usage\" + }],\n \"properties\": {\n \"type\": { \"type\": \"string\", \"enum\": + [\"ConcatenatedOperation\"] },\n \"name\": { \"type\": \"string\" },\n + \ \"source_crs\": { \"$ref\": \"#/definitions/crs\" },\n \"target_crs\": + { \"$ref\": \"#/definitions/crs\" },\n \"steps\": {\n \"type\": + \"array\",\n \"items\": { \"$ref\": \"#/definitions/single_operation\" + }\n },\n \"$schema\" : {},\n \"scope\": {},\n \"area\": + {},\n \"bbox\": {},\n \"usages\": {},\n \"remarks\": + {},\n \"id\": {}, \"ids\": {}\n },\n \"required\" : [ \"name\", + \"source_crs\", \"target_crs\", \"steps\" ],\n \"additionalProperties\": + false\n },\n\n \"conversion\": {\n \"type\": \"object\",\n \"properties\": + {\n \"$schema\" : { \"type\": \"string\" },\n \"type\": { \"type\": + \"string\", \"enum\": [\"Conversion\"] },\n \"name\": { \"type\": \"string\" + },\n \"method\": { \"$ref\": \"#/definitions/method\" },\n \"parameters\": + {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/definitions/parameter_value\" + }\n },\n \"id\": { \"$ref\": \"#/definitions/id\" },\n \"ids\": + { \"$ref\": \"#/definitions/ids\" }\n },\n \"required\" : [ \"name\", + \"method\" ],\n \"allOf\": [\n { \"$ref\": \"#/definitions/id_ids_mutually_exclusive\" + }\n ],\n \"additionalProperties\": false\n },\n\n \"coordinate_system\": + {\n \"type\": \"object\",\n \"properties\": {\n \"$schema\" + : { \"type\": \"string\" },\n \"type\": { \"type\": \"string\", \"enum\": + [\"CoordinateSystem\"] },\n \"name\": { \"type\": \"string\" },\n \"subtype\": + { \"type\": \"string\",\n \"enum\": [\"Cartesian\",\n + \ \"spherical\",\n \"ellipsoidal\",\n + \ \"vertical\",\n \"ordinal\",\n + \ \"parametric\",\n \"TemporalDateTime\",\n + \ \"TemporalCount\",\n \"TemporalMeasure\"] + \ },\n \"axis\": {\n \"type\": \"array\",\n \"items\": + { \"$ref\": \"#/definitions/axis\" }\n },\n \"id\": { \"$ref\": + \"#/definitions/id\" },\n \"ids\": { \"$ref\": \"#/definitions/ids\" + }\n },\n \"required\" : [ \"subtype\", \"axis\" ],\n \"allOf\": + [\n { \"$ref\": \"#/definitions/id_ids_mutually_exclusive\" }\n ],\n + \ \"additionalProperties\": false\n },\n\n \"crs\": {\n \"oneOf\": + [\n { \"$ref\": \"#/definitions/bound_crs\" },\n { \"$ref\": + \"#/definitions/compound_crs\" },\n { \"$ref\": \"#/definitions/derived_engineering_crs\" + },\n { \"$ref\": \"#/definitions/derived_geodetic_crs\" },\n { + \"$ref\": \"#/definitions/derived_parametric_crs\" },\n { \"$ref\": + \"#/definitions/derived_projected_crs\" },\n { \"$ref\": \"#/definitions/derived_temporal_crs\" + },\n { \"$ref\": \"#/definitions/derived_vertical_crs\" },\n { + \"$ref\": \"#/definitions/engineering_crs\" },\n { \"$ref\": \"#/definitions/geodetic_crs\" + },\n { \"$ref\": \"#/definitions/parametric_crs\" },\n { \"$ref\": + \"#/definitions/projected_crs\" },\n { \"$ref\": \"#/definitions/temporal_crs\" + },\n { \"$ref\": \"#/definitions/vertical_crs\" }\n ]\n },\n\n + \ \"datum\": {\n \"oneOf\": [\n { \"$ref\": \"#/definitions/geodetic_reference_frame\" + },\n { \"$ref\": \"#/definitions/vertical_reference_frame\" },\n { + \"$ref\": \"#/definitions/dynamic_geodetic_reference_frame\" },\n { + \"$ref\": \"#/definitions/dynamic_vertical_reference_frame\" },\n { + \"$ref\": \"#/definitions/temporal_datum\" },\n { \"$ref\": \"#/definitions/parametric_datum\" + },\n { \"$ref\": \"#/definitions/engineering_datum\" }\n ]\n },\n\n + \ \"datum_ensemble\": {\n \"type\": \"object\",\n \"properties\": + {\n \"$schema\" : { \"type\": \"string\" },\n \"type\": { \"type\": + \"string\", \"enum\": [\"DatumEnsemble\"] },\n \"name\": { \"type\": + \"string\" },\n \"members\": {\n \"type\": \"array\",\n + \ \"items\": {\n \"type\": \"object\",\n \"properties\": + {\n \"name\": { \"type\": \"string\" },\n \"id\": + { \"$ref\": \"#/definitions/id\" },\n \"ids\": { \"$ref\": + \"#/definitions/ids\" }\n },\n \"required\" + : [ \"name\" ],\n \"allOf\": [\n { \"$ref\": + \"#/definitions/id_ids_mutually_exclusive\" }\n ],\n \"additionalProperties\": + false\n }\n },\n \"ellipsoid\": { \"$ref\": \"#/definitions/ellipsoid\" + },\n \"accuracy\": { \"type\": \"string\" },\n \"id\": { \"$ref\": + \"#/definitions/id\" },\n \"ids\": { \"$ref\": \"#/definitions/ids\" + }\n },\n \"required\" : [ \"name\", \"members\", \"accuracy\" ],\n + \ \"allOf\": [\n { \"$ref\": \"#/definitions/id_ids_mutually_exclusive\" + }\n ],\n \"additionalProperties\": false\n },\n\n \"derived_engineering_crs\": + {\n \"type\": \"object\",\n \"allOf\": [{ \"$ref\": \"#/definitions/object_usage\" + }],\n \"properties\": {\n \"type\": { \"type\": \"string\",\n + \ \"enum\": [\"DerivedEngineeringCRS\"] },\n \"name\": + { \"type\": \"string\" },\n \"base_crs\": { \"$ref\": \"#/definitions/engineering_crs\" + },\n \"conversion\": { \"$ref\": \"#/definitions/conversion\" },\n + \ \"coordinate_system\": { \"$ref\": \"#/definitions/coordinate_system\" + },\n \"$schema\" : {},\n \"scope\": {},\n \"area\": {},\n + \ \"bbox\": {},\n \"usages\": {},\n \"remarks\": {},\n + \ \"id\": {}, \"ids\": {}\n },\n \"required\" : [ \"name\", + \"base_crs\", \"conversion\", \"coordinate_system\" ],\n \"additionalProperties\": + false\n },\n\n \"derived_geodetic_crs\": {\n \"type\": \"object\",\n + \ \"allOf\": [{ \"$ref\": \"#/definitions/object_usage\" }],\n \"properties\": + {\n \"type\": { \"type\": \"string\",\n \"enum\": + [\"DerivedGeodeticCRS\",\n \"DerivedGeographicCRS\"] + },\n \"name\": { \"type\": \"string\" },\n \"base_crs\": { \"$ref\": + \"#/definitions/geodetic_crs\" },\n \"conversion\": { \"$ref\": \"#/definitions/conversion\" + },\n \"coordinate_system\": { \"$ref\": \"#/definitions/coordinate_system\" + },\n \"$schema\" : {},\n \"scope\": {},\n \"area\": {},\n + \ \"bbox\": {},\n \"usages\": {},\n \"remarks\": {},\n + \ \"id\": {}, \"ids\": {}\n },\n \"required\" : [ \"name\", + \"base_crs\", \"conversion\", \"coordinate_system\" ],\n \"additionalProperties\": + false\n },\n\n \"derived_parametric_crs\": {\n \"type\": \"object\",\n + \ \"allOf\": [{ \"$ref\": \"#/definitions/object_usage\" }],\n \"properties\": + {\n \"type\": { \"type\": \"string\",\n \"enum\": + [\"DerivedParametricCRS\"] },\n \"name\": { \"type\": \"string\" },\n + \ \"base_crs\": { \"$ref\": \"#/definitions/parametric_crs\" },\n \"conversion\": + { \"$ref\": \"#/definitions/conversion\" },\n \"coordinate_system\": + { \"$ref\": \"#/definitions/coordinate_system\" },\n \"$schema\" : + {},\n \"scope\": {},\n \"area\": {},\n \"bbox\": {},\n + \ \"usages\": {},\n \"remarks\": {},\n \"id\": {}, \"ids\": + {}\n },\n \"required\" : [ \"name\", \"base_crs\", \"conversion\", + \"coordinate_system\" ],\n \"additionalProperties\": false\n },\n\n + \ \"derived_projected_crs\": {\n \"type\": \"object\",\n \"allOf\": + [{ \"$ref\": \"#/definitions/object_usage\" }],\n \"properties\": {\n + \ \"type\": { \"type\": \"string\",\n \"enum\": [\"DerivedProjectedCRS\"] + },\n \"name\": { \"type\": \"string\" },\n \"base_crs\": { \"$ref\": + \"#/definitions/projected_crs\" },\n \"conversion\": { \"$ref\": \"#/definitions/conversion\" + },\n \"coordinate_system\": { \"$ref\": \"#/definitions/coordinate_system\" + },\n \"$schema\" : {},\n \"scope\": {},\n \"area\": {},\n + \ \"bbox\": {},\n \"usages\": {},\n \"remarks\": {},\n + \ \"id\": {}, \"ids\": {}\n },\n \"required\" : [ \"name\", + \"base_crs\", \"conversion\", \"coordinate_system\" ],\n \"additionalProperties\": + false\n },\n\n \"derived_temporal_crs\": {\n \"type\": \"object\",\n + \ \"allOf\": [{ \"$ref\": \"#/definitions/object_usage\" }],\n \"properties\": + {\n \"type\": { \"type\": \"string\",\n \"enum\": + [\"DerivedTemporalCRS\"] },\n \"name\": { \"type\": \"string\" },\n + \ \"base_crs\": { \"$ref\": \"#/definitions/temporal_crs\" },\n \"conversion\": + { \"$ref\": \"#/definitions/conversion\" },\n \"coordinate_system\": + { \"$ref\": \"#/definitions/coordinate_system\" },\n \"$schema\" : + {},\n \"scope\": {},\n \"area\": {},\n \"bbox\": {},\n + \ \"usages\": {},\n \"remarks\": {},\n \"id\": {}, \"ids\": + {}\n },\n \"required\" : [ \"name\", \"base_crs\", \"conversion\", + \"coordinate_system\" ],\n \"additionalProperties\": false\n },\n\n + \ \"derived_vertical_crs\": {\n \"type\": \"object\",\n \"allOf\": + [{ \"$ref\": \"#/definitions/object_usage\" }],\n \"properties\": {\n + \ \"type\": { \"type\": \"string\",\n \"enum\": [\"DerivedVerticalCRS\"] + },\n \"name\": { \"type\": \"string\" },\n \"base_crs\": { \"$ref\": + \"#/definitions/vertical_crs\" },\n \"conversion\": { \"$ref\": \"#/definitions/conversion\" + },\n \"coordinate_system\": { \"$ref\": \"#/definitions/coordinate_system\" + },\n \"$schema\" : {},\n \"scope\": {},\n \"area\": {},\n + \ \"bbox\": {},\n \"usages\": {},\n \"remarks\": {},\n + \ \"id\": {}, \"ids\": {}\n },\n \"required\" : [ \"name\", + \"base_crs\", \"conversion\", \"coordinate_system\" ],\n \"additionalProperties\": + false\n },\n\n \"dynamic_geodetic_reference_frame\": {\n \"type\": + \"object\",\n \"allOf\": [{ \"$ref\": \"#/definitions/geodetic_reference_frame\" + }],\n \"properties\": {\n \"type\": { \"type\": \"string\", \"enum\": + [\"DynamicGeodeticReferenceFrame\"] },\n \"name\": {},\n \"anchor\": + {},\n \"ellipsoid\": {},\n \"prime_meridian\": {},\n \"frame_reference_epoch\": + { \"type\": \"number\" },\n \"deformation_model\": { \"type\": \"string\" + },\n \"$schema\" : {},\n \"scope\": {},\n \"area\": {},\n + \ \"bbox\": {},\n \"usages\": {},\n \"remarks\": {},\n + \ \"id\": {}, \"ids\": {}\n },\n \"required\" : [ \"name\", + \"ellipsoid\", \"frame_reference_epoch\" ],\n \"additionalProperties\": + false\n },\n\n \"dynamic_vertical_reference_frame\": {\n \"type\": + \"object\",\n \"allOf\": [{ \"$ref\": \"#/definitions/vertical_reference_frame\" + }],\n \"properties\": {\n \"type\": { \"type\": \"string\", \"enum\": + [\"DynamicVerticalReferenceFrame\"] },\n \"name\": {},\n \"anchor\": + {},\n \"frame_reference_epoch\": { \"type\": \"number\" },\n \"deformation_model\": + { \"type\": \"string\" },\n \"$schema\" : {},\n \"scope\": {},\n + \ \"area\": {},\n \"bbox\": {},\n \"usages\": {},\n \"remarks\": + {},\n \"id\": {}, \"ids\": {}\n },\n \"required\" : [ \"name\", + \"frame_reference_epoch\" ],\n \"additionalProperties\": false\n },\n\n + \ \"ellipsoid\": {\n \"type\": \"object\",\n \"oneOf\":[\n {\n + \ \"properties\": {\n \"$schema\" : { \"type\": \"string\" + },\n \"type\": { \"type\": \"string\", \"enum\": [\"Ellipsoid\"] + },\n \"name\": { \"type\": \"string\" },\n \"semi_major_axis\": + { \"$ref\": \"#/definitions/value_in_metre_or_value_and_unit\" },\n \"semi_minor_axis\": + { \"$ref\": \"#/definitions/value_in_metre_or_value_and_unit\" },\n \"id\": + { \"$ref\": \"#/definitions/id\" },\n \"ids\": { \"$ref\": \"#/definitions/ids\" + }\n },\n \"required\" : [ \"name\", \"semi_major_axis\", + \"semi_minor_axis\" ],\n \"additionalProperties\": false\n },\n + \ {\n \"properties\": {\n \"$schema\" : { \"type\": + \"string\" },\n \"type\": { \"type\": \"string\", \"enum\": [\"Ellipsoid\"] + },\n \"name\": { \"type\": \"string\" },\n \"semi_major_axis\": + { \"$ref\": \"#/definitions/value_in_metre_or_value_and_unit\" },\n \"inverse_flattening\": + { \"type\": \"number\" },\n \"id\": { \"$ref\": \"#/definitions/id\" + },\n \"ids\": { \"$ref\": \"#/definitions/ids\" }\n },\n + \ \"required\" : [ \"name\", \"semi_major_axis\", \"inverse_flattening\" + ],\n \"additionalProperties\": false\n },\n {\n \"properties\": + {\n \"$schema\" : { \"type\": \"string\" },\n \"type\": + { \"type\": \"string\", \"enum\": [\"Ellipsoid\"] },\n \"name\": + { \"type\": \"string\" },\n \"radius\": { \"$ref\": \"#/definitions/value_in_metre_or_value_and_unit\" + },\n \"id\": { \"$ref\": \"#/definitions/id\" },\n \"ids\": + { \"$ref\": \"#/definitions/ids\" }\n },\n \"required\" + : [ \"name\", \"radius\" ],\n \"additionalProperties\": false\n }\n + \ ],\n \"allOf\": [\n { \"$ref\": \"#/definitions/id_ids_mutually_exclusive\" + }\n ]\n },\n\n \"engineering_crs\": {\n \"type\": \"object\",\n + \ \"allOf\": [{ \"$ref\": \"#/definitions/object_usage\" }],\n \"properties\": + {\n \"type\": { \"type\": \"string\", \"enum\": [\"EngineeringCRS\"] + },\n \"name\": { \"type\": \"string\" },\n \"datum\": { \"$ref\": + \"#/definitions/engineering_datum\" },\n \"coordinate_system\": { \"$ref\": + \"#/definitions/coordinate_system\" },\n \"$schema\" : {},\n \"scope\": + {},\n \"area\": {},\n \"bbox\": {},\n \"usages\": {},\n + \ \"remarks\": {},\n \"id\": {}, \"ids\": {}\n },\n \"required\" + : [ \"name\", \"datum\" ],\n \"additionalProperties\": false\n },\n\n + \ \"engineering_datum\": {\n \"type\": \"object\",\n \"allOf\": + [{ \"$ref\": \"#/definitions/object_usage\" }],\n \"properties\": {\n + \ \"type\": { \"type\": \"string\", \"enum\": [\"EngineeringDatum\"] + },\n \"name\": { \"type\": \"string\" },\n \"anchor\": { \"type\": + \"string\" },\n \"$schema\" : {},\n \"scope\": {},\n \"area\": + {},\n \"bbox\": {},\n \"usages\": {},\n \"remarks\": + {},\n \"id\": {}, \"ids\": {}\n },\n \"required\" : [ \"name\" + ],\n \"additionalProperties\": false\n },\n\n \"geodetic_crs\": + {\n \"type\": \"object\",\n \"properties\": {\n \"type\": + { \"type\": \"string\", \"enum\": [\"GeodeticCRS\", \"GeographicCRS\"] },\n + \ \"name\": { \"type\": \"string\" },\n \"datum\": {\n \"oneOf\": + [\n { \"$ref\": \"#/definitions/geodetic_reference_frame\" + },\n { \"$ref\": \"#/definitions/dynamic_geodetic_reference_frame\" + }\n ]\n },\n \"datum_ensemble\": { \"$ref\": \"#/definitions/datum_ensemble\" + },\n \"coordinate_system\": { \"$ref\": \"#/definitions/coordinate_system\" + },\n \"$schema\" : {},\n \"scope\": {},\n \"area\": {},\n + \ \"bbox\": {},\n \"usages\": {},\n \"remarks\": {},\n + \ \"id\": {}, \"ids\": {}\n },\n \"required\" : [ \"name\" + ],\n \"description\": \"One and only one of datum and datum_ensemble + must be provided\",\n \"allOf\": [\n { \"$ref\": \"#/definitions/object_usage\" + },\n { \"$ref\": \"#/definitions/one_and_only_one_of_datum_or_datum_ensemble\" + }\n ],\n \"additionalProperties\": false\n },\n\n \"geodetic_reference_frame\": + {\n \"type\": \"object\",\n \"allOf\": [{ \"$ref\": \"#/definitions/object_usage\" + }],\n \"properties\": {\n \"type\": { \"type\": \"string\", \"enum\": + [\"GeodeticReferenceFrame\"] },\n \"name\": { \"type\": \"string\" + },\n \"anchor\": { \"type\": \"string\" },\n \"ellipsoid\": + { \"$ref\": \"#/definitions/ellipsoid\" },\n \"prime_meridian\": { + \"$ref\": \"#/definitions/prime_meridian\" },\n \"$schema\" : {},\n + \ \"scope\": {},\n \"area\": {},\n \"bbox\": {},\n \"usages\": + {},\n \"remarks\": {},\n \"id\": {}, \"ids\": {}\n },\n + \ \"required\" : [ \"name\", \"ellipsoid\" ],\n \"additionalProperties\": + false\n },\n\n \"id\": {\n \"type\": \"object\",\n \"properties\": + {\n \"authority\": { \"type\": \"string\" },\n \"code\": {\n + \ \"oneOf\": [ { \"type\": \"string\" }, { \"type\": \"integer\" } + ]\n },\n \"version\": {\n \"oneOf\": [ { \"type\": + \"string\" }, { \"type\": \"number\" } ]\n },\n \"authority_citation\": + { \"type\": \"string\" },\n \"uri\": { \"type\": \"string\" }\n },\n + \ \"required\" : [ \"authority\", \"code\" ],\n \"additionalProperties\": + false\n },\n\n \"ids\": {\n \"type\": \"array\",\n \"items\": + { \"$ref\": \"#/definitions/id\" }\n },\n\n \"method\": {\n \"type\": + \"object\",\n \"properties\": {\n \"$schema\" : { \"type\": \"string\" + },\n \"type\": { \"type\": \"string\", \"enum\": [\"OperationMethod\"]},\n + \ \"name\": { \"type\": \"string\" },\n \"id\": { \"$ref\": \"#/definitions/id\" + },\n \"ids\": { \"$ref\": \"#/definitions/ids\" }\n },\n \"required\" + : [ \"name\" ],\n \"allOf\": [\n { \"$ref\": \"#/definitions/id_ids_mutually_exclusive\" + }\n ],\n \"additionalProperties\": false\n },\n\n \"id_ids_mutually_exclusive\": + {\n \"not\": {\n \"type\": \"object\",\n \"required\": + [ \"id\", \"ids\" ]\n }\n },\n\n \"one_and_only_one_of_datum_or_datum_ensemble\": + {\n \"allOf\": [\n {\n \"not\": {\n \"type\": + \"object\",\n \"required\": [ \"datum\", \"datum_ensemble\" + ]\n }\n },\n {\n \"oneOf\": [\n { + \"type\": \"object\", \"required\": [\"datum\"] },\n { \"type\": + \"object\", \"required\": [\"datum_ensemble\"] }\n ]\n }\n + \ ]\n },\n\n \"object_usage\": {\n \"anyOf\": [\n {\n + \ \"type\": \"object\",\n \"properties\": {\n \"$schema\" + : { \"type\": \"string\" },\n \"scope\": { \"type\": \"string\" + },\n \"area\": { \"type\": \"string\" },\n \"bbox\": + { \"$ref\": \"#/definitions/bbox\" },\n \"remarks\": { \"type\": + \"string\" },\n \"id\": { \"$ref\": \"#/definitions/id\" },\n \"ids\": + { \"$ref\": \"#/definitions/ids\" }\n },\n \"allOf\": [\n { + \"$ref\": \"#/definitions/id_ids_mutually_exclusive\" }\n ]\n },\n + \ {\n \"type\": \"object\",\n \"properties\": {\n \"$schema\" + : { \"type\": \"string\" },\n \"usages\": { \"$ref\": \"#/definitions/usages\" + },\n \"remarks\": { \"type\": \"string\" },\n \"id\": + { \"$ref\": \"#/definitions/id\" },\n \"ids\": { \"$ref\": \"#/definitions/ids\" + }\n },\n \"allOf\": [\n { \"$ref\": \"#/definitions/id_ids_mutually_exclusive\" + }\n ]\n }\n ]\n },\n\n \"parameter_value\": {\n \"type\": + \"object\",\n \"properties\": {\n \"$schema\" : { \"type\": \"string\" + },\n \"type\": { \"type\": \"string\", \"enum\": [\"ParameterValue\"] + },\n \"name\": { \"type\": \"string\" },\n \"value\": {\n \"oneOf\": + [\n { \"type\": \"string\" },\n { \"type\": \"number\" + }\n ]\n },\n \"unit\": { \"$ref\": \"#/definitions/unit\" + },\n \"id\": { \"$ref\": \"#/definitions/id\" },\n \"ids\": + { \"$ref\": \"#/definitions/ids\" }\n },\n \"required\" : [ \"name\", + \"value\" ],\n \"allOf\": [\n { \"$ref\": \"#/definitions/id_ids_mutually_exclusive\" + }\n ],\n \"additionalProperties\": false\n },\n\n \"parametric_crs\": + {\n \"type\": \"object\",\n \"allOf\": [{ \"$ref\": \"#/definitions/object_usage\" + }],\n \"properties\": {\n \"type\": { \"type\": \"string\", \"enum\": + [\"ParametricCRS\"] },\n \"name\": { \"type\": \"string\" },\n \"datum\": + { \"$ref\": \"#/definitions/parametric_datum\" },\n \"coordinate_system\": + { \"$ref\": \"#/definitions/coordinate_system\" },\n \"$schema\" : + {},\n \"scope\": {},\n \"area\": {},\n \"bbox\": {},\n + \ \"usages\": {},\n \"remarks\": {},\n \"id\": {}, \"ids\": + {}\n },\n \"required\" : [ \"name\", \"datum\" ],\n \"additionalProperties\": + false\n },\n\n \"parametric_datum\": {\n \"type\": \"object\",\n + \ \"allOf\": [{ \"$ref\": \"#/definitions/object_usage\" }],\n \"properties\": + {\n \"type\": { \"type\": \"string\", \"enum\": [\"ParametricDatum\"] + },\n \"name\": { \"type\": \"string\" },\n \"anchor\": { \"type\": + \"string\" },\n \"$schema\" : {},\n \"scope\": {},\n \"area\": + {},\n \"bbox\": {},\n \"usages\": {},\n \"remarks\": + {},\n \"id\": {}, \"ids\": {}\n },\n \"required\" : [ \"name\" + ],\n \"additionalProperties\": false\n },\n\n \"prime_meridian\": + {\n \"type\": \"object\",\n \"properties\": {\n \"$schema\" + : { \"type\": \"string\" },\n \"type\": { \"type\": \"string\", \"enum\": + [\"PrimeMeridian\"] },\n \"name\": { \"type\": \"string\" },\n \"longitude\": + { \"$ref\": \"#/definitions/value_in_degree_or_value_and_unit\" },\n \"id\": + { \"$ref\": \"#/definitions/id\" },\n \"ids\": { \"$ref\": \"#/definitions/ids\" + }\n },\n \"required\" : [ \"name\" ],\n \"allOf\": [\n { + \"$ref\": \"#/definitions/id_ids_mutually_exclusive\" }\n ],\n \"additionalProperties\": + false\n },\n\n \"single_operation\": {\n \"oneOf\": [\n { + \"$ref\": \"#/definitions/conversion\" },\n { \"$ref\": \"#/definitions/transformation\" + }\n ]\n },\n\n \"projected_crs\": {\n \"type\": \"object\",\n + \ \"allOf\": [{ \"$ref\": \"#/definitions/object_usage\" }],\n \"properties\": + {\n \"type\": { \"type\": \"string\",\n \"enum\": + [\"ProjectedCRS\"] },\n \"name\": { \"type\": \"string\" },\n \"base_crs\": + { \"$ref\": \"#/definitions/geodetic_crs\" },\n \"conversion\": { \"$ref\": + \"#/definitions/conversion\" },\n \"coordinate_system\": { \"$ref\": + \"#/definitions/coordinate_system\" },\n \"$schema\" : {},\n \"scope\": + {},\n \"area\": {},\n \"bbox\": {},\n \"usages\": {},\n + \ \"remarks\": {},\n \"id\": {}, \"ids\": {}\n },\n \"required\" + : [ \"name\", \"base_crs\", \"conversion\", \"coordinate_system\" ],\n \"additionalProperties\": + false\n },\n\n \"temporal_crs\": {\n \"type\": \"object\",\n \"allOf\": + [{ \"$ref\": \"#/definitions/object_usage\" }],\n \"properties\": {\n + \ \"type\": { \"type\": \"string\", \"enum\": [\"TemporalCRS\"] },\n + \ \"name\": { \"type\": \"string\" },\n \"datum\": { \"$ref\": + \"#/definitions/temporal_datum\" },\n \"coordinate_system\": { \"$ref\": + \"#/definitions/coordinate_system\" },\n \"$schema\" : {},\n \"scope\": + {},\n \"area\": {},\n \"bbox\": {},\n \"usages\": {},\n + \ \"remarks\": {},\n \"id\": {}, \"ids\": {}\n },\n \"required\" + : [ \"name\", \"datum\" ],\n \"additionalProperties\": false\n },\n\n + \ \"temporal_datum\": {\n \"type\": \"object\",\n \"allOf\": [{ + \"$ref\": \"#/definitions/object_usage\" }],\n \"properties\": {\n \"type\": + { \"type\": \"string\", \"enum\": [\"TemporalDatum\"] },\n \"name\": + { \"type\": \"string\" },\n \"calendar\": { \"type\": \"string\" },\n + \ \"time_origin\": { \"type\": \"string\" },\n \"$schema\" : + {},\n \"scope\": {},\n \"area\": {},\n \"bbox\": {},\n + \ \"usages\": {},\n \"remarks\": {},\n \"id\": {}, \"ids\": + {}\n },\n \"required\" : [ \"name\", \"calendar\" ],\n \"additionalProperties\": + false\n },\n\n \"transformation\": {\n \"type\": \"object\",\n + \ \"allOf\": [{ \"$ref\": \"#/definitions/object_usage\" }],\n \"properties\": + {\n \"type\": { \"type\": \"string\", \"enum\": [\"Transformation\"] + },\n \"name\": { \"type\": \"string\" },\n \"source_crs\": { + \"$ref\": \"#/definitions/crs\" },\n \"target_crs\": { \"$ref\": \"#/definitions/crs\" + },\n \"interpolation_crs\": { \"$ref\": \"#/definitions/crs\" },\n + \ \"method\": { \"$ref\": \"#/definitions/method\" },\n \"parameters\": + {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/definitions/parameter_value\" + }\n },\n \"accuracy\": { \"type\": \"string\" },\n \"$schema\" + : {},\n \"scope\": {},\n \"area\": {},\n \"bbox\": {},\n + \ \"usages\": {},\n \"remarks\": {},\n \"id\": {}, \"ids\": + {}\n },\n \"required\" : [ \"name\", \"source_crs\", \"target_crs\", + \"method\", \"parameters\" ],\n \"additionalProperties\": false\n },\n\n + \ \"unit\": {\n \"oneOf\": [\n {\n \"type\": \"string\",\n + \ \"enum\": [\"metre\", \"degree\", \"unity\"]\n },\n {\n + \ \"type\": \"object\",\n \"properties\": {\n \"type\": + { \"type\": \"string\",\n \"enum\": [\"LinearUnit\", \"AngularUnit\", + \"ScaleUnit\",\n \"TimeUnit\", \"ParametricUnit\", + \"Unit\"] },\n \"name\": { \"type\": \"string\" },\n \"conversion_factor\": + { \"type\": \"number\" },\n \"id\": { \"$ref\": \"#/definitions/id\" + },\n \"ids\": { \"$ref\": \"#/definitions/ids\" }\n },\n + \ \"required\" : [ \"type\", \"name\" ],\n \"allOf\": [\n { + \"$ref\": \"#/definitions/id_ids_mutually_exclusive\" }\n ],\n \"additionalProperties\": + false\n }\n ]\n },\n\n \"usages\": {\n \"type\": \"array\",\n + \ \"items\": {\n \"type\": \"object\",\n \"properties\": + {\n \"scope\": { \"type\": \"string\" },\n \"area\": + { \"type\": \"string\" },\n \"bbox\": { \"$ref\": \"#/definitions/bbox\" + }\n },\n \"additionalProperties\": false\n }\n },\n\n + \ \"value_and_unit\": {\n \"type\": \"object\",\n \"properties\": + {\n \"value\": { \"type\": \"number\" },\n \"unit\": { \"$ref\": + \"#/definitions/unit\" }\n },\n \"required\" : [ \"value\", \"unit\" + ],\n \"additionalProperties\": false\n },\n\n \"value_in_degree_or_value_and_unit\": + {\n \"oneOf\": [\n { \"type\": \"number\" },\n { \"$ref\": + \"#/definitions/value_and_unit\" }\n ]\n },\n\n \"value_in_metre_or_value_and_unit\": + {\n \"oneOf\": [\n { \"type\": \"number\" },\n { \"$ref\": + \"#/definitions/value_and_unit\" }\n ]\n },\n\n \"vertical_crs\": + {\n \"type\": \"object\",\n \"properties\": {\n \"type\": + { \"type\": \"string\", \"enum\": [\"VerticalCRS\"] },\n \"name\": + { \"type\": \"string\" },\n \"datum\": {\n \"oneOf\": [\n + \ { \"$ref\": \"#/definitions/vertical_reference_frame\" },\n + \ { \"$ref\": \"#/definitions/dynamic_vertical_reference_frame\" + }\n ]\n },\n \"datum_ensemble\": { \"$ref\": \"#/definitions/datum_ensemble\" + },\n \"coordinate_system\": { \"$ref\": \"#/definitions/coordinate_system\" + },\n \"geoid_model\": {\n \"type\": \"object\",\n \"properties\": + {\n \"name\": { \"type\": \"string\" },\n \"interpolation_crs\": + { \"$ref\": \"#/definitions/crs\" },\n \"id\": { \"$ref\": \"#/definitions/id\" + }\n },\n \"required\" : [ \"name\" ],\n \"additionalProperties\": + false\n },\n \"$schema\" : {},\n \"scope\": {},\n \"area\": + {},\n \"bbox\": {},\n \"usages\": {},\n \"remarks\": + {},\n \"id\": {}, \"ids\": {}\n },\n \"required\" : [ \"name\"],\n + \ \"description\": \"One and only one of datum and datum_ensemble must + be provided\",\n \"allOf\": [\n { \"$ref\": \"#/definitions/object_usage\" + },\n { \"$ref\": \"#/definitions/one_and_only_one_of_datum_or_datum_ensemble\" + }\n ],\n \"additionalProperties\": false\n },\n\n \"vertical_reference_frame\": + {\n \"type\": \"object\",\n \"allOf\": [{ \"$ref\": \"#/definitions/object_usage\" + }],\n \"properties\": {\n \"type\": { \"type\": \"string\", \"enum\": + [\"VerticalReferenceFrame\"] },\n \"name\": { \"type\": \"string\" + },\n \"anchor\": { \"type\": \"string\" },\n \"$schema\" : {},\n + \ \"scope\": {},\n \"area\": {},\n \"bbox\": {},\n \"usages\": + {},\n \"remarks\": {},\n \"id\": {}, \"ids\": {}\n },\n + \ \"required\" : [ \"name\" ],\n \"additionalProperties\": false\n + \ }\n\n }\n}\n" + headers: + Access-Control-Allow-Methods: + - HEAD, OPTIONS, GET + Access-Control-Allow-Origin: + - '*' + CDN-Cache-Control: + - public + CF-Cache-Status: + - MISS + CF-Ray: + - 818412159e8e533f-DEN + Cache-Control: + - max-age=1200 + Connection: + - close + Content-Type: + - application/json + Date: + - Wed, 18 Oct 2023 22:03:19 GMT + ETag: + - W/"165f7cf0ab48a343b939bc9bd70e6d5f" + Last-Modified: + - Sun, 03 Sep 2023 09:10:52 GMT + Referrer-Policy: + - no-referrer-when-downgrade + Server: + - cloudflare + Transfer-Encoding: + - chunked + Vary: + - Accept-Encoding + X-Backend: + - web-i-07cbc6c25e6fd4100 + X-Content-Type-Options: + - nosniff + X-RTD-Domain: + - proj.org + X-RTD-Path: + - /proxito/html/osgeo-proj/9.3/schemas/v0.4/projjson.schema.json + X-RTD-Project: + - osgeo-proj + X-RTD-Project-Method: + - custom_domain + X-RTD-Version: + - '9.3' + X-RTD-Version-Method: + - path + X-Served: + - Nginx-Proxito-Sendfile + alt-svc: + - h3=":443"; ma=86400 + x-amz-id-2: + - RfSAk4BHgVGtQTJ4gUvOMaP9RpeT/dChiVkDve0ts8QQN+y9U0TWy3be/P7G+jYy9sni+Vy/p4E= + x-amz-meta-mtime: + - '1693732240.238196845' + x-amz-request-id: + - 8Z0766ERTFWBXDJB + x-amz-server-side-encryption: + - AES256 + status: + code: 200 + message: OK version: 1 diff --git a/tests/extensions/test_datacube.py b/tests/extensions/test_datacube.py index 88ef90545..553e8a473 100644 --- a/tests/extensions/test_datacube.py +++ b/tests/extensions/test_datacube.py @@ -6,7 +6,7 @@ import pystac import pystac.extensions.datacube as dc -from pystac import Item +from pystac import Asset, Item from pystac.errors import ExtensionTypeError from tests.conftest import get_data_file @@ -273,7 +273,7 @@ def test_set_dimensions(ext_item: Item) -> None: assert ext_item.validate() -@pytest.mark.parametrize("version", ["v1.0.0"]) +@pytest.mark.parametrize("version", ["v1.0.0", "v2.0.0", "v2.1.0"]) def test_migrate(version: str, ext_item: Item) -> None: item_dict = ext_item.to_dict(include_self_link=False, transform_hrefs=False) item_dict["stac_extensions"] = [ @@ -281,6 +281,39 @@ def test_migrate(version: str, ext_item: Item) -> None: ] item = Item.from_dict(item_dict, migrate=True) assert ( - "https://stac-extensions.github.io/datacube/v2.0.0/schema.json" + "https://stac-extensions.github.io/datacube/v2.2.0/schema.json" in item.stac_extensions ) + + +def test_asset(item: Item) -> None: + asset = Asset(href="data.tif") + item.add_asset("data", asset) + assert not asset.ext.has("cube") + asset.ext.add("cube") + assert asset.ext.has("cube") + + +def test_spatial_vector_object(item: Item) -> None: + item.ext.add("cube") + vector = dc.VectorSpatialDimension.from_dict( + { + "type": "geometries", + "axes": ["x", "y"], + "description": "A test vector spatial dimension", + "bbox": [-180, -90, 180, 90], + "values": ["POINT (-105.1019 40.1672)"], + "geometry_types": ["Point"], + "reference_system": 4326, + } + ) + item.ext.cube.dimensions = {"vector": vector} + dimension = item.ext.cube.dimensions["vector"] + assert isinstance(dimension, dc.VectorSpatialDimension) + assert dimension.dim_type == "geometries" + assert dimension.axes == ["x", "y"] + assert dimension.description == "A test vector spatial dimension" + assert dimension.bbox == [-180, -90, 180, 90] + assert dimension.values == ["POINT (-105.1019 40.1672)"] + assert dimension.geometry_types == ["Point"] + assert dimension.reference_system == 4326