Skip to content

Commit

Permalink
schema
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelmathot committed Oct 11, 2023
1 parent e5594f9 commit 647b773
Show file tree
Hide file tree
Showing 7 changed files with 911 additions and 733 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
- **Field Name Prefix:** rdr
- **Scope:** Item, Collection
- **Extension [Maturity Classification](https://github.com/radiantearth/stac-spec/tree/master/extensions/README.md#extension-maturity):** Proposal
- **Owner**: @emmanuelmathot @abarciauskas-bgse
- **Owner**: @emmanuelmathot @abarciauskas-bgse @smohiudd

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 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
- [Sentinel-2 example](examples/item-sentinel2.json): Shows the basic usage of the extension in a Sentinel-2 STAC Item
- [Collection example](examples/collection.json): Shows the basic usage of the extension in a collection
- [JSON Schema](json-schema/schema.json)
- [Changelog](./CHANGELOG.md)

Expand Down Expand Up @@ -60,7 +62,8 @@ The assets MUST be local assets defined in the same item.
## 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.
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" ]
Expand All @@ -79,7 +82,8 @@ It is specified as a 2 dimensions array of delimited Min,Max range per band.
]
```

A prescaling can also be performed according to the `offset` and `scale` fields value of the [raster](https://github.com/stac-extensions/raster) extension.
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

Expand Down Expand Up @@ -211,7 +215,8 @@ Obviously, the same rendering can be applied to the source assets without using

## 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 application to
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
Expand Down
74 changes: 44 additions & 30 deletions examples/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/item-assets/v1.0.0/schema.json",
"https://stac-extensions.github.io/render/v1.0.0/schema.json"
"https://stac-extensions.github.io/render/v1.0.0/schema.json",
"https://stac-extensions.github.io/virtual-assets/v1.0.0/schema.json"
],
"type": "Collection",
"id": "collection",
"title": "A title",
"description": "A description",
"id": "senitnel2-l2a",
"title": "Sentinel-2 L2A",
"description": "Sentinel-2 L2A data",
"license": "Apache-2.0",
"extent": {
"spatial": {
Expand All @@ -29,29 +30,46 @@
]
}
},
"template:new_field": "test",
"template:xyz": {
"x": 1,
"y": 2,
"z": 3
},
"template:another_one": [
1,
2,
3
],
"assets": {
"example": {
"href": "https://example.com/examples/file.xyz",
"template:new_field": "test"
}
},
"assets": {},
"item_assets": {
"data": {
"ndvi": {
"roles": [
"data"
"virtual",
"data",
"index"
],
"type": "image/vnd.stac.geotiff; cloud-optimized=true",
"vrt:hrefs": [
{
"key": "red",
"href": "#/assets/red"
},
{
"key": "nir",
"href": "#/assets/nir"
}
],
"template:new_field": "test"
"title": "Normalized Difference Vegetation Index",
"vrt:algorithm": "band_arithmetic",
"vrt:algorithm_opts": {
"expression": "(B05-B04)/(B05+B04)",
"rescale": [
[
-1,
1
]
]
}
}
},
"renders": {
"ndvi": {
"title": "Normalized Difference Vegetation Index",
"assets": [
"ndvi"
],
"resampling": "average",
"colormap_name": "ylgn"
}
},
"summaries": {
Expand All @@ -62,12 +80,8 @@
},
"links": [
{
"href": "https://example.com/examples/collection.json",
"href": "https://example.com/examples/collection/sentinel2-l2a.json",
"rel": "self"
},
{
"href": "https://example.com/examples/item.json",
"rel": "item"
}
]
}
}
33 changes: 23 additions & 10 deletions examples/item-landsat8.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"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/render/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",
Expand Down Expand Up @@ -64,6 +65,12 @@
"rel": "xyz",
"type": "image/png",
"title": "RGB composite visualized through a XYZ"
},
{
"rel": "collection",
"href": "https://landsat-stac.s3.amazonaws.com/collections/landsat-8-l1.json",
"type": "application/json",
"title": "The full collection"
}
],
"assets": {
Expand Down Expand Up @@ -231,7 +238,7 @@
],
"gsd": 100
},
"NDVI": {
"ndvi": {
"roles": [
"virtual",
"data",
Expand All @@ -240,20 +247,26 @@
"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"
{
"key": "B4",
"href": "#/assets/B4"
},
{
"key": "B5",
"href": "#/assets/B5"
}
],
"title": "Normalized Difference Vegetation Index",
"vrt:algorithm": "band_arithmetic",
"vrt:algorithm_opts": {
"expression": "(B05-B04)/(B05+B04)"
},
"vrt:rescale": [
[
-1,
1
"expression": "(B05-B04)/(B05+B04)",
"rescale": [
[
-1,
1
]
]
]
}
}
},
"renders": {
Expand Down
Loading

0 comments on commit 647b773

Please sign in to comment.