diff --git a/README.md b/README.md index 8a2ce2a..7cc3da4 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Electro-Optical Extension Specification - **Title:** Electro-Optical -- **Identifier:** +- **Identifier:** - **Field Name Prefix:** eo - **Scope:** Item, Collection - **Extension [Maturity Classification](https://github.com/radiantearth/stac-spec/tree/master/extensions/README.md#extension-maturity):** Stable @@ -11,6 +11,9 @@ This document explains the fields of the Electro-Optical (EO) Extension to the [SpatioTemporal Asset Catalog](https://github.com/radiantearth/stac-spec) (STAC) specification. +> \[!IMPORTANT] +> From version 2.0.0, the EO extension is only applicable to STAC resources from specification 1.1.0 or earlier. + EO data is considered to be 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, short-wave and mid-wave IR bands (e.g., the OLI instrument on @@ -27,17 +30,30 @@ For defining view geometry of data, it is strongly recommended to use the [`view - [JSON Schema](json-schema/schema.json) - [Changelog](./CHANGELOG.md) -## Item Properties or Asset Fields +## Fields + +The fields in the table below can be used in these parts of STAC documents: -| Field Name | Type | Description | -| -------------- | ------------------------------ | ----------- | -| eo:bands | \[[Band Object](#band-object)] | An array of available bands where each object is a [Band Object](#band-object). If given, requires at least one band. | -| eo:cloud_cover | number | Estimate of cloud cover | -| eo:snow_cover | number | Estimate of snow and ice cover | +- [ ] Catalogs +- [ ] Collections +- [ ] Item Properties (incl. Summaries in Collections) +- [ ] Assets (for both Collections and Items, incl. Item Asset Definitions in Collections) +- [X] Bands +- [ ] Links -### Additional Field Information +| Field Name | Type | Description | +| ---------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| eo:cloud_cover | number | Estimate of cloud cover | +| eo:snow_cover | number | Estimate of snow and ice cover | +| eo:common_name | string | The name commonly used to refer to the band to make it easier to search for bands across instruments. See the [list of accepted common names](#common-band-names). | +| eo:description | string | Description to fully explain the band. [CommonMark 0.29](http://commonmark.org/) syntax MAY be used for rich text representation. | +| eo:center_wavelength | number | The center wavelength of the band, in micrometers (μm). | +| eo:full_width_half_max | number | Full width at half maximum (FWHM). The width of the band, as measured at half the maximum transmission, in micrometers (μm). | +| eo:solar_illumination | number | The solar illumination of the band, as measured at half the maximum transmission, in W/m2/micrometers. | -#### eo:bands +*At least one of the fields must be specified.* + +### eo:bands The `eo:bands` array is used to describe the available [spectral bands](https://www.sciencedirect.com/topics/earth-and-planetary-sciences/spectral-band) in an Asset. This enables clients to read @@ -54,7 +70,7 @@ a defined bands array. **NOTE**: In STAC versions 0.9.x and prior, `eo:bands` could only be used by an Asset putting the Band Object definitions in an Item Properties and referencing these via array index. 1.0.0-beta.1 introduced the current behavior. -#### eo:cloud_cover +### eo:cloud_cover Estimate of cloud cover as a percentage (0-100) of the entire scene. If not available, the field should not be provided. Generally, this value should be used in Item Properties rather than Item Assets, as an Item from an electro-optical source is a single snapshot @@ -66,29 +82,10 @@ Estimate of snow and ice covered surfaces as a percentage (0-100) of the entire this value should be used in Item Properties rather than Item Assets, as an Item from an electro-optical source is a single snapshot of the Earth, so the snow cover value would apply to all assets. -### Band Object - -| Field Name | Type | Description | -| ------------------- | ------ | ----------- | -| name | string | The name of the band (e.g., "B01", "B8", "band2", "red"). | -| common_name | string | The name commonly used to refer to the band to make it easier to search for bands across instruments. See the [list of accepted common names](#common-band-names). | -| description | string | Description to fully explain the band. [CommonMark 0.29](http://commonmark.org/) syntax MAY be used for rich text representation. | -| center_wavelength | number | The center wavelength of the band, in micrometers (μm). | -| full_width_half_max | number | Full width at half maximum (FWHM). The width of the band, as measured at half the maximum transmission, in micrometers (μm). | -| solar_illumination | number | The solar illumination of the band, as measured at half the maximum transmission, in W/m2/micrometers. | - -*At least one of the fields must be specified.* - -#### name - -This is typically the name the data provider uses for the band. It should be treated like an 'id', to identify that a particular -band used in several assets represents the same band (all the other fields should be the same as well). It is also recommended that -clients use this name for display, potentially in conjunction with the common name. - -#### center_wavelength and full_width_half_max +#### eo:center_wavelength and eo:full_width_half_max These fields are a common way to approximately describe a spectral band. In most cases even these numbers are not as useful as the -`common_name` that should be supplied with the spectral bands, where they exist. For non-standard bands (such as with hyperspectral sensors) +`eo:common_name` that should be supplied with the spectral bands, where they exist. For non-standard bands (such as with hyperspectral sensors) the wavelength fields indicate where the band is. Another common way to define a spectral band with a minimum and maximum wavelength, where outside these bounds the transmission is 0%, @@ -100,27 +97,27 @@ referred to as a "top-hat" filter due to it's shape, but does not exist in reali typically selected to be the point at which transmission drops below some threshold, and this threshold is often half of the maximum transmission. Thus if a filter's maximum transmission is 80%, the min and max thresholds would be the points where the transmission drops below 40%. -The `center_wavelength` of a band is the midpoint between the min and max wavelengths: +The `eo:center_wavelength` of a band is the midpoint between the min and max wavelengths: ```python center_wavelength = (min_wavelength + max_wavelength) / 2 ``` -The `full_width_half_max` (FWHM) is the difference between the min and max wavelengths, +The `eo:full_width_half_max` (FWHM) is the difference between the min and max wavelengths, thus representing the width of the band at half it's maximum transmission. ```python full_width_half_max = max_wavelength - min_wavelength ``` -For example, if we were given a band described as (0.4um - 0.5um) the `center_wavelength` would be 0.45um -and the `full_width_half_max` would be 0.1um. +For example, if we were given a band described as (0.4um - 0.5um) the `eo:center_wavelength` would be 0.45um +and the `eo:full_width_half_max` would be 0.1um. In some cases the full transmission profile is needed, such as when harmonizing between two sensor modalities. It is recommended that the full spectral profile be included as a link or an asset (preferably at the [Collection](https://github.com/radiantearth/stac-spec/tree/master/collection-spec/collection-spec.md) level). -#### solar_illumination +#### eo:solar_illumination In satellite-based remote sensing applications, the calibration of the sensor recorded top-of-atmosphere reflectance to radiance, or vice-versa, is carried out using a reference spectral solar irradiance value. @@ -134,28 +131,28 @@ For instance, this value is used for optical calibration of an asset (e.g. [ESUN #### Common Band Names -The band's `common_name` is the name that is commonly used to refer to that band's spectral +The band's `eo:common_name` is the name that is commonly used to refer to that band's spectral properties. The table below shows the allowed common names based on the average band range for the band numbers of several popular instruments. -| Common Name | Band Range (μm) | Landsat 5/7 | Landsat 8 | Sentinel 2 | MODIS | NAIP | -| ----------- | --------------- | ----------- | --------- | ---------- | ----- | ---- | -| coastal | 0.40 - 0.45 | | 1 | 1 | | | -| blue | 0.45 - 0.50 | 1 | 2 | 2 | 3 | 3 | -| green | 0.50 - 0.60 | 2 | 3 | 3 | 4 | 2 | -| red | 0.60 - 0.70 | 3 | 4 | 4 | 1 | 1 | -| yellow | 0.58 - 0.62 | | | | | | -| pan | 0.50 - 0.70 | 8 (*L7 only*) | 8 | | | | -| rededge | 0.70 - 0.79 | | | 5, 6, 7 | | | -| nir | 0.75 - 1.00 | 4 | | 8 | 2 | 4 | -| nir08 | 0.75 - 0.90 | | 5 | 8a | | | -| nir09 | 0.85 - 1.05 | | | 9 | | | -| cirrus | 1.35 - 1.40 | | 9 | 10 | 26 | | -| swir16 | 1.55 - 1.75 | 5 | 6 | 11 | 6 | | -| swir22 | 2.10 - 2.30 | 7 | 7 | 12 | 7 | | -| lwir | 10.5 - 12.5 | 6 | | | | | -| lwir11 | 10.5 - 11.5 | | 10 | | 31 | | -| lwir12 | 11.5 - 12.5 | | 11 | | 32 | | +| Common Name | Band Range (μm) | Landsat 5/7 | Landsat 8 | Sentinel 2 | MODIS | NAIP | +| ----------- | --------------- | ------------- | --------- | ---------- | ----- | ---- | +| coastal | 0.40 - 0.45 | | 1 | 1 | | | +| blue | 0.45 - 0.50 | 1 | 2 | 2 | 3 | 3 | +| green | 0.50 - 0.60 | 2 | 3 | 3 | 4 | 2 | +| red | 0.60 - 0.70 | 3 | 4 | 4 | 1 | 1 | +| yellow | 0.58 - 0.62 | | | | | | +| pan | 0.50 - 0.70 | 8 (*L7 only*) | 8 | | | | +| rededge | 0.70 - 0.79 | | | 5, 6, 7 | | | +| nir | 0.75 - 1.00 | 4 | | 8 | 2 | 4 | +| nir08 | 0.75 - 0.90 | | 5 | 8a | | | +| nir09 | 0.85 - 1.05 | | | 9 | | | +| cirrus | 1.35 - 1.40 | | 9 | 10 | 26 | | +| swir16 | 1.55 - 1.75 | 5 | 6 | 11 | 6 | | +| swir22 | 2.10 - 2.30 | 7 | 7 | 12 | 7 | | +| lwir | 10.5 - 12.5 | 6 | | | | | +| lwir11 | 10.5 - 11.5 | | 10 | | 31 | | +| lwir12 | 11.5 - 12.5 | | 11 | | 32 | | The difference between the `nir`, `nir08`, and `nir09` bands are that the `nir` band is a wider band that covers most of the spectral range of 0.75μm to 1.0μm. `nir08` and `nir09` are narrow bands centered 0.85μm and 0.95μm @@ -168,13 +165,13 @@ to provide clients with more information about the assets in an item. The follow This list should not be considered definitive, and implementors are welcome to use other asset roles. If consensus and tooling consolidates around these role names then they will be specified in the future as more standard than just 'best practices'. -| Role Name | Description | -| --------- | ---------------------------------------------------------------------- | -| reflectance | An asset the provides [reflectance](https://www.l3harrisgeospatial.com/Support/Self-Help-Tools/Help-Articles/Help-Articles-Detail/ArtMID/10220/ArticleID/19247/3377) values, instead of just radiance. | -| temperature | An asset that provides actual temperature measurements. | -| saturation | Points to a file that indicates where pixels in the input spectral bands are saturated. | -| cloud | Points to a file that indicates whether a pixel is assessed as being cloud | -| cloud-shadow | Points to a file that indicates whether a pixel is assessed as being cloud shadow. | +| Role Name | Description | +| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| reflectance | An asset the provides [reflectance](https://www.l3harrisgeospatial.com/Support/Self-Help-Tools/Help-Articles/Help-Articles-Detail/ArtMID/10220/ArticleID/19247/3377) values, instead of just radiance. | +| temperature | An asset that provides actual temperature measurements. | +| saturation | Points to a file that indicates where pixels in the input spectral bands are saturated. | +| cloud | Points to a file that indicates whether a pixel is assessed as being cloud | +| cloud-shadow | Points to a file that indicates whether a pixel is assessed as being cloud shadow. | ## Contributing diff --git a/examples/collection.json b/examples/collection.json index 2ac841f..6dae634 100644 --- a/examples/collection.json +++ b/examples/collection.json @@ -3,7 +3,7 @@ "type": "Collection", "stac_extensions": [ "https://stac-extensions.github.io/item-assets/v1.0.0/schema.json", - "https://stac-extensions.github.io/eo/v1.1.0/schema.json" + "https://stac-extensions.github.io/eo/v2.0.0/schema.json" ], "stac_version": "1.0.0", "description": "A simple Collection demonstrating EO extension fields in a Collection.", @@ -45,34 +45,34 @@ "minimum": 0, "maximum": 50 }, - "eo:bands": [ + "bands": [ { "name": "band1", - "common_name": "blue", - "center_wavelength": 0.47, - "full_width_half_max": 0.07, - "solar_illumination": 1959.66 + "eo:common_name": "blue", + "eo:center_wavelength": 0.47, + "eo:full_width_half_max": 0.07, + "eo:solar_illumination": 1959.66 }, { "name": "band2", - "common_name": "green", - "center_wavelength": 0.56, - "full_width_half_max": 0.08, - "solar_illumination": 1823.24 + "eo:common_name": "green", + "eo:center_wavelength": 0.56, + "eo:full_width_half_max": 0.08, + "eo:solar_illumination": 1823.24 }, { "name": "band3", - "common_name": "red", - "center_wavelength": 0.645, - "full_width_half_max": 0.09, - "solar_illumination": 1512.06 + "eo:common_name": "red", + "eo:center_wavelength": 0.645, + "eo:full_width_half_max": 0.09, + "eo:solar_illumination": 1512.06 }, { "name": "band4", - "common_name": "nir", - "center_wavelength": 0.8, - "full_width_half_max": 0.152, - "solar_illumination": 1041.63 + "eo:common_name": "nir", + "eo:center_wavelength": 0.8, + "eo:full_width_half_max": 0.152, + "eo:solar_illumination": 1041.63 } ] }, @@ -97,34 +97,34 @@ "roles": [ "data" ], - "eo:bands": [ + "bands": [ { "name": "band1", - "common_name": "blue", - "center_wavelength": 0.47, - "full_width_half_max": 0.7, - "solar_illumination": 1959.66 + "eo:common_name": "blue", + "eo:center_wavelength": 0.47, + "eo:full_width_half_max": 0.7, + "eo:solar_illumination": 1959.66 }, { "name": "band2", - "common_name": "green", - "center_wavelength": 0.56, - "full_width_half_max": 0.08, - "solar_illumination": 1823.24 + "eo:common_name": "green", + "eo:center_wavelength": 0.56, + "eo:full_width_half_max": 0.08, + "eo:solar_illumination": 1823.24 }, { "name": "band3", "common_name": "red", - "center_wavelength": 0.645, - "full_width_half_max": 0.9, - "solar_illumination": 1512.06 + "eo:center_wavelength": 0.645, + "eo:full_width_half_max": 0.9, + "eo:solar_illumination": 1512.06 }, { "name": "band4", - "common_name": "nir", - "center_wavelength": 0.8, - "full_width_half_max": 0.152, - "solar_illumination": 1041.63 + "eo:common_name": "nir", + "eo:center_wavelength": 0.8, + "eo:full_width_half_max": 0.152, + "eo:solar_illumination": 1041.63 } ] }, @@ -141,24 +141,24 @@ "roles": [ "visual" ], - "eo:bands": [ + "bands": [ { "name": "band3", - "common_name": "red", - "center_wavelength": 0.645, - "full_width_half_max": 0.09 + "eo:common_name": "red", + "eo:center_wavelength": 0.645, + "eo:full_width_half_max": 0.09 }, { "name": "band2", - "common_name": "green", - "center_wavelength": 0.56, - "full_width_half_max": 0.08 + "eo:common_name": "green", + "eo:center_wavelength": 0.56, + "eo:full_width_half_max": 0.08 }, { "name": "band1", - "common_name": "blue", - "center_wavelength": 0.47, - "full_width_half_max": 0.07 + "eo:common_name": "blue", + "eo:center_wavelength": 0.47, + "eo:full_width_half_max": 0.07 } ] } diff --git a/examples/item.json b/examples/item.json index 4c61901..3593c64 100644 --- a/examples/item.json +++ b/examples/item.json @@ -1,7 +1,7 @@ { "stac_version": "1.0.0", "stac_extensions": [ - "https://stac-extensions.github.io/eo/v1.1.0/schema.json" + "https://stac-extensions.github.io/eo/v2.0.0/schema.json" ], "type": "Feature", "id": "20201211_223832_CS2", @@ -79,34 +79,35 @@ "roles": [ "data" ], - "eo:bands": [ + "eo:cloud_cover": 1.2, + "bands": [ { "name": "band1", - "common_name": "blue", - "center_wavelength": 0.47, - "full_width_half_max": 0.07, - "solar_illumination": 1959.66 + "eo:common_name": "blue", + "eo:center_wavelength": 0.47, + "eo:full_width_half_max": 0.07, + "eo:solar_illumination": 1959.66 }, { "name": "band2", - "common_name": "green", - "center_wavelength": 0.56, - "full_width_half_max": 0.08, - "solar_illumination": 1823.24 + "eo:common_name": "green", + "eo:center_wavelength": 0.56, + "eo:full_width_half_max": 0.08, + "eo:solar_illumination": 1823.24 }, { "name": "band3", - "common_name": "red", - "center_wavelength": 0.645, - "full_width_half_max": 0.09, - "solar_illumination": 1512.06 + "eo:common_name": "red", + "eo:center_wavelength": 0.645, + "eo:full_width_half_max": 0.09, + "eo:solar_illumination": 1512.06 }, { "name": "band4", - "common_name": "nir", - "center_wavelength": 0.8, - "full_width_half_max": 0.152, - "solar_illumination": 1041.63 + "eo:common_name": "nir", + "eo:center_wavelength": 0.8, + "eo:full_width_half_max": 0.152, + "eo:solar_illumination": 1041.63 } ] }, @@ -116,7 +117,8 @@ "type": "image/png", "roles": [ "thumbnail" - ] + ], + "manu": {} }, "visual": { "href": "https://storage.googleapis.com/open-cogs/stac-examples/20201211_223832_CS2.tif", @@ -125,26 +127,26 @@ "roles": [ "visual" ], - "eo:bands": [ + "bands": [ { "name": "band3", - "common_name": "red", - "center_wavelength": 0.645, - "full_width_half_max": 0.09 + "eo:common_name": "red", + "eo:center_wavelength": 0.645, + "eo:full_width_half_max": 0.09 }, { "name": "band2", - "common_name": "green", - "center_wavelength": 0.56, - "full_width_half_max": 0.08 + "eo:common_name": "green", + "eo:center_wavelength": 0.56, + "eo:full_width_half_max": 0.08 }, { "name": "band1", - "common_name": "blue", - "center_wavelength": 0.47, - "full_width_half_max": 0.07 + "eo:common_name": "blue", + "eo:center_wavelength": 0.47, + "eo:full_width_half_max": 0.07 } ] } } -} +} \ No newline at end of file diff --git a/json-schema/schema.json b/json-schema/schema.json index 415fc86..550a83d 100644 --- a/json-schema/schema.json +++ b/json-schema/schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://stac-extensions.github.io/eo/v1.1.0/schema.json#", + "$id": "https://stac-extensions.github.io/eo/v2.0.0/schema.json#", "title": "EO Extension", "description": "STAC EO Extension for STAC Items.", "oneOf": [ @@ -10,11 +10,22 @@ { "type": "object", "required": [ + "stac_version", "type", "properties", "assets" ], "properties": { + "stac_version": { + "oneOf": [ + { + "pattern": "^1.[0-9][0-9]*(?:.[0-9]+(?:-.+)?)?$" + }, + { + "pattern": "^[2-9][0-9]*.[0-9][0-9]*(?:.[0-9]+(?:-.+)?)?$" + } + ] + }, "type": { "const": "Feature" }, @@ -22,48 +33,62 @@ "$ref": "#/definitions/fields" }, "assets": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/fields" - } + "type": "object" } }, - "$comment": "The if-then-else below checks whether the eo:bands is given in assets or not. If yes, allows eo:bands in properties (else), otherwise, disallows eo:bands in properties (then).", - "if": { - "required": [ - "assets" - ], - "properties": { - "assets": { - "type": "object", - "additionalProperties": { + "allOf": [ + { + "$comment": "The oneOf checks whether the bands field is given in properties or in assets.", + "oneOf": [ + { + "required": [ + "properties" + ], "properties": { - "eo:bands": false + "properties": { + "type": "object", + "required": [ + "bands" + ], + "properties": { + "bands": { + "type": "array", + "items": { + "$ref": "#/definitions/bands_fields" + } + } + } + } } - } - } - } - }, - "then": { - "properties": { - "properties": { - "properties": { - "eo:bands": false - } - } - } - }, - "else": { - "properties": { - "properties": { - "properties": { - "eo:bands": { - "$ref": "#/definitions/bands" + }, + { + "required": [ + "assets" + ], + "properties": { + "assets": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/asset_with_bands" + }, + { + "additionalProperties": { + "type": "object", + "$ref": "#/definitions/fields" + } + } + ], + "$comment": "The 'not' below ensures that the bands is at least present once in the assets.", + "not": { + "$ref": "#/definitions/asset_without_bands" + } + } } } - } + ] } - } + ] }, { "$ref": "#/definitions/stac_extensions" @@ -79,22 +104,104 @@ "type" ], "properties": { + "stac_version": { + "oneOf": [ + { + "pattern": "^1.[0-9][0-9]*(?:.[0-9]+(?:-.+)?)?$" + }, + { + "pattern": "^[2-9][0-9]*.[0-9][0-9]*(?:.[0-9]+(?:-.+)?)?$" + } + ] + }, "type": { "const": "Collection" }, "assets": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/fields" - } + "type": "object" }, "item_assets": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/fields" - } + "type": "object" } - } + }, + "allOf": [ + { + "$comment": "The oneOf checks whether the bands field is given in summaries, assets or in item_assets.", + "anyOf": [ + { + "required": [ + "summaries" + ], + "properties": { + "summaries": { + "type": "object", + "required": [ + "bands" + ], + "properties": { + "bands": { + "type": "array", + "items": { + "$ref": "#/definitions/bands_fields" + } + } + } + } + } + }, + { + "required": [ + "item_assets" + ], + "properties": { + "assets": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/asset_with_bands" + }, + { + "additionalProperties": { + "type": "object", + "$ref": "#/definitions/fields" + } + } + ], + "$comment": "The 'not' below ensures that the bands is at least present once in the item_assets.", + "not": { + "$ref": "#/definitions/asset_without_bands" + } + } + } + }, + { + "required": [ + "assets" + ], + "properties": { + "assets": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/asset_with_bands" + }, + { + "additionalProperties": { + "type": "object", + "$ref": "#/definitions/fields" + } + } + ], + "$comment": "The 'not' below ensures that the bands is at least present once in the assets.", + "not": { + "$ref": "#/definitions/asset_without_bands" + } + } + } + } + ] + } + ] }, { "$ref": "#/definitions/stac_extensions" @@ -112,11 +219,59 @@ "stac_extensions": { "type": "array", "contains": { - "const": "https://stac-extensions.github.io/eo/v1.1.0/schema.json" + "const": "https://stac-extensions.github.io/eo/v2.0.0/schema.json" + } + } + } + }, + "asset_with_bands": { + "type": "object", + "allOf": [ + { + "additionalProperties": { + "$ref": "#/definitions/bands_or_not" + } + } + ] + }, + "asset_without_bands": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bands_not_present" + } + }, + "bands_or_not": { + "oneOf": [ + { + "$ref": "#/definitions/bands_present" + }, + { + "$ref": "#/definitions/bands_not_present" + } + ] + }, + "bands_present": { + "type": "object", + "required": [ + "bands" + ], + "properties": { + "bands": { + "type": "array", + "items": { + "$ref": "#/definitions/bands_fields" } } } }, + "bands_not_present": { + "type": "object", + "not": { + "required": [ + "bands" + ] + } + }, "fields": { "type": "object", "properties": { @@ -131,9 +286,6 @@ "type": "number", "minimum": 0, "maximum": 100 - }, - "eo:bands": { - "$ref": "#/definitions/bands" } }, "patternProperties": { @@ -141,63 +293,51 @@ }, "additionalProperties": false }, - "bands": { - "title": "Bands", - "type": "array", - "minItems": 1, - "items": { - "title": "Band", - "type": "object", - "minProperties": 1, - "properties": { - "name": { - "title": "Name of the band", - "type": "string" - }, - "common_name": { - "title": "Common Name of the band", - "type": "string", - "enum": [ - "coastal", - "blue", - "green", - "red", - "rededge", - "yellow", - "pan", - "nir", - "nir08", - "nir09", - "cirrus", - "swir16", - "swir22", - "lwir", - "lwir11", - "lwir12" - ] - }, - "description": { - "title": "Description of the band", - "type": "string", - "minLength": 1 - }, - "center_wavelength": { - "title": "Center Wavelength", - "type": "number", - "minimumExclusive": 0 - }, - "full_width_half_max": { - "title": "Full Width Half Max (FWHM)", - "type": "number", - "minimumExclusive": 0 - }, - "solar_illumination": { - "title": "Solar Illumination", - "type": "number", - "minimum": 0 - } + "bands_fields": { + "type": "object", + "properties": { + "eo:common_name": { + "title": "Common Name of the band", + "type": "string", + "enum": [ + "coastal", + "blue", + "green", + "red", + "rededge", + "yellow", + "pan", + "nir", + "nir08", + "nir09", + "cirrus", + "swir16", + "swir22", + "lwir", + "lwir11", + "lwir12" + ] + }, + "eo:center_wavelength": { + "title": "Center Wavelength", + "type": "number", + "minimumExclusive": 0 + }, + "eo:full_width_half_max": { + "title": "Full Width Half Max (FWHM)", + "type": "number", + "minimumExclusive": 0 + }, + "eo:solar_illumination": { + "title": "Solar Illumination", + "type": "number", + "minimum": 0 } - } + }, + "patternProperties": { + "^(?!eo:)": {} + }, + "additionalProperties": false } } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 1bc9818..a6b6fbd 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,8 @@ "scripts": { "test": "npm run check-markdown && npm run check-examples", "check-markdown": "remark . -f -r .github/remark.yaml", - "check-examples": "stac-node-validator . --lint --verbose --schemaMap https://stac-extensions.github.io/eo/v1.1.0/schema.json=./json-schema/schema.json", - "format-examples": "stac-node-validator . --format --schemaMap https://stac-extensions.github.io/eo/v1.1.0/schema.json=./json-schema/schema.json" + "check-examples": "stac-node-validator . --lint --verbose --schemaMap https://stac-extensions.github.io/eo/v2.0.0/schema.json=./json-schema/schema.json", + "format-examples": "stac-node-validator . --format --schemaMap https://stac-extensions.github.io/eo/v2.0.0/schema.json=./json-schema/schema.json" }, "dependencies": { "remark-cli": "^8.0.0",