ecmwf / earthkit-data

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

Reading GeoTIFFs with rioxarray/rasterio #503

Closed chpolste closed 1 week ago

chpolste commented 4 weeks ago

A basic reader for GeoTIFF files using rioxarray under the hood. To address #120.

There is not much in terms of metadata extraction other than the projection information yet, but many GeoTIFFs don't provide much metadata in the first place, unfortunately.

I have configured the reader to apply masking and scaling to the values by default, even though rioxarray doesn't.

Small things adjusted along the way:

FussyDuck commented 4 weeks ago

CLA assistant check
All committers have signed the CLA.

sandorkertesz commented 3 weeks ago

@chpolste , thank you very much for this development. I tested it and works nicely. I made a few comments, once these and the branch conflict are sorted out the PR can be merged.

As for the documentation, what notebook example do you think should be added? What should it highlight?

codecov-commenter commented 1 week ago

Codecov Report

Attention: Patch coverage is 85.71429% with 3 lines in your changes missing coverage. Please review.

Project coverage is 91.08%. Comparing base (acda540) to head (2598847). Report is 7 commits behind head on develop.

Files with missing lines Patch % Lines
tests/readers/test_geotiff_reader.py 85.71% 2 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #503 +/- ## =========================================== - Coverage 91.09% 91.08% -0.02% =========================================== Files 147 148 +1 Lines 10744 10765 +21 Branches 510 511 +1 =========================================== + Hits 9787 9805 +18 - Misses 794 796 +2 - Partials 163 164 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features: