From 70f527a844d958964d860c6075602652f29e39f5 Mon Sep 17 00:00:00 2001 From: Daniel Thiex Date: Thu, 3 Nov 2022 14:49:30 +0100 Subject: [PATCH 1/2] generate stac catalog at index endpoint --- _build/stacIndex.hbs | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/_build/stacIndex.hbs b/_build/stacIndex.hbs index c260e972..03caa297 100644 --- a/_build/stacIndex.hbs +++ b/_build/stacIndex.hbs @@ -1,5 +1,23 @@ [ -{{#each datasets}} - {"id": "{{OpenEOPID}}", "link": "{{rootUrl}}stac/{{Slug}}.json"}{{#unless @last}},{{/unless}} -{{/each}} +{ + "type": "Catalog", + "stac_version": "1.0.0", + "id": "eurodatacube-collections-catalog", + "description": "A STAC catalog that contains all collections available on the EuroDataCube Browser and within the Sentinel Hub openEO backend.", + "links": [ + { + "href": "{{rootUrl}}stac/index.json", + "rel": "self", + "type": "application/json" + }, + { + "href": "{{rootUrl}}stac/index.json", + "rel": "root", + "type": "application/json" + }, + {{#each datasets}} + {"id": "{{OpenEOPID}}", "rel": "child", "type": "application/json", "href": "{{rootUrl}}stac/{{Slug}}.json"}{{#unless @last}},{{/unless}} + {{/each}} + ] +} ] \ No newline at end of file From 5c5846e83cda650f8224afd8ffa1906b40fac0aa Mon Sep 17 00:00:00 2001 From: Daniel Thiex Date: Thu, 3 Nov 2022 14:50:24 +0100 Subject: [PATCH 2/2] add parent link to collections --- _build/stac.hbs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/_build/stac.hbs b/_build/stac.hbs index 371b70f2..0b952bbb 100644 --- a/_build/stac.hbs +++ b/_build/stac.hbs @@ -33,7 +33,13 @@ "links": [ { "href": "{{rootUrl}}stac/{{Slug}}.json", - "rel": "self" + "rel": "self", + "type": "application/json" + }, + { + "href": "{{rootUrl}}stac/index.json", + "rel": "parent", + "type": "application/json" }, { "href": "{{rootUrl}}{{Slug}}",