Skip to content

Commit 647b773

Browse files
schema
1 parent e5594f9 commit 647b773

File tree

7 files changed

+911
-733
lines changed

7 files changed

+911
-733
lines changed

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@
55
- **Field Name Prefix:** rdr
66
- **Scope:** Item, Collection
77
- **Extension [Maturity Classification](https://github.com/radiantearth/stac-spec/tree/master/extensions/README.md#extension-maturity):** Proposal
8-
- **Owner**: @emmanuelmathot @abarciauskas-bgse
8+
- **Owner**: @emmanuelmathot @abarciauskas-bgse @smohiudd
99

1010
This document explains the Rendering Extension to the [SpatioTemporal Asset Catalog](https://github.com/radiantearth/stac-spec) (STAC) specification.
1111

1212
Rendering extension aims at providings consumers with the possible rendering of an item or a collection (e.g. on a online map)
1313

1414
- Examples:
1515
- [Landsat-8 example](examples/item-landsat8.json): Shows the basic usage of the extension in a landsat-8 STAC Item
16+
- [Sentinel-2 example](examples/item-sentinel2.json): Shows the basic usage of the extension in a Sentinel-2 STAC Item
17+
- [Collection example](examples/collection.json): Shows the basic usage of the extension in a collection
1618
- [JSON Schema](json-schema/schema.json)
1719
- [Changelog](./CHANGELOG.md)
1820

@@ -60,7 +62,8 @@ The assets MUST be local assets defined in the same item.
6062
## Positioning
6163

6264
The positioning of the source assets is defined by their position in the `assets` array.
63-
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.
65+
Typically, in the case of the composition of a RGB image, the first pointer would be the red band,
66+
the second the green band and the third the blue band.
6467

6568
```json
6669
"assets": [ "red", "green", "blue" ]
@@ -79,7 +82,8 @@ It is specified as a 2 dimensions array of delimited Min,Max range per band.
7982
]
8083
```
8184

82-
A prescaling can also be performed according to the `offset` and `scale` fields value of the [raster](https://github.com/stac-extensions/raster) extension.
85+
A prescaling can also be performed according to the `offset` and `scale` fields value of the
86+
[raster](https://github.com/stac-extensions/raster) extension.
8387

8488
## Dynamic tile servers integration
8589

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

212216
## Links
213217

214-
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
218+
It is highly suggested to have a web map link in the `links` section of the STAC Item as described in the
219+
[Web Map Link extension](https://github.com/stac-extensions/web-map-links) to allow application to
215220
find the tiling endpoint of the dynamic tile server.
216221

217222
## Contributing

examples/collection.json

Lines changed: 44 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
"stac_version": "1.0.0",
33
"stac_extensions": [
44
"https://stac-extensions.github.io/item-assets/v1.0.0/schema.json",
5-
"https://stac-extensions.github.io/render/v1.0.0/schema.json"
5+
"https://stac-extensions.github.io/render/v1.0.0/schema.json",
6+
"https://stac-extensions.github.io/virtual-assets/v1.0.0/schema.json"
67
],
78
"type": "Collection",
8-
"id": "collection",
9-
"title": "A title",
10-
"description": "A description",
9+
"id": "senitnel2-l2a",
10+
"title": "Sentinel-2 L2A",
11+
"description": "Sentinel-2 L2A data",
1112
"license": "Apache-2.0",
1213
"extent": {
1314
"spatial": {
@@ -29,29 +30,46 @@
2930
]
3031
}
3132
},
32-
"template:new_field": "test",
33-
"template:xyz": {
34-
"x": 1,
35-
"y": 2,
36-
"z": 3
37-
},
38-
"template:another_one": [
39-
1,
40-
2,
41-
3
42-
],
43-
"assets": {
44-
"example": {
45-
"href": "https://example.com/examples/file.xyz",
46-
"template:new_field": "test"
47-
}
48-
},
33+
"assets": {},
4934
"item_assets": {
50-
"data": {
35+
"ndvi": {
5136
"roles": [
52-
"data"
37+
"virtual",
38+
"data",
39+
"index"
40+
],
41+
"type": "image/vnd.stac.geotiff; cloud-optimized=true",
42+
"vrt:hrefs": [
43+
{
44+
"key": "red",
45+
"href": "#/assets/red"
46+
},
47+
{
48+
"key": "nir",
49+
"href": "#/assets/nir"
50+
}
5351
],
54-
"template:new_field": "test"
52+
"title": "Normalized Difference Vegetation Index",
53+
"vrt:algorithm": "band_arithmetic",
54+
"vrt:algorithm_opts": {
55+
"expression": "(B05-B04)/(B05+B04)",
56+
"rescale": [
57+
[
58+
-1,
59+
1
60+
]
61+
]
62+
}
63+
}
64+
},
65+
"renders": {
66+
"ndvi": {
67+
"title": "Normalized Difference Vegetation Index",
68+
"assets": [
69+
"ndvi"
70+
],
71+
"resampling": "average",
72+
"colormap_name": "ylgn"
5573
}
5674
},
5775
"summaries": {
@@ -62,12 +80,8 @@
6280
},
6381
"links": [
6482
{
65-
"href": "https://example.com/examples/collection.json",
83+
"href": "https://example.com/examples/collection/sentinel2-l2a.json",
6684
"rel": "self"
67-
},
68-
{
69-
"href": "https://example.com/examples/item.json",
70-
"rel": "item"
7185
}
7286
]
73-
}
87+
}

examples/item-landsat8.json

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"https://stac-extensions.github.io/eo/v1.0.0/schema.json",
66
"https://stac-extensions.github.io/projection/v1.0.0/schema.json",
77
"https://stac-extensions.github.io/view/v1.0.0/schema.json",
8+
"https://stac-extensions.github.io/render/v1.0.0/schema.json",
89
"https://stac-extensions.github.io/virtual-assets/v1.0.0/schema.json"
910
],
1011
"id": "LC08_L1TP_044033_20210305_20210312_01_T1",
@@ -64,6 +65,12 @@
6465
"rel": "xyz",
6566
"type": "image/png",
6667
"title": "RGB composite visualized through a XYZ"
68+
},
69+
{
70+
"rel": "collection",
71+
"href": "https://landsat-stac.s3.amazonaws.com/collections/landsat-8-l1.json",
72+
"type": "application/json",
73+
"title": "The full collection"
6774
}
6875
],
6976
"assets": {
@@ -231,7 +238,7 @@
231238
],
232239
"gsd": 100
233240
},
234-
"NDVI": {
241+
"ndvi": {
235242
"roles": [
236243
"virtual",
237244
"data",
@@ -240,20 +247,26 @@
240247
"type": "image/vnd.stac.geotiff; cloud-optimized=true",
241248
"href": "https://landsat-pds.s3.us-west-2.amazonaws.com/c1/L8/044/033/LC08_L1TP_044033_20210305_20210312_01_T1#/assets/NDVI",
242249
"vrt:hrefs": [
243-
"#/assets/B4",
244-
"#/assets/B5"
250+
{
251+
"key": "B4",
252+
"href": "#/assets/B4"
253+
},
254+
{
255+
"key": "B5",
256+
"href": "#/assets/B5"
257+
}
245258
],
246259
"title": "Normalized Difference Vegetation Index",
247260
"vrt:algorithm": "band_arithmetic",
248261
"vrt:algorithm_opts": {
249-
"expression": "(B05-B04)/(B05+B04)"
250-
},
251-
"vrt:rescale": [
252-
[
253-
-1,
254-
1
262+
"expression": "(B05-B04)/(B05+B04)",
263+
"rescale": [
264+
[
265+
-1,
266+
1
267+
]
255268
]
256-
]
269+
}
257270
}
258271
},
259272
"renders": {

0 commit comments

Comments
 (0)