Skip to content

Commit

Permalink
fix: update driver_based_loader
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirill888 committed Jun 20, 2024
1 parent 8192d80 commit 2313fd3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions datacube/storage/_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ def driver_based_load(

if extra_dims is None:
extra_dims = {}
extra_coords = {k: FixedCoord(k, []) for k in extra_dims}
extra_coords = [FixedCoord(k, []) for k in extra_dims]

rdr = reader_driver(driver)

tss = [
datetime.utcfromtimestamp(float(ts) * 1e-9)
for ts in sources.coords["time"].data.ravel()
]
band_query = [m.name for m in measurements]
band_query: list[str] = [m.name for m in measurements]
load_cfg = {
m.name: RasterLoadParams(
m.dtype,
Expand All @@ -70,7 +70,7 @@ def driver_based_load(
)
for m in measurements
},
aliases={name: (name, 1) for name in band_query},
aliases={name: [(name, 1)] for name in band_query},
extra_dims=extra_dims,
extra_coords=extra_coords,
)
Expand All @@ -84,9 +84,9 @@ def driver_based_load(
else:
chunk_shape = (1, 2048, 2048)

gbt = GeoboxTiles(geobox, chunk_shape[1:])
gbt = GeoboxTiles(geobox, (chunk_shape[1], chunk_shape[2]))

tyx_bins = {} # (int,int,int) -> [int]
tyx_bins: dict[tuple[int, int, int], list[int]] = {}
srcs = []

if patch_url is None:
Expand Down

0 comments on commit 2313fd3

Please sign in to comment.