Skip to content

Commit 642a3af

Browse files
committed
fix: use as_dict to reader dependency params [GDD-4068]
1 parent 22c5811 commit 642a3af

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

titiler/stacapi/factory.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,8 @@ def tile(
225225
url=api_params["api_url"],
226226
headers=api_params.get("headers", {}),
227227
tms=tms,
228-
reader_options={**reader_params},
229-
**backend_params,
228+
reader_options={**reader_params.as_dict()},
229+
**backend_params.as_dict(),
230230
) as src_dst:
231231
if MOSAIC_STRICT_ZOOM and (
232232
z < src_dst.minzoom or z > src_dst.maxzoom
@@ -244,9 +244,9 @@ def tile(
244244
tilesize=scale * 256,
245245
pixel_selection=pixel_selection,
246246
threads=MOSAIC_THREADS,
247-
**tile_params,
248-
**layer_params,
249-
**dataset_params,
247+
**tile_params.as_dict(),
248+
**layer_params.as_dict(),
249+
**dataset_params.as_dict(),
250250
)
251251

252252
if post_process:
@@ -262,7 +262,7 @@ def tile(
262262
image,
263263
output_format=format,
264264
colormap=colormap,
265-
**render_params,
265+
**render_params.as_dict(),
266266
)
267267

268268
headers: Dict[str, str] = {}
@@ -865,9 +865,9 @@ def get_tile( # noqa: C901
865865
search_query=search_query,
866866
pixel_selection=pixel_selection,
867867
threads=MOSAIC_THREADS,
868-
**tile_params,
869-
**layer_params,
870-
**dataset_params,
868+
**tile_params.as_dict(),
869+
**layer_params.as_dict(),
870+
**dataset_params.as_dict(),
871871
)
872872

873873
if post_process := get_dependency_params(
@@ -1388,8 +1388,8 @@ def WMTS_getTile(
13881388
url=api_params["api_url"],
13891389
headers=api_params.get("headers", {}),
13901390
tms=tms,
1391-
reader_options={**reader_params},
1392-
**backend_params,
1391+
reader_options={**reader_params.as_dict()},
1392+
**backend_params.as_dict(),
13931393
) as src_dst:
13941394
if MOSAIC_STRICT_ZOOM and (
13951395
z < src_dst.minzoom or z > src_dst.maxzoom
@@ -1407,9 +1407,9 @@ def WMTS_getTile(
14071407
tilesize=256,
14081408
pixel_selection=pixel_selection,
14091409
threads=MOSAIC_THREADS,
1410-
**tile_params,
1411-
**layer_params,
1412-
**dataset_params,
1410+
**tile_params.as_dict(),
1411+
**layer_params.as_dict(),
1412+
**dataset_params.as_dict(),
14131413
)
14141414

14151415
if post_process:
@@ -1425,7 +1425,7 @@ def WMTS_getTile(
14251425
image,
14261426
output_format=format,
14271427
colormap=colormap,
1428-
**render_params,
1428+
**render_params.as_dict(),
14291429
)
14301430

14311431
return Response(content, media_type=media_type)

0 commit comments

Comments
 (0)