-
Notifications
You must be signed in to change notification settings - Fork 123
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
Implement alternate
extension
#593
Comments
I think we probably want to keep this logic contained to the extension implementation rather than implementing it as part of item: pystac.Item = ...
alt_ext = AlternateExtension.ext(item)
s3_asset = alt_ext.get_asset("red", "s3")
print(s3_asset.href)
# s3://some-bucket...
I'm getting a 404 for that resource. Is there another example we could take a look at?
Not sure I totally understand this request. Any Asset that gets returned would just be a normal |
Ok that makes sense. It would be nice to have something a bit more transparent...like some assets may have an s3 URL and some may not. Here's an updated example: The In that case I'd rather not build in that logic and just say "get me the s3 URLs if they exist. This is related to the last question...see the example above. The alternate asset is not a complete description of the asset but only |
Thanks, I'll use that for testing and fleshing out the implementation.
That makes sense. It should be straightforward to merge the top-level |
This implementation is going to be a bit different from our typical extension implementations, so I want to give some time for feedback. I'm moving this into the next minor release so we don't hold up 1.4. |
@matthewhanson I don't think I'm going to be able to implement this for the 1.5 release. If you (or someone else) has availability to work on this that would be helpful. Otherwise I'll push this off to a future release. |
Add the alternate extension: https://github.com/stac-extensions/alternate-assets
Would be nice to have an easy way to to fetch an Asset that includes the alternate asset URL in place of the normal URL.
for example,
And the asset returned has an href equal to the s3 URL rather than the original one from the asset.
In addition, alternate assets may contain fields from other extensions (e.g., storage), see:
https://ibhoyw8md9.execute-api.us-west-2.amazonaws.com/prod/collections/landsat-c2l1/items/LC08_L1TP_225099_20210731_20210731_02_T1
Those should be merged into the asset returned (overriding any existing property)
The text was updated successfully, but these errors were encountered: