Parallel raster writing using dask and rioxarray #670
GrahamReveley
started this conversation in
General
Replies: 1 comment 2 replies
-
Try this: result.rio.to_raster(
"output.tif",
tiled=True,
lock=<see https://corteva.github.io/rioxarray/stable/examples/dask_read_write.html to determine the best lock for your use case. SerializableLock won't work.>,
compress="LZW",
predictor=2,
) Removed args:
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a way to write compressed rasters in parallel from rioxarray in a robust way?
Every time I've done this (example in the below code) I've ended up with GDAL throwing errors. I've also seen no errors thrown and chunks being written incorrectly (no data/fill values being added into the rasters)
^^^
#lots of delayed dask processing happening beforehand
If anyone has had good experience on this I'd be happy to have some pointers on this. For reference, we're dealing with very very large rasters (could be single or multi band) at 90m globally potentially. It would be great to be able to leverage the full potential of dask/xarray/rioxarray/gdal to output these things faster and more efficiently.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions