Skip to content

Commit

Permalink
sqme: load_cfg/dims fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirill888 committed Jun 25, 2024
1 parent 2f8cf31 commit 5f57c9a
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions datacube/storage/_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,10 @@ def driver_based_load(
for ts in sources.coords["time"].data.ravel()
]
band_query: list[str] = [m.name for m in measurements]
load_cfg = {
m.name: RasterLoadParams(
m.dtype,
m.nodata,
resampling=m.get("resampling", "nearest"),
fail_on_error=fail_on_error,
)
for m in measurements
}
template = RasterGroupMetadata(
bands={
(m.name, 1): RasterBandMetadata(
m.dtype, m.nodata, m.units, dims=m.get("dims", None)
m.dtype, m.nodata, m.units, dims=tuple(m.get("dims", ()))
)
for m in measurements
},
Expand All @@ -101,6 +92,17 @@ def driver_based_load(
extra_coords=extra_coords,
)

load_cfg = {
m.name: RasterLoadParams(
m.dtype,
m.nodata,
resampling=m.get("resampling", "nearest"),
fail_on_error=fail_on_error,
dims=tuple(m.get("dims", ())),
)
for m in measurements
}

chunks = dask_chunks

if chunks is not None:
Expand Down

0 comments on commit 5f57c9a

Please sign in to comment.