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

Allow rio.to_raster with a BytesIO object #668

Open
SarahG-579462 opened this issue Apr 14, 2023 · 3 comments
Open

Allow rio.to_raster with a BytesIO object #668

SarahG-579462 opened this issue Apr 14, 2023 · 3 comments
Labels
proposal Idea for a new feature.

Comments

@SarahG-579462
Copy link

Please consider adding support for in-memory rasterizing, rasterio supports this with MemoryFile, which could be written to a BytesIO object for easier cross-compatibility.

@SarahG-579462 SarahG-579462 added the proposal Idea for a new feature. label Apr 14, 2023
@snowman2
Copy link
Member

Related: #204

@jessjaco
Copy link

jessjaco commented May 16, 2023

This works, as recommended in the planetary computer documentation.

with io.BytesIO() as buffer:
    d.rio.to_raster(buffer, driver="COG")
    buffer.seek(0)

@snowman2
Copy link
Member

Related #309

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Idea for a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants