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

Sign DataFrames from stac-geoparquet #54

Open
TomAugspurger opened this issue Mar 19, 2023 · 0 comments
Open

Sign DataFrames from stac-geoparquet #54

TomAugspurger opened this issue Mar 19, 2023 · 0 comments

Comments

@TomAugspurger
Copy link

xref microsoft/PlanetaryComputer#200

It might be handy to take a semi-well defined DataFrame schema (maybe just an assets field with dict / object dtype?), like those returned by stac-geoparquet, and sign the URLs under it.

catalog = pystac_client.Client.open(
    "https://planetarycomputer.microsoft.com/api/stac/v1/",
    modifier=planetary_computer.sign_inplace,
)


asset = catalog.get_collection("io-lulc-9-class").assets["geoparquet-items"]

df = geopandas.read_parquet(
    asset.href, storage_options=asset.extra_fields["table:storage_options"]
)

df = planetary_computer.sign(df)

And now the URLs in df are signed.

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

1 participant