GlacioHack / geoutils

Analysis of georeferenced rasters and vectors
https://geoutils.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
81 stars 19 forks source link

Re-organize raster and vector functionalities as separate functions #539

Open rhugonnet opened 4 months ago

rhugonnet commented 4 months ago

Already mentioned when discussing #383, we need to move out all function of Raster and Vector to live outside the class, both to facilitate the Xarray accessor and tests.

Here's an idea of structure, adding new modules:

In geoutils/:

raster/ -- accessor.py (Xarray raster accessor) -- distance.py (proximity) -- georef.py (for reproject, crop)

vector/ -- geometric.py (buffer_with_overlap) -- georef.py (reproject, crop)

raster_vector_interface.py (rasterize, polygonize, create_mask, to_pointcloud)

adehecq commented 3 months ago

I guess all these submodules would never have to be called by the user, as all the functions would be implemented as class methods? If so, this sounds good !

rhugonnet commented 3 months ago

Yes exactly!