hydromt icon indicating copy to clipboard operation
hydromt copied to clipboard

consistently use pyproj CRS object

Open DirkEilander opened this issue 2 years ago • 0 comments

Currently we use both the rasterio.crs.CRS (default in rasterio and rioxarray) and pyproj.CRS (default in geopandas) object to represent a CRS. I suggest to consistently use the latter.

differences in attributes/methods include:

  • the is_valid, is_epsg_code attributes are only available for the raster CRS class
  • the linear_units_factor attribute is only available in the rasterio CRS
  • pyproj.CRS class is not a supported type for rasterio.warp.calculate_default_transform (to be checked).

resources https://pyproj4.github.io/pyproj/stable/crs_compatibility.html

TODO

  • [ ] identify and fix potential issues in core and plugins
  • [ ] potentially add a rio_crs property in the RasterDataset class to use internally when needed for rasterio
  • [ ] requires #208 to be finished in order deal with CRS in LumpedModel class.

DirkEilander avatar Oct 28 '22 13:10 DirkEilander