diff --git a/README.md b/README.md index 1fe4452..dd6a45f 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ This document explains the Rendering Extension to the [SpatioTemporal Asset Catalog](https://github.com/radiantearth/stac-spec) (STAC) specification. -Rendering extension aims at providings consumers with the information required to view an asset properly (e.g. on a online map) +Rendering extension aims at providings consumers with the possible rendering of an item or a collection (e.g. on a online map) - Examples: - [Landsat-8 example](examples/item-landsat8.json): Shows the basic usage of the extension in a landsat-8 STAC Item @@ -21,74 +21,118 @@ Rendering extension aims at providings consumers with the information required t The fields in the table below can be used in these parts of STAC documents: - [ ] Catalogs -- [ ] Collections -- [ ] Item Properties (incl. Summaries in Collections) -- [x] Assets (for both Collections and Items, incl. Item Asset Definitions in Collections) +- [x] Collections +- [x] Item Properties (incl. Summaries in Collections) +- [ ] Assets (for both Collections and Items, incl. Item Asset Definitions in Collections) - [ ] Links -| Field Name | Type | Description | -| ----------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| rdr:colormap_name | string | Color map identifier that must be applied for a raster band | -| rdr:colormap | object | [Color map JSON definition](https://developmentseed.org/titiler/advanced/rendering/#custom-colormaps) that must be applied for a raster band | -| rdr:color_formula | string | [Color formula](https://developmentseed.org/titiler/advanced/rendering/#color-formula) that must be applied for a raster band | -| rdr:resampling | string | Resampling algorithm to apply to the virtual asset. See [GDAL resampling algorithm](https://gdal.org/programs/gdalwarp.html#cmdoption-gdalwarp-r) for some examples. | -| rdr:minmax_zoom | \[int] | Zoom levels range applicable for the visualization | +| Field Name | Type | Description | +| ---------- | -------------------------- | ----------------------------------------------------------------------------------------- | +| renders | Map | **REQUIRED**. Dictionary of rendering objects that can be viewed, each with a unique key. | + +### Render Object + +| Field Name | Type | Description | +| ------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| assets | \[string] | **REQUIRED**. Array of asset keys [referencing the assets](#assets-reference) that are used to make the rendering | +| title | string | Optional title of the rendering | +| rescale | \[float] | 2 dimensions array of delimited Min,Max range per band. If not provided, the data will not be rescaled. | +| nodata | float | Nodata value to use for the referenced assets. | +| colormap_name | string | Color map identifier that must be applied for a raster band | +| colormap | object | [Color map JSON definition](https://developmentseed.org/titiler/advanced/rendering/#custom-colormaps) that must be applied for a raster band | +| color_formula | string | [Color formula](https://developmentseed.org/titiler/advanced/rendering/#color-formula) that must be applied for a raster band | +| resampling | string | Resampling algorithm to apply to the referenced assets. See [GDAL resampling algorithm](https://gdal.org/programs/gdalwarp.html#cmdoption-gdalwarp-r) for some examples. | +| expression | string | Band arithmetic formula to apply to the referenced assets. | +| minmax_zoom | \[int] | Zoom levels range applicable for the visualization | + +The `render` object is open ended, so additional fields can be provided according to the needs of the rendering application. + +## Assets reference + +The `assets` field is a list of asset keys referencing the assets that are used to make the rendering. +The assets MUST be local assets defined in the same item. + +> \[!NOTE] +> When it is intended to use assets from external items or specific bands in an asset, +> it is recommended to define a [virtual assets](https://github.com/stac-extensions/virtual-assets) +> and then reference its key in the `assets` field. See the [NDVI example](#normalized-difference-vegetation-index-ndvi-example). + +## Positioning + +The positioning of the source assets is defined by their position in the `assets` array. +Typically, in the case of the composition of a RGB image, the first pointer would be the red band, the second the green band and the third the blue band. + +```json +"assets": [ "red", "green", "blue" ] +``` + +## Rescaling + +A rescaling of the values from the source asset(s) to the destination asset can be defined using the `vrt:rescale` field. +It is specified as a 2 dimensions array of delimited Min,Max range per band. + +```json +"vrt:rescale": [ + [0, 10000], // band 1 + [0, 10000], // band 2 + [0, 10000] // band 3 +] +``` + +A prescaling can also be performed according to the `offset` and `scale` fields value of the [raster](https://github.com/stac-extensions/raster) extension. ## Dynamic tile servers integration -Dynamic tile servers could exploit the information in the `rendering` extension to automatically produce RGB tiles -from asset bands using their parameters. +The render objects are designed to be used by dynamic tile servers to produce RGB tiles from a STAC Item. +They are generic enough to be used by any dynamic tile server. In the following sections, some tilers integration are described. ### Titiler [titiler](https://github.com/developmentseed/titiler) offers a native [STAC reader](https://github.com/developmentseed/titiler/blob/main/docs/src/endpoints/stac.md). -Then it can easily be used to produce RGB tiles from a STAC Item with the values in the `rendering` and [`virtual-assets`](https://github.com/stac-extensions/virtual-assets) extension. - The following table describes the titiler query parameters that could be used and the corresponding extension fields. Either the client building titiler url can use the information in the virtual asset to build the query parameters or the dynamic tile server could use the information in the virtual asset to build the query parameters by simply specifying the `url` and `assets` query parameters. -| Query key | field | Description | -| --------------- | --------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `url` | `href` in item self link | STAC Item URL | -| `assets` | `vrt:hrefs` or asset key | For a local composition (asset in the same item), the assets key can be retrieved from the vrt:hrefs and joined with comma (e.g. `B04,B03,B02`. Titiler may support to specify directly the virtual asset key and set internally all the parameters according to the current table. | -| `rescale` | `vrt:rescale` | Delimited Min,Max bounds defined in `vrt:rescale` field | -| `expression` | `vrt:algoritm` and `vrt:algoritm_opts` | Band arithmetic formula as defined in field `vrt:algoritm_opts`.`expression` if `vrt:algorithm` is set to `band_arithmetic` | -| `nodata` | `vrt:nodata` or `nodata` `raster:bands` | Nodata value defined in `nodata` field of the corresponding `raster:bands` item | -| `unscale` | `scale` and `offset` in `raster:bands` | Scale and Offset value defined in `scale` and `offset` fields of the corresponding `raster:bands` item | -| `colormap_name` | `rdr:colormap_name` | Color map name defined in `rdr:colormap` field of the `asset` | -| `colormap` | `rdr:colormap` | Color map JSON definition as defined in `rdr:colormap` object of the `asset` (overrides `colormap_name` if present ) | -| `color_formula` | `rdr:color_formula` | Color formula as defined in `rdr:color_formula` field of the `asset` | -| `resampling` | `rdr:resampling` | Resampling method to use when reprojecting the raster. | +| Query key | field | Description | +| --------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| `url` | `href` in item self link | STAC Item URL | +| `assets` | `assets` | Assets keys to use for the tile rendering defined in the `assets` field | +| `rescale` | `rescale` | Delimited Min,Max bounds defined in `rescale` field. | +| `expression` | `expression` | Band arithmetic formula as defined in field `expression` | +| `nodata` | `nodata` or `nodata` `raster:bands` | If not provided in `nodata` field, the nodata value can be read from the `nodata` field of the corresponding `raster:bands` object. | +| `unscale` | `scale` and `offset` in `raster:bands` | Scale and Offset value defined in `scale` and `offset` fields of the corresponding `raster:bands` item | +| `colormap_name` | `colormap_name` | Color map name defined in `colormap` field of the `asset` | +| `colormap` | `colormap` | Color map JSON definition as defined in `colormap` object of the `asset` (overrides `colormap_name` if present ) | +| `color_formula` | `color_formula` | Color formula as defined in `color_formula` field of the `asset` | +| `resampling` | `resampling` | Resampling method to use when reprojecting the raster. | + +Next sections describe some examples of titiler integration. #### Shortwave Infra-red visual thermal signature example From the [Sentinel-2 item](https://github.com/stac-extensions/virtual-assets/blob/main/examples/item-sentinel2.json): ```json -"assets":{ +"renders":{ "sir": { - "roles": [ "overview", "virtual" ], "title": "Shortwave Infra-red", - "vrt:hrefs": [ - { "key": "swir22", "href": "https://raw.githubusercontent.com/stac-extensions/raster/main/examples/item-sentinel2.json#/assets/B12"}, - { "key": "nir2", "href": "https://raw.githubusercontent.com/stac-extensions/raster/main/examples/item-sentinel2.json#/assets/B8A"}, - { "key": "red", "href": "https://raw.githubusercontent.com/stac-extensions/raster/main/examples/item-sentinel2.json#/assets/B12"}], - "vrt:rescale": [[0,5000],[0,7000],[0,9000]] + "assets": [ "swir22", "nir2", "red" ], + "rescale": [[0,5000],[0,7000],[0,9000]], + "resampling": "nearest" } } ``` -| Query key | value | Example value | -| --------- | ----------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| url | STAC Item URL | `https://raw.githubusercontent.com/stac-extensions/raster/main/examples/item-sentinel2.json` | -| assets | Assets keys defined in the `bands` objects with field `asset_key` | `B12,B8A,B04` | -| rescale | Delimited Min,Max bounds defined in `vrt:rescale` field | `0,5000,0,7000,0,9000` | +| Query key | value | Example value | +| --------- | --------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| url | STAC Item URL | `https://raw.githubusercontent.com/stac-extensions/raster/main/examples/item-sentinel2.json` | +| assets | Assets keys defined in the `assets` fields | `B12,B8A,B04` | +| rescale | Delimited Min,Max bounds defined in `rescale` field | `0,5000,0,7000,0,9000` | URL: `https://api.cogeo.xyz/stac/crop/14.869,37.682,15.113,37.862/256x256.png?url=https://raw.githubusercontent.com/stac-extensions/raster/main/examples/item-sentinel2.json&assets=B12,B8A,B04&resampling_method=average&rescale=0,5000,0,7000,0,9000&return_mask=true` @@ -99,34 +143,47 @@ URL: `https://api.cogeo.xyz/stac/crop/14.869,37.682,15.113,37.862/256x256.png?ur #### Normalized Difference Vegetation Index (NDVI) example From the [Landsat-8 example](examples/item-landsat8.json) \[[article](https://www.usgs.gov/core-science-systems/nli/landsat/landsat-normalized-difference-vegetation-index?qt-science_support_page_related_con=0#qt-science_support_page_related_con)]: +This example uses the [virtual assets](https://github.com/stac-extensions/virtual-assets) to define the NDVI asset first because in this use case, +the NDVI asset could also be downloaded as a standalone asset. ```json "assets":{ "ndvi": { "roles": [ "virtual", "data", "index" ], + "type": "image/vnd.stac.geotiff; cloud-optimized=true", + "href": "https://raw.githubusercontent.com/stac-extensions/render/main/examples/item-landsat8.json#/assets/ndvi", "vrt:hrefs": [ - { "key": "B04", "href": "#/assets/B04"}, - { "key": "B05", "href": "#/assets/B05"}], + { "key": "B04", "href": "https://raw.githubusercontent.com/stac-extensions/render/main/examples/item-landsat8.json#/assets/B04"}, + { "key": "B05", "href": "https://raw.githubusercontent.com/stac-extensions/render/main/examples/item-landsat8.json#/assets/B05"}], "title": "Normalized Difference Vegetation Index", "vrt:algorithm": "band_arithmetic", "vrt:algorithm_opts": { - "expression": "(B05–B04)/(B05+B04)" + "expression": "(B05–B04)/(B05+B04)", + "rescale": [[-1,1]] }, - "vrt:rescale": [[-1,1]], - "rdr:colormap_name": "ylgn", - "rdr:resampling": "average" + } +}, +"renders":{ + "ndvi": + { + "title": "Normalized Difference Vegetation Index", + "assets": [ "ndvi" ], + "resampling": "average", + "colormap_name": "ylgn" } } ``` -| Query key | value | Example value | -| ----------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------- | -| url | STAC Item URL | `https://raw.githubusercontent.com/stac-extensions/raster/main/examples/item-landsat8.json` | -| rescale | Delimited Min,Max bounds defined in `vrt:rescale` field | `-1,1` | -| expression | Band math formula as defined in field `vrt:algorithm` | `(B5–B4)/(B5+B4)` | -| colormap | Color map JSON definition as defined in `rdr:colormap_name` | `ylgn` | -| resampling_method | Resampling method to use when reprojecting the raster as defined in `rdr:resampling` | `average` | +If this case, the parameters to titiler must be extracted from both the virtual asset definition and the render object. + +| Query key | value | Example value | +| ----------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| url | STAC Item URL | `https://raw.githubusercontent.com/stac-extensions/raster/main/examples/item-landsat8.json` | +| expression | Band math formula as defined in field `vrt:algorithm` | `(B5–B4)/(B5+B4)` | +| rescale | Delimited Min,Max bounds defined in `rescale` field of the `vrt:algorithm_opts` | `-1,1` | +| colormap | Color map JSON definition as defined in `colormap_name` | `ylgn` | +| resampling_method | Resampling method to use when reprojecting the raster as defined in `resampling` | `average` | URL: @@ -136,9 +193,26 @@ Result: Landsat Surface Reflectance Normalized Difference Vegetation Index (NDV ![sacramento](https://api.cogeo.xyz/stac/preview.png?url=https://raw.githubusercontent.com/stac-extensions/raster/main/examples/item-landsat8.json&expression=(B5–B4)/(B5+B4)&max_size=512&width=512&resampling_method=average&rescale=-1,1&color_map=ylgn&return_mask=true) +Obviously, the same rendering can be applied to the source assets without using the virtual asset. + +```json +"renders":{ + "ndvi": + { + "title": "Normalized Difference Vegetation Index", + "assets": [ "B05", "B04" ], + "resampling": "average", + "colormap_name": "ylgn", + "expression": "(B05–B04)/(B05+B04)", + "rescale": [[-1,1]] + } +} +``` + ## Links -It is highly suggested to have a web map link in the `links` section of the STAC Item as described in the [Web Map Link extension](https://github.com/stac-extensions/web-map-links) to allow consumers to easily visualize the asset. +It is highly suggested to have a web map link in the `links` section of the STAC Item as described in the [Web Map Link extension](https://github.com/stac-extensions/web-map-links) to allow application to +find the tiling endpoint of the dynamic tile server. ## Contributing diff --git a/examples/item-landsat8.json b/examples/item-landsat8.json index 266dc4d..9e23a68 100644 --- a/examples/item-landsat8.json +++ b/examples/item-landsat8.json @@ -1,6 +1,12 @@ { "type": "Feature", - "stac_version": "1.0.0-rc.2", + "stac_version": "1.0.0", + "stac_extensions": [ + "https://stac-extensions.github.io/eo/v1.0.0/schema.json", + "https://stac-extensions.github.io/projection/v1.0.0/schema.json", + "https://stac-extensions.github.io/view/v1.0.0/schema.json", + "https://stac-extensions.github.io/virtual-assets/v1.0.0/schema.json" + ], "id": "LC08_L1TP_044033_20210305_20210312_01_T1", "properties": { "gsd": 30, @@ -61,14 +67,6 @@ } ], "assets": { - "thumbnail": { - "href": "https://landsat-pds.s3.us-west-2.amazonaws.com/c1/L8/044/033/LC08_L1TP_044033_20210305_20210312_01_T1/LC08_L1TP_044033_20210305_20210312_01_T1_thumb_large.jpg", - "type": "image/jpeg", - "title": "Thumbnail", - "roles": [ - "thumbnail" - ] - }, "index": { "href": "https://landsat-pds.s3.us-west-2.amazonaws.com/c1/L8/044/033/LC08_L1TP_044033_20210305_20210312_01_T1/index.html", "type": "application/html", @@ -232,6 +230,66 @@ } ], "gsd": 100 + }, + "NDVI": { + "roles": [ + "virtual", + "data", + "index" + ], + "type": "image/vnd.stac.geotiff; cloud-optimized=true", + "href": "https://landsat-pds.s3.us-west-2.amazonaws.com/c1/L8/044/033/LC08_L1TP_044033_20210305_20210312_01_T1#/assets/NDVI", + "vrt:hrefs": [ + "#/assets/B4", + "#/assets/B5" + ], + "title": "Normalized Difference Vegetation Index", + "vrt:algorithm": "band_arithmetic", + "vrt:algorithm_opts": { + "expression": "(B05-B04)/(B05+B04)" + }, + "vrt:rescale": [ + [ + -1, + 1 + ] + ] + } + }, + "renders": { + "thumbnail": { + "title": "Thumbnail", + "assets": [ + "B4", + "B3", + "B2" + ], + "rescale": [ + [ + 0, + 150 + ] + ], + "colormap_name": "rainbow", + "resampling": "bilinear", + "bidx": [ + 1 + ], + "width": 1024, + "height": 1024, + "bands": [ + "B4", + "B3", + "B2" + ] + }, + "ndvi": { + "title": "Normalized Difference Vegetation Index", + "assets": [ + "ndvi" + ], + "resampling": "average", + "colormap_name": "ylgn" } }, "bbox": [ @@ -240,32 +298,5 @@ -120.31321, 39.95894 ], - "stac_extensions": [ - "https://stac-extensions.github.io/eo/v1.0.0/schema.json", - "https://stac-extensions.github.io/projection/v1.0.0/schema.json", - "https://stac-extensions.github.io/view/v1.0.0/schema.json", - "https://stac-extensions.github.io/virtual-assets/v1.0.0/schema.json" - ], - "collection": "landsat-8-l1-c1", - "virtual:assets": { - "NDVI": { - "href": [ - "#B4", - "#B5" - ], - "title": "Normalized Difference Vegetation Index", - "processing:expression": { - "format": "rio-calc", - "expression": "(B05–B04)/(B05+B04)" - }, - "raster:bands": [ - { - "statistics": { - "minimum": -1, - "maximum": 1 - } - } - ] - } - } + "collection": "landsat-8-l1-c1" } \ No newline at end of file diff --git a/examples/item-sentinel2.json b/examples/item-sentinel2.json new file mode 100644 index 0000000..4c0a5b0 --- /dev/null +++ b/examples/item-sentinel2.json @@ -0,0 +1,652 @@ +{ + "type": "Feature", + "stac_version": "1.0.0", + "stac_extensions": [ + "https://stac-extensions.github.io/eo/v1.0.0/schema.json", + "https://stac-extensions.github.io/view/v1.0.0/schema.json", + "https://stac-extensions.github.io/projection/v1.0.0/schema.json", + "https://stac-extensions.github.io/raster/v1.0.0/schema.json", + "https://stac-extensions.github.io/virtual-assets/v1.0.0/schema.json" + ], + "id": "S2B_33SVB_20210221_0_L2A", + "bbox": [ + 13.86148243891681, + 36.95257399124932, + 15.111074610520053, + 37.94752813015372 + ], + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 13.876381589019879, + 36.95257399124932 + ], + [ + 13.86148243891681, + 37.942072015005024 + ], + [ + 15.111074610520053, + 37.94752813015372 + ], + [ + 15.109620666835209, + 36.95783951241028 + ], + [ + 13.876381589019879, + 36.95257399124932 + ] + ] + ] + }, + "properties": { + "datetime": "2021-02-21T10:00:17Z", + "platform": "sentinel-2b", + "constellation": "sentinel-2", + "instruments": [ + "msi" + ], + "gsd": 10, + "view:off_nadir": 0, + "proj:epsg": 32633, + "sentinel:utm_zone": 33, + "sentinel:latitude_band": "S", + "sentinel:grid_square": "VB", + "sentinel:sequence": "0", + "sentinel:product_id": "S2B_MSIL2A_20210221T095029_N0214_R079_T33SVB_20210221T115149", + "sentinel:data_coverage": 100, + "eo:cloud_cover": 21.22, + "sentinel:valid_cloud_cover": true + }, + "collection": "sentinel-s2-l2a-cogs", + "assets": { + "metadata": { + "title": "Original XML metadata", + "type": "application/xml", + "roles": [ + "metadata" + ], + "href": "metadata.xml" + }, + "B01": { + "title": "Band 1 (coastal)", + "type": "image/tiff; application=geotiff; profile=cloud-optimized", + "roles": [ + "data" + ], + "gsd": 60, + "eo:bands": [ + { + "name": "B01", + "common_name": "coastal", + "center_wavelength": 0.4439, + "full_width_half_max": 0.027 + } + ], + "href": "B01.tif", + "proj:shape": [ + 1830, + 1830 + ], + "proj:transform": [ + 60, + 0, + 399960, + 0, + -60, + 4200000, + 0, + 0, + 1 + ], + "raster:bands": [ + { + "data_type": "uint16", + "nodata": 0, + "stats_min": 1, + "stats_max": 20567, + "stats_mean": 2339.4759595597, + "stats_stddev": 3026.6973619954, + "stats_valid_percent": 99.83, + "values": [ + { + "name": "BOA reflectance" + } + ] + } + ] + }, + "B02": { + "title": "Band 2 (blue)", + "type": "image/tiff; application=geotiff; profile=cloud-optimized", + "roles": [ + "data" + ], + "gsd": 10, + "eo:bands": [ + { + "name": "B02", + "common_name": "blue", + "center_wavelength": 0.4966, + "full_width_half_max": 0.098 + } + ], + "href": "B02.tif", + "proj:shape": [ + 10980, + 10980 + ], + "proj:transform": [ + 10, + 0, + 399960, + 0, + -10, + 4200000, + 0, + 0, + 1 + ], + "raster:bands": [ + { + "data_type": "uint16", + "nodata": 0, + "stats_min": 1, + "stats_max": 19264, + "stats_mean": 2348.069117847, + "stats_stddev": 2916.5446249911, + "stats_valid_percent": 99.99, + "values": [ + { + "name": "BOA reflectance" + } + ] + } + ] + }, + "B03": { + "title": "Band 3 (green)", + "type": "image/tiff; application=geotiff; profile=cloud-optimized", + "roles": [ + "data" + ], + "gsd": 10, + "eo:bands": [ + { + "name": "B03", + "common_name": "green", + "center_wavelength": 0.56, + "full_width_half_max": 0.045 + } + ], + "href": "B03.tif", + "proj:shape": [ + 10980, + 10980 + ], + "proj:transform": [ + 10, + 0, + 399960, + 0, + -10, + 4200000, + 0, + 0, + 1 + ], + "raster:bands": [ + { + "data_type": "uint16", + "nodata": 0, + "stats_min": 1, + "stats_max": 18064, + "stats_mean": 2384.4680007438, + "stats_stddev": 2675.410513295, + "stats_valid_percent": 99.999, + "values": [ + { + "name": "BOA reflectance" + } + ] + } + ] + }, + "B04": { + "title": "Band 4 (red)", + "type": "image/tiff; application=geotiff; profile=cloud-optimized", + "roles": [ + "data" + ], + "gsd": 10, + "eo:bands": [ + { + "name": "B04", + "common_name": "red", + "center_wavelength": 0.6645, + "full_width_half_max": 0.038 + } + ], + "href": "B04.tif", + "proj:shape": [ + 10980, + 10980 + ], + "proj:transform": [ + 10, + 0, + 399960, + 0, + -10, + 4200000, + 0, + 0, + 1 + ], + "raster:bands": [ + { + "data_type": "uint16", + "nodata": 0, + "stats_min": 1, + "stats_max": 17200, + "stats_mean": 2273.9667970732, + "stats_stddev": 2618.272802792, + "stats_valid_percent": 99.999, + "values": [ + { + "name": "BOA reflectance" + } + ] + } + ] + }, + "B05": { + "title": "Band 5", + "type": "image/tiff; application=geotiff; profile=cloud-optimized", + "roles": [ + "data" + ], + "gsd": 20, + "eo:bands": [ + { + "name": "B05", + "center_wavelength": 0.7039, + "full_width_half_max": 0.019 + } + ], + "href": "B05.tif", + "proj:shape": [ + 5490, + 5490 + ], + "proj:transform": [ + 20, + 0, + 399960, + 0, + -20, + 4200000, + 0, + 0, + 1 + ], + "raster:bands": [ + { + "data_type": "uint16", + "nodata": 0, + "stats_min": 1, + "stats_max": 16842, + "stats_mean": 2634.1490243416, + "stats_stddev": 2634.1490243416, + "stats_valid_percent": 99.999, + "values": [ + { + "name": "BOA reflectance" + } + ] + } + ] + }, + "B06": { + "title": "Band 6", + "type": "image/tiff; application=geotiff; profile=cloud-optimized", + "roles": [ + "data" + ], + "gsd": 20, + "eo:bands": [ + { + "name": "B06", + "center_wavelength": 0.7402, + "full_width_half_max": 0.018 + } + ], + "href": "B06.tif", + "proj:shape": [ + 5490, + 5490 + ], + "proj:transform": [ + 20, + 0, + 399960, + 0, + -20, + 4200000, + 0, + 0, + 1 + ], + "raster:bands": [ + { + "data_type": "uint16", + "nodata": 0, + "stats_min": 1, + "stats_max": 16502, + "stats_mean": 3329.8844628619, + "stats_stddev": 2303.0096294469, + "stats_valid_percent": 99.999, + "values": [ + { + "name": "BOA reflectance" + } + ] + } + ] + }, + "B07": { + "title": "Band 7", + "type": "image/tiff; application=geotiff; profile=cloud-optimized", + "roles": [ + "data" + ], + "gsd": 20, + "eo:bands": [ + { + "name": "B07", + "center_wavelength": 0.7825, + "full_width_half_max": 0.028 + } + ], + "href": "B07.tif", + "proj:shape": [ + 5490, + 5490 + ], + "proj:transform": [ + 20, + 0, + 399960, + 0, + -20, + 4200000, + 0, + 0, + 1 + ] + }, + "B08": { + "title": "Band 8 (nir)", + "type": "image/tiff; application=geotiff; profile=cloud-optimized", + "roles": [ + "data" + ], + "gsd": 10, + "eo:bands": [ + { + "name": "B08", + "common_name": "nir", + "center_wavelength": 0.8351, + "full_width_half_max": 0.145 + } + ], + "href": "B08.tif", + "proj:shape": [ + 10980, + 10980 + ], + "proj:transform": [ + 10, + 0, + 399960, + 0, + -10, + 4200000, + 0, + 0, + 1 + ] + }, + "B8A": { + "title": "Band 8A", + "type": "image/tiff; application=geotiff; profile=cloud-optimized", + "roles": [ + "data" + ], + "gsd": 20, + "eo:bands": [ + { + "name": "B8A", + "center_wavelength": 0.8648, + "full_width_half_max": 0.033 + } + ], + "href": "B8A.tif", + "proj:shape": [ + 5490, + 5490 + ], + "proj:transform": [ + 20, + 0, + 399960, + 0, + -20, + 4200000, + 0, + 0, + 1 + ] + }, + "B09": { + "title": "Band 9", + "type": "image/tiff; application=geotiff; profile=cloud-optimized", + "roles": [ + "data" + ], + "gsd": 60, + "eo:bands": [ + { + "name": "B09", + "center_wavelength": 0.945, + "full_width_half_max": 0.026 + } + ], + "href": "B09.tif", + "proj:shape": [ + 1830, + 1830 + ], + "proj:transform": [ + 60, + 0, + 399960, + 0, + -60, + 4200000, + 0, + 0, + 1 + ] + }, + "B11": { + "title": "Band 11 (swir16)", + "type": "image/tiff; application=geotiff; profile=cloud-optimized", + "roles": [ + "data" + ], + "gsd": 20, + "eo:bands": [ + { + "name": "B11", + "common_name": "swir16", + "center_wavelength": 1.6137, + "full_width_half_max": 0.143 + } + ], + "href": "B11.tif", + "proj:shape": [ + 5490, + 5490 + ], + "proj:transform": [ + 20, + 0, + 399960, + 0, + -20, + 4200000, + 0, + 0, + 1 + ] + }, + "B12": { + "title": "Band 12 (swir22)", + "type": "image/tiff; application=geotiff; profile=cloud-optimized", + "roles": [ + "data" + ], + "gsd": 20, + "eo:bands": [ + { + "name": "B12", + "common_name": "swir22", + "center_wavelength": 2.22024, + "full_width_half_max": 0.242 + } + ], + "href": "B12.tif", + "proj:shape": [ + 5490, + 5490 + ], + "proj:transform": [ + 20, + 0, + 399960, + 0, + -20, + 4200000, + 0, + 0, + 1 + ] + }, + "AOT": { + "title": "Aerosol Optical Thickness (AOT)", + "type": "image/tiff; application=geotiff; profile=cloud-optimized", + "roles": [ + "data" + ], + "href": "AOT.tif", + "proj:shape": [ + 1830, + 1830 + ], + "proj:transform": [ + 60, + 0, + 399960, + 0, + -60, + 4200000, + 0, + 0, + 1 + ] + }, + "WVP": { + "title": "Water Vapour (WVP)", + "type": "image/tiff; application=geotiff; profile=cloud-optimized", + "roles": [ + "data" + ], + "href": "WVP.tif", + "proj:shape": [ + 10980, + 10980 + ], + "proj:transform": [ + 10, + 0, + 399960, + 0, + -10, + 4200000, + 0, + 0, + 1 + ] + }, + "SCL": { + "title": "Scene Classification Map (SCL)", + "type": "image/tiff; application=geotiff; profile=cloud-optimized", + "roles": [ + "data" + ], + "href": "SCL.tif", + "proj:shape": [ + 5490, + 5490 + ], + "proj:transform": [ + 20, + 0, + 399960, + 0, + -20, + 4200000, + 0, + 0, + 1 + ] + } + }, + "renders": { + "sir": { + "title": "Shortwave Infra-red", + "assets": [ + "swir22", + "nir2", + "red" + ], + "rescale": [ + [ + 0, + 5000 + ], + [ + 0, + 7000 + ], + [ + 0, + 9000 + ] + ], + "resampling": "nearest" + } + }, + "links": [ + { + "rel": "collection", + "href": "./collection.json", + "type": "application/json", + "title": "Sentinel-2 L2A Cogs Collection" + } + ] +} \ No newline at end of file diff --git a/json-schema/schema.json b/json-schema/schema.json index 58bff46..ac58dd9 100644 --- a/json-schema/schema.json +++ b/json-schema/schema.json @@ -137,16 +137,16 @@ "$comment": "Add your new fields here. Don't require them here, do that above in the corresponding schema.", "type": "object", "properties": { - "rdr:colormap_name": { + "colormap_name": { "type": "string" }, - "rdr:colormap": { + "colormap": { "type": "object" }, - "rdr:color_formula": { + "color_formula": { "type": "string" }, - "rdr:minmax_zoom": { + "minmax_zoom": { "type": "array", "items": { "type": "number" @@ -154,7 +154,7 @@ } }, "patternProperties": { - "^(?!rdr:)": { + "^(?!)": { "$comment": "Above, change `template` to the prefix of this extension" } },