Skip to content

Commit

Permalink
support "like=<geobox>" in virtual products
Browse files Browse the repository at this point in the history
  • Loading branch information
uchchwhash committed Oct 6, 2023
1 parent f45ba8c commit 1ac445c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 6 additions & 3 deletions datacube/virtual/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,12 @@ def group(self, datasets: VirtualDatasetBag, **group_settings: Dict[str, Any]) -
merged = merge_search_terms(self, group_settings)

try:
geobox = output_geobox(datasets=selected,
grid_spec=datasets.product_definitions[self._product].grid_spec,
geopolygon=geopolygon, **select_keys(merged, self._GEOBOX_KEYS))
if isinstance(merged.get("like"), GeoBox):
geobox = merged["like"]
else:
geobox = output_geobox(datasets=selected,
grid_spec=datasets.product_definitions[self._product].grid_spec,
geopolygon=geopolygon, **select_keys(merged, self._GEOBOX_KEYS))
load_natively = False

except ValueError:
Expand Down
1 change: 1 addition & 0 deletions docs/about/whats_new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ v1.8.next
- Fix SQLAlchemy calls and pin jsonschema version to suppress deprecation warnings (:pull:`1476`)
- Throw a better error if a dataset is not compatible with ``archive_less_mature`` logic (:pull:`1491`)
- Fix broken Github action workflow (:pull:`1496`)
- Support ``like=<GeoBox>`` in virtual product ``load`` (:pull:`1497`)

v1.8.15 (11th July 2023)
========================
Expand Down

0 comments on commit 1ac445c

Please sign in to comment.