Skip to content
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

Search by datetime in CQL Text #108

Open
m-mohr opened this issue Jun 28, 2022 · 0 comments
Open

Search by datetime in CQL Text #108

m-mohr opened this issue Jun 28, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@m-mohr
Copy link

m-mohr commented Jun 28, 2022

Describe the bug
As datetime is not supported directly, as seen in #100, I'm now trying to use CQL which was mentioned as alternative.

I want to filter by timestamp on the datetime field, e.g.
https://planetarycomputer.microsoft.com/api/stac/v1/collections/chloris-biomass/items?limit=12&filter-lang=cql2-text&filter=datetime < TIMESTAMP('2010-01-01T01%3A00%3A00.000Z') (also tried the URL encoded variant)

Instead of results that are older than 2010, I also get results that are newer than 2010. It looks like the filter is not taken into account at all.

Is CQL not supported on the items endpoint? Some of the conformance classes around filtering are a bit of a mess in stac-fastapi and stac-api-spec currently, so I'm just guessing...

To reproduce
See above.

Expected behavior
See above.

@m-mohr m-mohr added the bug Something isn't working label Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant