Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Dimensions extension #227

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions extensions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 +Dataset | 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. |
Expand Down
19 changes: 19 additions & 0 deletions extensions/dimensions/README.md
Original file line number Diff line number Diff line change
@@ -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. |
23 changes: 23 additions & 0 deletions extensions/dimensions/example.json
Original file line number Diff line number Diff line change
@@ -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"]
}
]
}
36 changes: 36 additions & 0 deletions extensions/dimensions/schema.json
Original file line number Diff line number Diff line change
@@ -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"]
}
}
}
}
}
}
}