Added tileLevelMin/Max and colormap details to STAC xcube:data_vars#940
Open
edd3x wants to merge 11 commits intoxcube-dev:mainfrom
Open
Added tileLevelMin/Max and colormap details to STAC xcube:data_vars#940edd3x wants to merge 11 commits intoxcube-dev:mainfrom
edd3x wants to merge 11 commits intoxcube-dev:mainfrom
Conversation
…C xcube:data_vars
forman
reviewed
Mar 6, 2024
Member
There was a problem hiding this comment.
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!
Member
|
Hey @edd3x, FYI, we haven't started the activity yet, but it is still on the roadmap for spring 2024. |
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[Description of PR]
Currently, our web visualisation development team have been using the
/datasetsendpoint from the xcube server API which providestileLevelMin,tileLevelMax,colorBarName,colorBarMaxandcolorBarMinper data variable as part of the JSON output. We are however changing toows.stacvia the/ogcendpoint 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
DatasetsContextto derive the tiling scheme and get the colormap details usingderive_tiling_scheme()andget_color_mapping()inxcube/webapi/ows/stac/controllers.pyso thexcube:data_varsin the STAC item JSON output will return the additional variables liketileLevelMin,tileLevelMax,colorBarName,colorBarMaxandcolorBarMin.I created a new method
_get_xc_data_variablesand_get_xc_data_variableto return thexcube:data_vars.Checklist:
xcube/webapi/ows/stac/controllers.pyCHANGES.md