From 76a7e8a72021c5aee2d32e507e52f64c61e826d9 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Thu, 30 Aug 2018 10:00:54 +0200 Subject: [PATCH] Moved the Dimensions extension from the Dataset PR --- extensions/README.md | 1 + extensions/dimensions/README.md | 19 ++++++++++++++++ extensions/dimensions/example.json | 23 +++++++++++++++++++ extensions/dimensions/schema.json | 36 ++++++++++++++++++++++++++++++ 4 files changed, 79 insertions(+) create mode 100644 extensions/dimensions/README.md create mode 100644 extensions/dimensions/example.json create mode 100644 extensions/dimensions/schema.json diff --git a/extensions/README.md b/extensions/README.md index 579ee779f..c853909c9 100644 --- a/extensions/README.md +++ b/extensions/README.md @@ -14,6 +14,7 @@ them they can create a shared extension and include it in the STAC repository. | Extension Name (Prefix) | Scope | Description | | ------------------------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [Collection](stac-collection-spec.md) (`c`) | Item | Provides a way to specify data fields that are common across a collection of STAC Items, so that each does not need to repeat all the same information. | +| [Dimensions](dimensions/) (`dim`) | Dataset | Allows to describe data with multiple dimensions (= axes), e.g. in meteorology. | | [EO](stac-eo-spec.md) (`eo`) | Item | Covers data that represents a snapshot of the earth for a single date and time. It could consist of multiple spectral bands in any part of the electromagnetic spectrum. Examples of EO data include sensors with visible bands, IR bands as well as SAR instruments. The extension provides common fields like bands, cloud cover, off nadir, sun angle + elevation, gsd and more. | | [Scientific](scientific/) (`sci`) | Catalog | Scientific metadata is considered to be data that indicate from which publication a dataset originates and how the dataset itself should be cited or referenced. | | [Start end datetime](stac-start-end-datetime-spec.md) (`set`) | Item | An extension to provide start and end datetime stamps in a consistent way. | diff --git a/extensions/dimensions/README.md b/extensions/dimensions/README.md new file mode 100644 index 000000000..a4c841b6b --- /dev/null +++ b/extensions/dimensions/README.md @@ -0,0 +1,19 @@ +# STAC Dimensions Extension Spec + +This document explains the fields of the STAC Dimensions Extension (dim) to a STAC `Dataset`. Data can have different dimensions (= axes), e.g. in meteorology. The properties of these dimensions can be defined with this extension. + +## Dimensions Extension Description + +This is the field that extends the `Dataset` object: + +| Element | Type | Name | Description | +| ---------------- | -------------------- | ------------------------- | ------------------------------------------------------------ | +| dim:dimensions | [Dimension Object] | Dimensions | Dimensions of the data. If the dimensions have an order, the order SHOULD be reflected in the order of the array. | + +### Dimension Object + +| Element | Type | Name | Description | +| ------- | ---------------- | ------------------- | ------------------------------------------------------------ | +| label | string | Label (required) | Human-readable label for the dimension. | +| unit | string | Unit of Measurement | Unit of measurement, preferably SI. ToDo: Any standard to express this, e.g. [UDUNITS](https://www.unidata.ucar.edu/software/udunits/) or this [dict](https://www.unc.edu/~rowlett/units/)? | +| extent | [number\|string] | Data Extent | Specifies the extent of the data, i.e. the lower bound as the first element and the upper bound as the second element of the array. | diff --git a/extensions/dimensions/example.json b/extensions/dimensions/example.json new file mode 100644 index 000000000..33ffd44b3 --- /dev/null +++ b/extensions/dimensions/example.json @@ -0,0 +1,23 @@ +{ + "dim:dimensions": [ + { + "label": "Longitude", + "unit": "°", + "extent": [-180, 180] + }, + { + "label": "Latitude", + "unit": "°", + "extent": [-90, 90] + }, + { + "label": "Temperature", + "unit": "°C", + "extent": [-20, 60] + }, + { + "label": "Date", + "extent": ["2018-01-01T00:00:00Z", "2018-01-31T23:59:59Z"] + } + ] +} \ No newline at end of file diff --git a/extensions/dimensions/schema.json b/extensions/dimensions/schema.json new file mode 100644 index 000000000..03e7dec37 --- /dev/null +++ b/extensions/dimensions/schema.json @@ -0,0 +1,36 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "title": "STAC Dimensions Extension Spec", + "properties": { + "dim:dimensions": { + "type": "array", + "title": "Dimensions", + "items": { + "type": "object", + "required": [ + "label" + ], + "properties": { + "label": { + "type": "string", + "title": "Label" + }, + "unit": { + "type": "string", + "title": "Unit of Measurement" + }, + "extent": { + "type": "array", + "title": "Data Extent", + "minItems": 2, + "maxItems": 2, + "items": { + "type": ["number", "string"] + } + } + } + } + } + } +} \ No newline at end of file