You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks to #210 it is now possible to save dask arrays with rasterio. One feature I'd really like to see so I can completely replace my existing geotiff writer (in Satpy's dependent package trollimage) is the ability to return a dask Delayed object by passing compute=False to the dask.array.store function. See store's documentation here: https://docs.dask.org/en/latest/array-api.html#dask.array.store
Complications I see with this are that currently the to_raster method doesn't return anything. Another one is that I've had issues in the past with trollimage handling the delayed objects because it required opening the file object (the rasterio one) and then requiring the user to close it (return the open file object handle and the delayed object). My understanding of #210 is that you aren't opening the file until it is being written to so this may not be an issue.
The text was updated successfully, but these errors were encountered:
🤔 I'm not sure I'll have the time this week (or this month), but if you're OK adding an optional return value to to_raster then maybe it'll be OK. I don't think I've contributed code to rioxarray and I've never really used it directly so it might take a bit. Does my assumption about passing the path instead of an open file object sound accurate? Meaning, to_raster should probably be OK only returning a Delayed object?
Sounds like a good opportunity to try it out and dig in. I am happy to answer questions if you have any.
Does my assumption about passing the path instead of an open file object sound accurate? Meaning, to_raster should probably be OK only returning a Delayed object?
Sounds right. The file is closed after each operation, so the user shouldn't have to manage anything. But, always a good idea to test out the theory.
Thanks to #210 it is now possible to save dask arrays with rasterio. One feature I'd really like to see so I can completely replace my existing geotiff writer (in Satpy's dependent package trollimage) is the ability to return a dask Delayed object by passing
compute=False
to thedask.array.store
function. See store's documentation here: https://docs.dask.org/en/latest/array-api.html#dask.array.storeComplications I see with this are that currently the
to_raster
method doesn't return anything. Another one is that I've had issues in the past with trollimage handling the delayed objects because it required opening the file object (the rasterio one) and then requiring the user to close it (return the open file object handle and the delayed object). My understanding of #210 is that you aren't opening the file until it is being written to so this may not be an issue.The text was updated successfully, but these errors were encountered: