datetime filter does not work as specified?
Closed this issue · 2 comments
drzhouq commented
number of landsat8 scene since 2018-01-01 is 684, but 558 since 2017-01-01. What did I do wrong? or there is a bug?
curl "https://sat-api.developmentseed.org/search/stac" -d '{"collection":"landsat-8", "limit":1, "datetime":"2018-01-01"}' -H 'Content-Type: application/json' -X POST -s|jq ".properties.found"
684
curl "https://sat-api.developmentseed.org/search/stac" -d '{"collection":"landsat-8", "limit":1, "datetime":"2017-01-01"}' -H 'Content-Type: application/json' -X POST -s|jq ".properties.found"
558
matthewhanson commented
Hi @drzhouq if you provide a single date to datetime it will search for matches just for that datetime, it's not a range by default. If you want a range, such as from that date until today you'll need to provide both beginning and ending datetime by using a slash, e.g.
"datetime": "2018-01-01/2018-05-16"
drzhouq commented
I thought it took current date as the ending date if an ending date is not provided. Thanks for the clarification and help.