From 6dd5b73a07c6be5bc75f16004f403327df0101ab Mon Sep 17 00:00:00 2001 From: A-Behairi Date: Fri, 14 Feb 2025 17:24:43 +0100 Subject: [PATCH] feat: add Attributions to data assets & ensure the proper stac ext is assigned --- src/eodash_catalog/endpoints.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/eodash_catalog/endpoints.py b/src/eodash_catalog/endpoints.py index b698dbd..b984f9d 100644 --- a/src/eodash_catalog/endpoints.py +++ b/src/eodash_catalog/endpoints.py @@ -671,6 +671,9 @@ def add_visualization_info( ) -> None: extra_fields: dict[str, list[str] | dict[str, str]] = {} if "Attribution" in endpoint_config: + stac_object.stac_extensions.append( + "https://stac-extensions.github.io/attribution/v0.1.0/schema.json" + ) extra_fields["attribution"] = endpoint_config["Attribution"] # add extension reference if endpoint_config["Name"] == "Sentinel Hub" or endpoint_config["Name"] == "Sentinel Hub WMS": @@ -992,6 +995,11 @@ def handle_raw_source( assets=assets, extra_fields={}, ) + if "Attribution" in endpoint_config: + item.stac_extensions.append( + "https://stac-extensions.github.io/attribution/v0.1.0/schema.json" + ) + asset.extra_fields["attribution"] = endpoint_config["Attribution"] add_projection_info( endpoint_config, item,