-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CF-compliant storage for lon/lat case #2236
Conversation
Test that datasets are stored in a CF-compliant way when the area has a geodetic (unprojected) CRS, such as a CRS described in latitude and longitude. The test is currently failing due to pytroll#2227.
In the CF lonlat test, make sure the test scene dataset has CRS and x/y coordinates like a real scene.
Add a test for the da2cf encoding when the area has lon/lat coordinates.
When we have a lon/lat grid mapping, write the coordinate units as degrees rather than metre. This commit also includes some refactoring in cf_writer.py.
Codecov Report
@@ Coverage Diff @@
## main #2236 +/- ##
==========================================
+ Coverage 94.12% 94.16% +0.03%
==========================================
Files 294 294
Lines 45189 45279 +90
==========================================
+ Hits 42536 42635 +99
+ Misses 2653 2644 -9
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Refactor the make_fake_scene helper function to reduce the cyclomatic complexity.
Refactor CFWriter._is_projected to reduce the cyclomatic complexity
Fix a bug in make_fake_scene that I introduced while refactoring. Passing area=False will now once again return a scene without areas defined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little nervous by the moving of the two _encode_X
calls, but since the tests aren't failing then I guess we'll find out later if it is a problem.
Looks good to me. Thanks for fixing it.
Improve the test coverage after refactoring the CF writer, now testing more cases when units are provided but no area.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Store datasets with an area using a geodetic CRS (unprojected longitude/latitude) in a CF-compliant way.
Work in progress.