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

[ENH] add stac reader using the intake-stac driver #278

Closed
wants to merge 1 commit into from

Conversation

acocac
Copy link
Member

@acocac acocac commented Jul 27, 2022

The PR aims to incorporate stac catalogs in scivision. There is a intake driver to explore them, however, the filename is not a YAML/YML file.

Changes required

  • add or create a new function to intake-stac driver in reader.py.

@acocac acocac added the enhancement New feature or request label Jul 27, 2022
@acocac acocac added this to the Scivision phase 2 milestone Jul 27, 2022
@acocac
Copy link
Member Author

acocac commented Jul 27, 2022

PR related to #232

@acocac acocac changed the title [WIP] add stac reader using the intake-stac driver [ENH] add stac reader using the intake-stac driver Jul 27, 2022
@edwardchalstrey1
Copy link
Contributor

edwardchalstrey1 commented Jul 28, 2022

We can use the tutorial here to help: https://intake-stac.readthedocs.io/en/latest/tutorial.html

@edwardchalstrey1
Copy link
Contributor

edwardchalstrey1 commented Jul 28, 2022

@acocac It looks like a problem here is that the intake_stac.StacCollection class doesn't yet have a to_dask() function implemented

Edit: Ok I was doing this wrong somehow, I see this works on their quickstart instructions: https://github.com/intake/intake-stac#quickstart

@acocac
Copy link
Member Author

acocac commented Jul 28, 2022

@edwardchalstrey1 thanks for having at look at the PR. @ots22 and I discussed which was the most practical approach in the latest co-working session. We have two routes:

  1. contribute to the intake-stac driver.
  2. use other libraries supporting fetching STAC items into xarray objects. We have two options: odc-stac or stackstac. Which is the most optimal? Sharing a benchmark comparison and discussion of some differences between both developments.

@edwardchalstrey1
Copy link
Contributor

2. discussion

@acocac It seems like intake-stac should already work provided the json "collection" is set up similarly to this

I think the best way to decide which route to go down is to pick some datasets to add, then we can use those as examples to help decide the best method.

Is there one in particular you would like to add?

@acocac
Copy link
Member Author

acocac commented Jul 28, 2022

I'd suggest starting with those collections which don't require authentication.

For instance, we can try with a STAC catalog hosted in AWS, https://stacindex.org/catalogs/earth-search#/

and try to load this collection:
https://stacindex.org/catalogs/earth-search#/Cnz1sryATwWudkxyZekxWx6356v9RmvvCcLLw79uHWJUDvt2?t=2

If we're successful, then we can connect the fetched collection with CV models suited for satellite images, see for instance a recent discussion in one of the repositories of the Urban Grammar project.

@edwardchalstrey1
Copy link
Contributor

This branch is superseded by the branch stac-load

@edwardchalstrey1
Copy link
Contributor

Closing due to #318

@edwardchalstrey1 edwardchalstrey1 deleted the add-intake-stac branch January 3, 2023 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants