-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added tileLevelMin/Max and colormap details to STAC xcube:data_vars #940
base: main
Are you sure you want to change the base?
Conversation
…C xcube:data_vars
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @edd3x, thanks for the PR. The extension to data variables is very useful and code looks good!
In fact, we plan to deprecate the /datasets
endpoint and use only STAC. Then, I'm sure we'll need to enrich the data variable object by even more information. To be compatible with such an extension, we might put the extra information into a dedicated object, either as an object in attrs
or as new own property extra
or similar. We'll let you know here asap. Stay tuned and thanks!
Hey @edd3x, FYI, we haven't started the activity yet, but it is still on the roadmap for spring 2024. |
[Description of PR]
Currently, our web visualisation development team have been using the
/datasets
endpoint from the xcube server API which providestileLevelMin
,tileLevelMax
,colorBarName
,colorBarMax
andcolorBarMin
per data variable as part of the JSON output. We are however changing toows.stac
via the/ogc
endpoint because it's faster, but the STAC JSON output does not provide the above-listed attributes.What I have done here is to use the
DatasetsContext
to derive the tiling scheme and get the colormap details usingderive_tiling_scheme()
andget_color_mapping()
inxcube/webapi/ows/stac/controllers.py
so thexcube:data_vars
in the STAC item JSON output will return the additional variables liketileLevelMin
,tileLevelMax
,colorBarName
,colorBarMax
andcolorBarMin
.I created a new method
_get_xc_data_variables
and_get_xc_data_variable
to return thexcube:data_vars
.Checklist:
xcube/webapi/ows/stac/controllers.py
CHANGES.md