jgrss / geowombat

GeoWombat: Utilities for geospatial data
https://geowombat.readthedocs.io
MIT License
182 stars 10 forks source link

Coordinating efforts on potential new geospatial Xarray accessor #283

Open rhugonnet opened 11 months ago

rhugonnet commented 11 months ago

Hi all,

First of all, thanks for the great work on GeoWombat!

We are thinking of building Xarray accessors for end-users focusing on analysis of EO data in our packages GeoUtils and xDEM for raster/vector and DEM analysis (https://geoutils.readthedocs.io/en/stable/, https://xdem.readthedocs.io/en/stable/), and thought it would be great to reach out and hear what you think, what makes sense and how we could coordinate, given the bit of overlap and everything you've already implemented in GeoWombat :slightly_smiling_face: ! Related Xarray/Rioxarray issues here: https://github.com/corteva/rioxarray/issues/687.

More context: As in GeoWombat, in GeoUtils (that is only based on rasterio and geopandas), one of our primary purpose has been to facilitate raster/vector interfacing and geo-referencing operations. As you know well, rasterio (or rioxarray) are fairly "low-level" to allow flexibility for any type of GIS user, and this makes higher-level end-user operations (e.g., match-reference for cropping, reprojection, rasterization or vectorization) inconsistent and sometimes hard to perform. To remedy this, we defined Raster and Vector classes that interface easily and implicitly allow for those higher-level ops, and were thinking of making their methods API also available as an Xarray accessor to allow more scalability and being part of the Xarray ecosystem.

For xDEM, I see little overlap. However, for GeoUtils, if we build an accessor, I see some potential overlap between our efforts:

That's it, otherwise I see minimal overlap on the rest of our functionalities! Those include notably:

Tell me what you think!

jgrss commented 10 months ago

Hi @rhugonnet thanks for the note with background and references. I need to look over your package in more detail, but my quick reaction.

The facilitated geo-manipulation

Merging efforts could make sense. Within our config manager, we basically just have rasterio/WarpedVRT and dask.delayed methods. I could see having many of the Xarray/Dask warping methods elsewhere while maintaining the same geowombat API.

The side focus on satellite imagery

This is intriguing. We could do better in terms of supporting more sensors. But we could also benefit from a centralized location as you suggest.

rhugonnet commented 10 months ago

Thanks for the feedback @jgrss!

I could see having many of the Xarray/Dask warping methods elsewhere while maintaining the same geowombat API.

Yes, that makes sense. Technically, how would you see this? A repo built on the same rasterio/dask logic, or probably using directly rioxarray? It might also make sense to contribute there directly for some aspects, but probably not all. If we write our own accessor in GeoUtils, it would essentially wrap rioxarray with facilitated logic for passing metadata between vectors/rasters in any CRS (match-reference, point interpretation, etc, but I'm not sure just adding this feature justifies a whole new repo; having WarpedVRT support would already justify it much more).

We could do better in terms of supporting more sensors. But we could also benefit from a centralized location as you suggest.

Yes, it'd be great but probably the most work! I feel there are a lot of efforts distributed all throughout the Python landscape for satellite imagery... (to the point that I probably don't even know half of them). The Xarray ecosystem needs it. Would need someone very motivated to start this up!