ecmwf / earthkit-data

A format-agnostic Python interface for geospatial data
Apache License 2.0
47 stars 9 forks source link

How to support geotiff? #120

Open sandorkertesz opened 1 year ago

sandorkertesz commented 1 year ago

This issue was created to discuss the possible support for geotiff in earthkit-data.

milanavuckovic commented 1 year ago

Thanks for opening this issue, Sandor. Support for geotiff data would be much appreciated in CLIMAAX project.

sandorkertesz commented 1 year ago

Thanks for opening this issue, Sandor. Support for geotiff data would be much appreciated in CLIMAAX project.

Do you have some publicly available data that you have to work with?

milanavuckovic commented 1 year ago

I will send you links.

sandorkertesz commented 9 months ago

I tried to use https://github.com/KipCrossing/geotiff to read geotiff, a noGdal project, but I immediately hit a limitation with the geotiffs from the CLIMAAX Land use data:

  255     return temp_crs_code
    256 elif temp_crs_code == 32767:
--> 257     raise UserDefinedGeoKeyError(crs_error_msg)
    258 else:
    259     raise GeographicTypeGeoKeyError()

UserDefinedGeoKeyError: User-defined GeoKeys are not yet supported.

The github page actually mentions it as a core feature yet to be implemented: "read a user defined CRS 32767 from tiff file"

So I am not sure we can use it in earthkit-data.

corentincarton commented 2 weeks ago

Tagging @chpolste, who will investigate this for the CLIMAAX project.

corentincarton commented 2 weeks ago

From @colonesej, this link could be interesting (to avoid GDAL dependency): https://kipling.medium.com/nogdal-e5b60b114a1c I realise now it points to the same geotiff repo, sorry @sandorkertesz :D