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

load_stac: omit time interval in STAC API search request if no temporal extent provided #950

Closed
bossie opened this issue Nov 26, 2024 · 3 comments · Fixed by Open-EO/openeo-python-driver#330 or #952
Assignees

Comments

@bossie
Copy link
Collaborator

bossie commented Nov 26, 2024

If a date-time interval is passed to a STAC API search request, VITO STAC APIs will only consider including items for which the datetime property is set; items that lack a datetime and instead specify a start_datetime/end_datetime will not be returned even if they intersect the given interval.

As discussed, the STAC API will probably be adapted to include these items but seeing as it takes time to include these changes in the upstream repo, a quicker fix would be to omit the time interval from the search request; in this case the STAC API will return all items, as one would expect.

One obstacle is the fact that without a given temporal extent, OpenEO will fall back to ["1970-01-01", "2070-01-01"] pretty early in the process graph evaluation.

@bossie
Copy link
Collaborator Author

bossie commented Nov 26, 2024

bossie added a commit to Open-EO/openeo-python-driver that referenced this issue Nov 28, 2024
bossie added a commit to Open-EO/openeo-python-driver that referenced this issue Nov 28, 2024
* assert default temporal extent

Open-EO/openeo-geopyspark-driver#950

* quick fix to allow omitting datetime from item search request

Open-EO/openeo-geopyspark-driver#950
@bossie bossie linked a pull request Nov 28, 2024 that will close this issue
@bossie
Copy link
Collaborator Author

bossie commented Nov 28, 2024

Quick-fixed by:

  • exposing the default temporal extent applied by ProcessGraphDeserializer;
  • comparing this sentinel value (by reference) in load_stac and if recognized, omitting the datetime property from the item search request.

This should:

  • only affect this request and not other code that relies on this interval;
  • only omit the datetime property if the client does not provide a temporal_extent, not if the client actually requests temporal extent ["1970-01-01", "2070-01-01"] (unlikely).

@bossie
Copy link
Collaborator Author

bossie commented Nov 28, 2024

@VincentVerelst: this is available on CDSE dev (someone aborted the deploy to staging).

Please try it out; the STAC API request should be in the logs (INFO level) so you can check for the presence of the datetime parameter there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment