-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Description
We are trying to use a custom colormap configured in the STAC render extension, following the color map JSON definition.
https://github.com/stac-extensions/render?tab=readme-ov-file#render-object
But this is not recognized in TiTiler because the validation of the colormap parameter is expecting a str instead of a dict.
I was able to fix this locally by dumping the JSON dict back into a str when constructing the LayerDict, but I don't know if this is the best solution.
titiler-stacapi/titiler/stacapi/factory.py
Lines 650 to 652 in aaf4249
| # TODO: | |
| # special encoding for ColorMaps | |
| render = layer["render"] or {} |
# TODO:
# special encoding for ColorMaps
render = layer["render"] or {}
if "colormap" in render:
render["colormap"] = json.dumps(render["colormap"])vincentsarago
Metadata
Metadata
Assignees
Labels
No labels