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

Daskify 'rasters' module: roadmap #27

Open
1 of 7 tasks
remi-braun opened this issue Dec 4, 2024 · 2 comments
Open
1 of 7 tasks

Daskify 'rasters' module: roadmap #27

remi-braun opened this issue Dec 4, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@remi-braun
Copy link
Member

remi-braun commented Dec 4, 2024

There is still numerous functions that needs to be daskified, without clear implementation in already used libraries.

  • rasters.sieve: No clear implementation found anywhere. Maybe directly call xr.apply_ufunc like here?
  • rasters.merge_gtiff: No clear implementation found anywhere. Existing implementation in rioxarray but rasterio-based and no sign of Dask in it.
  • rasters.unpackbits: No clear implementation found anywhere. Maybe directly call xr.apply_ufunc because np.unpackbits don't exist in dask?
  • rasters.read_bit_array: Should be straightforward once rasters.unpackbits is daskified
  • rasters.vectorize: use Geoutils
  • rasters.hillshade and rasters.slope: Use xarray-spatial (or xdem, but seems less mature)?
  • rasters.collocate: Use xarray-regrid in case rewriting ref coordinates in place isn't sufficient and reprojecting is too much?
@remi-braun remi-braun added the enhancement New feature or request label Dec 4, 2024
@remi-braun
Copy link
Member Author

Use xarray-spatial in f4b1ff1

@remi-braun
Copy link
Member Author

remi-braun commented Dec 9, 2024

It would be better to use geoutils + xdem rather than xarray-spatial as soon as:

These two libraries allow to daskify a wider range of functions and drop the datashader dependency needed for xarray-spatial.

In geoutils / xdem, I found:

  • ✔️ daskified reprojection + collocate (with Match-reference: a reference raster can be passed to match resolution, bounds and CRS during reprojection. !)
  • ❌ daskified sieve
  • ✔️ daskified merge
  • ❌ daskified unpackbits
  • ✔️ daskified vectorize
  • ✔️ daskified hillshade, slope, aspect, ... in xdem

remi-braun added a commit that referenced this issue Dec 9, 2024
- FIX: Fix vectorization with dask arrays (and remove the silent failure in case of exception when computing)
@remi-braun remi-braun self-assigned this Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant