Skip to content
Open
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
56 changes: 27 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,34 @@ The following fields can be used in the following parts of a STAC document:
- [x] Assets (both Collections and Items, incl. Item Asset Definitions in Collections)
- [ ] Links

| Field Name | Type | Description |
| ---------------- | -------------------------------------------------- | ------------------------------------------- |
| cube:dimensions | Map<string, [Dimension Object](#dimension-object)> | **REQUIRED.** Uniquely named dimensions of the datacube. |
| cube:variables | Map<string, [Variable Object](#variable-object)> | Uniquely named variables of the datacube. |
| Field Name | Type | Description |
| -------------------- | -------------------------------------------------- | ------------------------------------------- |
| cube:dimensions | Map<string, [Dimension Object](#dimension-object)> | **REQUIRED.** Uniquely named dimensions of the datacube. |

The keys of `cube:dimensions` and `cube:variables` should be unique together; a key like `lat` should not be both a dimension and a variable.
- [ ] Catalogs
- [ ] Collections
- [ ] Item Properties (incl. Summaries in Collections)
- [ ] Assets (both Collections and Items, incl. Item Asset Definitions in Collections)
- [x] [Bands](https://github.com/radiantearth/stac-spec/blob/master/commons/common-metadata.md#bands)
- [ ] Links

| Field Name | Type | Description |
| -------------------- | ----------------- | ------------------------------------------- |
| cube:dimensions_refs | Array<string> | **REQUIRED.** The dimensions of the variable. This should refer to keys in the cube:dimensions object or be an empty list if the variable has no dimensions. |
| cube:type | string | **REQUIRED.** Type of the variable, either data or auxiliary. |
| cube:values | Array<string> | An (ordered) list of all values, especially useful for [nominal](https://en.wikipedia.org/wiki/Level_of_measurement#Nominal_level) values. |

**cube:type**: The Variable `cube:type` indicates whether what kind of variable is being described. It has two allowed values:

1. `data`: a variable indicating some measured value, for example "precipitation", "temperature", etc.
2. `auxiliary`: a variable that contains coordinate data, but isn't a dimension in `cube:dimensions`.
For example, the values of the datacube might be provided in the projected coordinate reference system, but
the datacube could have a variable `lon` with dimensions `(y, x)`, giving the longitude at each point.

See the [CF Conventions](http://cfconventions.org/Data/cf-conventions/cf-conventions-1.8/cf-conventions.html#terminology)
for more on auxiliary coordinates.

The keys of `cube:dimensions` and `bands` should be unique together; a key like `lat` should not be both a dimension and a band.

### Dimension Object

Expand Down Expand Up @@ -125,30 +147,6 @@ You can distinguish the "Temporal Dimension" from an "Additional Dimension" by c
So if the `type` equals `temporal` and `extent` is an array of strings/null, then you have a "Temporal Dimension",
otherwise you have an "Additional Dimension".

### Variable Object

A *Variable Object* defines a variable (or a multi-dimensional array). The variable may have dimensions, which are described by [Dimension Objects](#dimension-object).

| Field Name | Type | Description |
| ---------------- | -------------------------| ----------- |
| dimensions | \[string] | **REQUIRED.** The dimensions of the variable. This should refer to keys in the ``cube:dimensions`` object or be an empty list if the variable has no dimensions. |
| type | string | **REQUIRED.** Type of the variable, either `data` or `auxiliary`. |
| description | string | Detailed multi-line description to explain the variable. [CommonMark 0.29](http://commonmark.org/) syntax MAY be used for rich text representation. |
| extent | \[number\|string\|null\] | If the variable consists of [ordinal](https://en.wikipedia.org/wiki/Level_of_measurement#Ordinal_scale) values, the extent (lower and upper bounds) of the values as two-element array. Use `null` for open intervals. |
| values | \[number\|string] | An (ordered) list of all values, especially useful for [nominal](https://en.wikipedia.org/wiki/Level_of_measurement#Nominal_level) values. |
| unit | string | The unit of measurement for the data, preferably compliant to [UCUM](https://ucum.org) (unit code) or [UDUNITS-2](https://ncics.org/portfolio/other-resources/udunits2/) (unit symbol or alternatively singular unit name). |
| nodata | number\|string | Value used to identify no-data, see [common metadata](https://github.com/radiantearth/stac-spec/blob/v1.1.0/commons/common-metadata.md#no-data) for more details. |
| data_type | string | The data type of the values in the datacube, see [common metadata](https://github.com/radiantearth/stac-spec/blob/v1.1.0/commons/common-metadata.md#data-types) for more details. |

**type**: The Variable `type` indicates whether what kind of variable is being described. It has two allowed values:

1. `data`: a variable indicating some measured value, for example "precipitation", "temperature", etc.
2. `auxiliary`: a variable that contains coordinate data, but isn't a dimension in `cube:dimensions`.
For example, the values of the datacube might be provided in the projected coordinate reference system, but
the datacube could have a variable `lon` with dimensions `(y, x)`, giving the longitude at each point.

See the [CF Conventions](http://cfconventions.org/Data/cf-conventions/cf-conventions-1.8/cf-conventions.html#terminology)
for more on auxiliary coordinates.

## Contributing

Expand Down
72 changes: 36 additions & 36 deletions examples/daymet-hi-annual.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,106 +82,106 @@
]
}
},
"cube:variables": {
"bands": {
"lat": {
"type": "auxiliary",
"extent": [
17.960035,
23.512327
],
"cube:type": "auxiliary",
"statistics": {
"minimum": 17.960035,
"maximum": 23.512327
},
"description": "latitude coordinate",
"unit": "degrees_north",
"dimensions": [
"cube:dimension_refs": [
"y",
"x"
]
},
"lon": {
"type": "auxiliary",
"extent": [
-160.29884,
-154.77806
],
"cube:type": "auxiliary",
"statistics": {
"minimum": -160.29884,
"maximum": -154.77806
},
"description": "longitude coordinate",
"unit": "degrees_east",
"dimensions": [
"cube:dimension_refs": [
"y",
"x"
]
},
"prcp": {
"type": "data",
"cube:type": "data",
"description": "The total accumulated precipitation over the monthly period of the daily total precipitation. Sum of all forms of precipitation converted to a water-equivalent depth.",
"extent": [
0,
null
],
"statistics": {
"minimum": 0,
"maximum": null
},
"unit": "mm",
"dimensions": [
"cube:dimension_refs": [
"time",
"y",
"x"
]
},
"swe": {
"type": "data",
"cube:type": "data",
"description": "The average of the daily snow water equivalent (the amount of water contained within the snowpack) in kilograms per square meter over the monthly period.",
"extent": [
0,
null
],
"statistics": {
"minimum": 0,
"maximum": null
},
"unit": "kg/m2",
"dimensions": [
"cube:dimension_refs": [
"time",
"y",
"x"
]
},
"tmin": {
"type": "data",
"cube:type": "data",
"description": "The average minimum temperature for a daily period over the entire monthly period.",
"unit": "degrees C",
"dimensions": [
"cube:dimension_refs": [
"time",
"y",
"x"
]
},
"tmax": {
"type": "data",
"cube:type": "data",
"description": "The average maximum temperature for a daily period over the entire monthly period.",
"unit": "degrees C",
"dimensions": [
"cube:dimension_refs": [
"time",
"y",
"x"
]
},
"vp": {
"type": "data",
"cube:type": "data",
"description": "The average of the daily average partial pressure of water vapor over the monthly period.",
"unit": "Pa",
"dimensions": [
"cube:dimension_refs": [
"time",
"y",
"x"
]
},
"time_bnds": {
"type": "auxiliary",
"cube:type": "auxiliary",
"description": "",
"dimensions": [
"cube:dimension_refs": [
"time",
"nv"
]
},
"lambert_conformal_conic": {
"type": "auxiliary",
"cube:type": "auxiliary",
"description": "Lambert Conformal Conic.",
"values": [
"cube:values": [
-32767
],
"dimensions": []
"cube:dimension_refs": []
}
}
}
12 changes: 6 additions & 6 deletions examples/item.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,22 +98,22 @@
]
}
},
"cube:variables": {
"bands": {
"temp": {
"dimensions": [
"cube:dimension_refs": [
"time",
"y",
"x",
"pressure_levels"
],
"type": "data",
"cube:type": "data",
"nodata": "nan",
"data_type": "float32"
},
"color": {
"dimensions": [],
"type": "auxiliary",
"values": [
"cube:dimension_refs": [],
"cube:type": "auxiliary",
"cube:values": [
"red",
"green",
"blue"
Expand Down
12 changes: 6 additions & 6 deletions examples/item_asset.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,20 +104,20 @@
]
}
},
"cube:variables": {
"bands": {
"temp": {
"dimensions": [
"cube:dimension_refs": [
"time",
"y",
"x",
"pressure_levels"
],
"type": "data"
"cube:type": "data"
},
"color": {
"dimensions": [],
"type": "auxiliary",
"values": [
"cube:dimension_refs": [],
"cube:type": "auxiliary",
"cube:values": [
"red",
"green",
"blue"
Expand Down
Loading