Skip to content

Commit

Permalink
filter for different processing versions
Browse files Browse the repository at this point in the history
  • Loading branch information
konstntokas committed Nov 28, 2024
1 parent 64c1075 commit 6ee21e7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions xcube_stac/store_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,10 +518,14 @@ def open_data(
)
open_params["asset_names"] = [asset.extra_fields["id"] for asset in assets]

grouped_items = groupby_solar_day(items)
if is_valid_ml_data_type(data_type) or opener_id.split(":")[0] == "mldataset":
raise NotImplementedError("mldataset not supported in stacking mode")
else:
if self._stack_mode == "odc-stac":
items_odc_stac = [
item for sublist in grouped_items.values() for item in sublist
]
items = [self._helper.parse_item(item, **open_params) for item in items]
bbox = open_params["bbox"]
odc_stac_params = dict(
Expand All @@ -534,11 +538,10 @@ def open_data(
y=(bbox[1], bbox[3]),
)
ds = odc.stac.load(
items,
items_odc_stac,
**odc_stac_params,
)
else:
grouped_items = groupby_solar_day(items)
ds = self.stack_items(grouped_items, **open_params)
ds.attrs["stac_catalog_url"] = self._catalog.get_self_href()
ds.attrs["stac_item_ids"] = dict(
Expand Down

0 comments on commit 6ee21e7

Please sign in to comment.