Skip to content

Commit

Permalink
fix(geobox for acm)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasK committed Jul 3, 2024
1 parent 5459dd4 commit 05e3dcb
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions earthdaily/earthdatastore/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,9 @@ def datacube(
)
if mask_with:
kwargs["dtype"] = "int8"
if "geobox" not in kwargs:
kwargs["geobox"] = xr_datacube.odc.geobox

if clear_cover and mask_statistics is False:
mask_statistics = True
mask_kwargs = dict(mask_statistics=False)
Expand All @@ -797,9 +800,6 @@ def datacube(
bbox=bbox,
groupby_date=None,
assets=mask_asset_mapping[mask_with],
geobox=xr_datacube.odc.geobox
if hasattr(xr_datacube, "odc")
else None,
**kwargs,
)
xr_datacube["time"] = xr_datacube.time.astype("M8[ns]")
Expand All @@ -819,8 +819,6 @@ def datacube(
kwargs.pop("resolution")
if "epsg" in kwargs:
kwargs.pop("epsg")
if "geobox" in kwargs:
kwargs.pop("geobox")

clouds_datacube = datacube(
items,
Expand All @@ -829,9 +827,6 @@ def datacube(
bbox=bbox,
assets=mask_assets,
resampling=0,
geobox=xr_datacube.odc.geobox
if hasattr(xr_datacube, "odc")
else None,
**kwargs,
)
clouds_datacube = cube_utils._match_xy_dims(
Expand Down

0 comments on commit 05e3dcb

Please sign in to comment.