pyproj4 / pyproj

Python interface to PROJ (cartographic projections and coordinate transformations library)

Home Page:https://pyproj4.github.io/pyproj

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

test_azimuthal_equidistant fails with PROJ 9.4.0

sebastic opened this issue · comments

Problem description

The testsuite fails with PROJ 9.4.0:

=================================== FAILURES ===================================
__________________________ 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              
E         ...Full output truncated (28 lines hidden), use '-vv' to show 

test/crs/test_crs_cf.py:1206: AssertionError
=============================== warnings summary ===============================
test/test_datadir.py::test_get_data_dir__from_user[str]
test/test_datadir.py::test_get_data_dir__from_user[Path]
test/test_datadir.py::test_append_data_dir__internal[str]
test/test_datadir.py::test_append_data_dir__internal[Path]
  /usr/lib/python3/dist-packages/pyproj/datadir.py:38: UserWarning: pyproj unable to set database path.
    _global_context_set_data_dir()

test/test_doctest_wrapper.py::test_doctests
  /usr/lib/python3/dist-packages/pyproj/geod.py:829: UserWarning: Back azimuth is being returned by default to be compatible with inv()This is a breaking change for pyproj 3.5+.To avoid this warning, set return_back_azimuth=True.Otherwise, to restore old behaviour, set return_back_azimuth=False.This warning will be removed in future version.
    warnings.warn(

test/test_doctest_wrapper.py::test_doctests
  /usr/lib/python3/dist-packages/pyproj/geod.py:681: UserWarning: Back azimuth is being returned by default to be compatible with fwd()This is a breaking change for pyproj 3.5+.To avoid this warning, set return_back_azimuth=True.Otherwise, to restore old behaviour, set return_back_azimuth=False.This warning will be removed in future version.
    warnings.warn(

test/test_transform.py::test_transform_single_point_nad83_to_nad27
  /tmp/autopkgtest-lxc.lpfzw26l/downtmp/autopkgtest_tmp/build/test/test_transform.py:65: FutureWarning: This function is deprecated. See: https://pyproj4.github.io/pyproj/stable/gotchas.html#upgrading-to-pyproj-2-from-pyproj-1
    x2, y2 = transform(p1, p2, x1, y1)

test/test_transform.py::test_transform_tuple_nad83_to_nad27
  /tmp/autopkgtest-lxc.lpfzw26l/downtmp/autopkgtest_tmp/build/test/test_transform.py:111: FutureWarning: This function is deprecated. See: https://pyproj4.github.io/pyproj/stable/gotchas.html#upgrading-to-pyproj-2-from-pyproj-1
    x2, y2 = transform(p1, p2, x1, y1)

test/test_transformer.py::test_transformer_group_allow_superseded_filter
  /usr/lib/python3/dist-packages/pyproj/transformer.py:207: UserWarning: Best transformation is not available due to missing Grid(short_name=au_icsm_National_84_02_07_01.tif, full_name=, package_name=, url=https://cdn.proj.org/au_icsm_National_84_02_07_01.tif, direct_download=True, open_license=True, available=False)
    super().__init__(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED test/crs/test_crs_cf.py::test_azimuthal_equidistant - AssertionError: ...
===== 1 failed, 942 passed, 3 skipped, 58 deselected, 9 warnings in 24.99s =====

https://ci.debian.net/packages/p/python-pyproj/unstable/amd64/43357084/

Installation method

Debian packages

Resolved by: #1380