opendatacube / datacube-explorer

Web-based exploration of Open Data Cube collections
Apache License 2.0
56 stars 31 forks source link

'datetime' STAC searches don't support all of RFC 3339 #241

Open jeremyh opened 3 years ago

jeremyh commented 3 years ago

We allow stac searches with a datetime property: /stac/search?datetime=

Currently datetime can be a timestamp:

/stac/search?datetime=2018-02-12T23:20:50Z

or a range:

/stac/search?datetime=2018-02-12T00:00:00Z/2018-03-18T12:31:12Z

... and time is optional:

/stac/search?datetime=2018-02-12
/stac/search?datetime=2018-02-12/2018-03-01

But RFC 3339 looks much larger and has many other options. Most notably, newer version of stac-api mention that open ranges are allowed with two dots:

/stac/search?datetime=2018-02-12/...

Short-term, we should at least support these open-ranges, since the Stac docs mention them, and they're easy to implement.

...longer-term, ideally look for a library to parse these ranges rather than implementing them ourselves.

jeremyh commented 3 years ago

Follow-up query to look into: do our range searches handle inclusive/exclusive bounds the same way as expected by Stac?

Do we interpret "ranges" like /stac/search?datetime=2018-02-12/2018-02-12 correctly? (I don't know what "correct" is without research)

jeremyh commented 3 years ago

See also comment by @alexgleith on limitation of current open-range searches: https://github.com/opendatacube/datacube-explorer/pull/243#discussion_r534572906