From 69bdf64a36f95d346742166e9861b852c9b23e63 Mon Sep 17 00:00:00 2001 From: Emma Ai Date: Fri, 12 Apr 2024 14:22:39 +0930 Subject: [PATCH] populate uris in eo3 ds with stac url (#152) * populate uris in eo3 ds with stac url * format file * correct variable type * populate uris with self-ref-href * correct variable type --------- Co-authored-by: emmaai --- odc/stac/eo3/_eo3converter.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/odc/stac/eo3/_eo3converter.py b/odc/stac/eo3/_eo3converter.py index 98da004..67e3672 100644 --- a/odc/stac/eo3/_eo3converter.py +++ b/odc/stac/eo3/_eo3converter.py @@ -215,7 +215,6 @@ def _to_dataset( "$schema": "https://schemas.opendatacube.org/dataset", "crs": str(crs), "grids": grids, - "location": "", "measurements": measurements, "properties": dicttoolz.keymap( lambda k: STAC_TO_EO3_RENAMES.get(k, k), properties @@ -223,7 +222,7 @@ def _to_dataset( "lineage": {}, } - return Dataset(product, prep_eo3(ds_doc), uris=[ds_doc.get("location", "")]) + return Dataset(product, prep_eo3(ds_doc), uris=[item.href if item.href else ""]) def _item_to_ds(