Skip to content

Commit

Permalink
added stac title if in metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
clausmichele authored and pindge committed Apr 3, 2023
1 parent 6172394 commit cf53808
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cubedash/_stac.py
Original file line number Diff line number Diff line change
Expand Up @@ -807,9 +807,13 @@ def _stac_collection(collection: str) -> Collection:
(summary.time_earliest, summary.time_latest) if summary else (None, None)
)
footprint = all_time_summary.footprint_wgs84
if "title" in dataset_type.definition.get("metadata"):
title = dataset_type.definition.get("metadata")["title"]
else:
title = summary.name
stac_collection = Collection(
id=summary.name,
title=summary.name,
title=title,
license=_utils.product_license(dataset_type),
description=dataset_type.definition.get("description"),
providers=[],
Expand Down

0 comments on commit cf53808

Please sign in to comment.