hydromt icon indicating copy to clipboard operation
hydromt copied to clipboard

new GeoDataset

Open DirkEilander opened this issue 3 years ago • 1 comments

This new implementation of the GeoDataset allows for any geometry type (not only points) to be combined with multi-dimensional data. My suggestion is to develop it next the current implementation which we will remove in a future release.

TODO:

  • [x] parse GeoDataFrames to GeoDataset
  • [x] GeoDataset to netcdf with conversion of geometry to wkb
  • [ ] parse netcdf with wkb to GeoDataset
  • [ ] write unit tests
  • [ ] decide on data accessor name (geo instead of vector ?)

Related issue: #177

Detailed implementation note: Right now the geometries are saved in the geometry object of the GeoDataset as a geopandas.array.GeoArray which is a numpy duck array type with additional geometry methods. This does not yet implement the __array__function__ method and can therefore not yet be integrated into a coordinate or variable of a xarray Dataset. Instead in an xarray Dataset it is reduced to a normal numpy objects array.

DirkEilander avatar Oct 06 '22 11:10 DirkEilander

@hboisgon Could you already have a look a the implementation and let me know what you agree with the approach?

DirkEilander avatar Oct 06 '22 11:10 DirkEilander

I did write a unit test for an ogr compliant dataset.

Maybe now or in the near future, rename the registration from 'geo' to 'vector'

dalmijn avatar Jan 17 '23 13:01 dalmijn