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

stac copy with SELF_CONTAINED still has absolute links for assets #31

Closed
cholmes opened this issue Jan 14, 2021 · 0 comments · Fixed by #34
Closed

stac copy with SELF_CONTAINED still has absolute links for assets #31

cholmes opened this issue Jan 14, 2021 · 0 comments · Fixed by #34

Comments

@cholmes
Copy link
Contributor

cholmes commented Jan 14, 2021

The main goal I'm trying to accomplish here is to be able to make a stac catalog that has asset links that are all relative, so I can upload to the cloud or zip up and send to someone. One route I tried was move-assets, and my problems there are in #30.

The other thing I was hoping would help was to do stac copy -t SELF_CONTAINED. I assumed that it would make it so all the asset links would turn relative. This didn't happen, they all just stayed absolute, even if I included the assets in my copying. I also tried RELATIVE_PUBLISHED, and it didn't work either.

Maybe I'm expecting too much, and the assets should have their links updated with move-assets, but if so then we need to figure out #30, and then should also put a note here.

lossyrob added a commit to stac-utils/pystac that referenced this issue Jan 14, 2021
Previously only link href types (absolute vs relative) were modified
as part of the `Catalog.save` process based on the catalog types: for
ABSOLUTE_PUBLISHED, all link hrefs were made absolute, etc. The asset
HREFs were not modified, which was counter to the expected result
outlined in stac-utils/stactools#31.

This change causes asset HREFs to also be changed to absolute or
relative based on the catalog type. Note that if the asset HREF cannot
be made relative, e.g. the asset HREF points to an HTTP location and
the item is being stored locally, then the HREF is left unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant