Skip to content

Commit

Permalink
feat: add Attributions to data assets & ensure the proper stac ext is…
Browse files Browse the repository at this point in the history
… assigned
  • Loading branch information
A-Behairi committed Feb 14, 2025
1 parent bf63d15 commit 6dd5b73
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/eodash_catalog/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 6dd5b73

Please sign in to comment.