Skip to content
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

BUG: Support azimuthal_equidistant coordinate operation to CF #1380

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

snowman2
Copy link
Member

Related: OSGeo/PROJ#3988

_________________________ test_azimuthal_equidistant __________________________

    def test_azimuthal_equidistant():
        crs = CRS("ESRI:54032")
        expected_cf = {
            "semi_major_axis": 6378137.0,
            "semi_minor_axis": crs.ellipsoid.semi_minor_metre,
            "inverse_flattening": crs.ellipsoid.inverse_flattening,
            "reference_ellipsoid_name": "WGS 84",
            "longitude_of_prime_meridian": 0.0,
            "prime_meridian_name": "Greenwich",
            "geographic_crs_name": "WGS 84",
            "horizontal_datum_name": "World Geodetic System 1984",
            "projected_crs_name": "World_Azimuthal_Equidistant",
            "grid_mapping_name": "azimuthal_equidistant",
            "latitude_of_projection_origin": 0.0,
            "longitude_of_projection_origin": 0.0,
            "false_easting": 0.0,
            "false_northing": 0.0,
        }
        cf_dict = crs.to_cf()
        assert cf_dict.pop("crs_wkt").startswith("PROJCRS[")
>       assert cf_dict == expected_cf
E       AssertionError: assert {} == {'false_easti...distant', ...}
E         
E         Right contains 14 more items:
E         {'false_easting': 0.0,
E          'false_northing': 0.0,
E          'geographic_crs_name': 'WGS 84',
E          'grid_mapping_name': 'azimuthal_equidistant',
E          'horizontal_datum_name': 'World Geodetic System 1984',
E          'inverse_flattening': 298.257223563,
E          'latitude_of_projection_origin': 0.0,
E          'longitude_of_prime_meridian': 0.0,
E          'longitude_of_projection_origin': 0.0,
E          'prime_meridian_name': 'Greenwich',
E          'projected_crs_name': 'World_Azimuthal_Equidistant',
E          'reference_ellipsoid_name': 'WGS 84',
E          'semi_major_axis': 6378137.0,
E          'semi_minor_axis': 6356752.314245179}
E         
E         Full diff:
E         + {}
E         - {
E         -     'false_easting': 0.0,
E         -     'false_northing': 0.0,
E         -     'geographic_crs_name': 'WGS 84',
E         -     'grid_mapping_name': 'azimuthal_equidistant',
E         -     'horizontal_datum_name': 'World Geodetic System 1984',
E         -     'inverse_flattening': 298.257223563,
E         -     'latitude_of_projection_origin': 0.0,
E         -     'longitude_of_prime_meridian': 0.0,
E         -     'longitude_of_projection_origin': 0.0,
E         -     'prime_meridian_name': 'Greenwich',
E         -     'projected_crs_name': 'World_Azimuthal_Equidistant',
E         -     'reference_ellipsoid_name': 'WGS 84',
E         -     'semi_major_axis': 6378137.0,
E         -     'semi_minor_axis': 6356752.314245179,
E         - }

@snowman2 snowman2 added the bug label Feb 16, 2024
@snowman2 snowman2 added this to the 3.6.2 milestone Feb 16, 2024
Copy link

codecov bot commented Feb 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (43479b4) 96.40% compared to head (78147e2) 96.56%.
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1380      +/-   ##
==========================================
+ Coverage   96.40%   96.56%   +0.16%     
==========================================
  Files          20       20              
  Lines        1810     1807       -3     
==========================================
  Hits         1745     1745              
+ Misses         65       62       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@snowman2 snowman2 merged commit 1e8f5dd into pyproj4:main Feb 16, 2024
22 checks passed
@snowman2 snowman2 deleted the cf_azimuth branch February 16, 2024 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant