pydata / xarray

N-D labeled arrays and datasets in Python
https://xarray.dev
Apache License 2.0
3.63k stars 1.09k forks source link

New Xarray accessor for rasters through GeoUtils #8041

Open rhugonnet opened 1 year ago

rhugonnet commented 1 year ago

Hi all,

(Co-opening in rioxarray due to the raster nature of the accessor: https://github.com/corteva/rioxarray/issues/687)

As in https://github.com/pydata/xarray/issues/8040 for DEMs, writing an issue to let you know that we intend to write an Xarray accessor to enable functions specific to raster analysis in our package GeoUtils. GeoUtils is built on top of rasterio and aims to facilitate raster/vector manipulation.

To answer the question you'll probably ask: Why the need for another raster accessor when there is rioxarray and xarray-spatial? In short:

The accessor would mirror all the functionalities we have (and future ones) and build them on top of rioxarray and geocube. Those are:

For the accessor name, I was thinking of "geo" or "gu", such as: ds.geo.polygonize(), ds.geo.proximity(), ds.geo.coregister(). I'm not sure if those are already in use. What do you think?

Thanks!

headtr1ck commented 1 year ago

Since your project seems to progress nicely, you could create a PR that adds your package to https://docs.xarray.dev/en/stable/ecosystem.html#ecosystem