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

Use ContextLib ExitStack to manage opening/closing rasterio dataset #459

Merged
merged 2 commits into from Nov 16, 2021

Conversation

vincentsarago
Copy link
Member

this PR change how we manage rasterio dataset opened within the COGReader.

This change enables working with the future rasterio version 1.3 which introduce the support for FilePath object (e.g fsspec)

with fsspec.open("...") as f:
    with COGReader(f) as cog:
        print(cog.info())

@vincentsarago vincentsarago merged commit ab1bbd4 into master Nov 16, 2021
@vincentsarago vincentsarago deleted the ctxExitStack branch November 16, 2021 20:58
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 this pull request may close these issues.

None yet

3 participants