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

Support relative asset links #20

Open
gjoseph92 opened this issue Mar 28, 2021 · 1 comment
Open

Support relative asset links #20

gjoseph92 opened this issue Mar 28, 2021 · 1 comment

Comments

@gjoseph92
Copy link
Owner

I'm sure we don't handle it correctly right now. This will be necessary to work with any self-contained catalog or relative published catalog, which could be particularly useful if working with local data.

There's perhaps a larger question here about whether we want to use PySTAC internally instead of raw JSON, since it would handle this (and other things, like item assets #4) for us.

@maawoo
Copy link

maawoo commented May 9, 2022

For anyone who wants to bypass this issue without having to adjust the STAC Catalog on disk:

import pystac
import stackstac

stac_catalog = pystac.Catalog.from_file('path/to/my/catalog.json')
stac_catalog.make_all_asset_hrefs_absolute() # only in-memory
ds = stackstac.stack(items=stac_catalog)

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

No branches or pull requests

2 participants