-
Notifications
You must be signed in to change notification settings - Fork 11
Add data source for the AWS s3://sentinel-cogs bucket maintained by Element 84. #399
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
base: master
Are you sure you want to change the base?
Conversation
…lement 84. The data source is very similar to Planetary Computer for get_items implementation, so I created an abstract StacSource to handle cases where basically the get_items is just served from a STAC API. I also implemented a StacClient to replace our usage of pystac_client in cases where we are just calling the search endpoint only; the client only supports that one endpoint, but doesn't have the caching issues since the only thing it does beyond making a request is handle pagination in the response.
yawenzzzz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! just a few minor things to fix.
| return SourceItem.deserialize(json.load(f)) | ||
|
|
||
| # No cache or not in cache, so we need to make the STAC request. | ||
| logger.debug("Getting STAC item {name}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing f prefix
| "nir": ["B08"], | ||
| "nir09": ["B09"], | ||
| "swir16": ["B11"], | ||
| "swin22": ["B12"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
swir?
| whether there is a raster in the store matching the source, item, and | ||
| bands. | ||
| """ | ||
| # Always ready since we wrap accesses to Planetary Computer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove "Planetary Computer"
The data source is very similar to Planetary Computer for get_items implementation, so I created an abstract StacSource to handle cases where basically the get_items is just served from a STAC API. I also implemented a StacClient to replace our usage of pystac_client in cases where we are just calling the search endpoint only; the client only supports that one endpoint, but doesn't have the caching issues since the only thing it does beyond making a request is handle pagination in the response.
Also it seems the
aws_open_data.Sentinel2bucket is now free so I updated it to use anonymous access for that. That one has a STAC API so in theory we could greatly simplify get_items implementation by calling that API but I left it otherwise as is for now.