Alan D. Snow

Results 400 comments of Alan D. Snow

It would definitely be a nice feature to have. One gotcha to watch out for is that reprojection considers points outside of the dask chunk due to resampling.

I wonder if `WarpedVRT` could be useful here? I bet there is a way to have each chunk lazily loaded in from disk and reprojected using the data on disk...

- https://rasterio.readthedocs.io/en/latest/topics/virtual-warping.html - https://rasterio.readthedocs.io/en/latest/topics/concurrency.html

> just doing the warping when you ask for it It should just do it when you ask for it - lazy loading as I understand it.

> The only thing spanning thread boundaries are numpy arrays that are read from a geotiff in the main thread This is exactly the bit I am plugging for -...

https://rasterio.readthedocs.io/en/latest/api/rasterio.vrt.html > Abstracts the details of raster warping and allows access to data that is reprojected when read.

I read through the code, and it seems like it is already possible to do - You can pass in `rasterio.WarpedVRT`: https://corteva.github.io/rioxarray/stable/rioxarray.html#rioxarray-open-rasterio I haven't tested loading it in parallel with...

Looks like the ODC group has a nice solution for dask reprojection: https://github.com/corteva/rioxarray/issues/130#issuecomment-645766627

> You think we can steal that code? It would be a lot of code to take over. There are some bits from the `datacube-core` to pull in as well...

Opened an issue: https://github.com/opendatacube/odc-tools/issues/58 :crossed_fingers: