microsoft / microsoft/planetary-computer-apis
Search by datetime in CQL Text
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 129
- Forks
- 33
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 1
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the CQL2 text request against the items endpoint using the timestamp filter shown in the issue, then inspect the filtering behavior and relevant stac-fastapi or stac-api-spec conformance handling. Done means the query returns only items older than 2010 and URL-encoded and unencoded forms behave consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100