feat: interpolate {datetime} in if sel includes {dim}={datetime}#78
Merged
feat: interpolate {datetime} in if sel includes {dim}={datetime}#78
Conversation
|
📚 Documentation preview will be available at: https://developmentseed.github.io/titiler-cmr/pr-previews/pr-78/ Status: ✅ Preview is ready! |
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
vincentsarago
approved these changes
Oct 3, 2025
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.
Before this change, it was impossible to use the time series API for datasets that needed
sel: time={timestamp}. I originally tried adding a time series API query parameter to explicitly pass the datetime parameter onto the array ofselvalues (#76), but it was clunky and I thought a string interpolation approach would be more flexible and easier to specify in downstream applications.Now if a user provides
time={datetime}in theselarray, titiler-cmr will automatically pluck thedatetimequery parameter value and interpolate it into thetime=string. I put some examples in the notebooks.I think this is a good idea for titiler-cmr because temporal queries are a critical component of the whole application and extending the
datetimeparameter to be useful within theselcontext will make it more useful for at least two datasets 😅 .