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

PROJ 7.1.0 #599

Closed
snowman2 opened this issue Apr 14, 2020 · 7 comments · Fixed by #665
Closed

PROJ 7.1.0 #599

snowman2 opened this issue Apr 14, 2020 · 7 comments · Fixed by #665

Comments

@snowman2
Copy link
Member

snowman2 commented Apr 14, 2020

https://github.com/OSGeo/PROJ/milestone/22

Expected release: July 01, 2020

Relevant to pyproj

Currently, pyproj is using these deprecated methods proj_list_angular_units and proj_list_linear_units. So, I think that pyproj 3 should require PROJ 7.1+, and update to be future compatible.

@mmodenesi
Copy link
Contributor

The required release 7.1.0 is not yet available. When trying to pip install -e . following the CONTRIBUTING.md guides, one gets

(devel) root@20585a61b60d:/src/pyproj# pip install -e .
Obtaining file:///src/pyproj
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /opt/conda/envs/devel/bin/python /opt/conda/envs/devel/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpyuelewwh
       cwd: /src/pyproj
  Complete output (1 lines):
  ERROR: Minimum supported proj version is 7.1.0, installed version is 7.0.0. For more information see: https://pyproj4.github.io/pyproj/stable/installation.html
  ----------------------------------------
ERROR: Command errored out with exit status 1: /opt/conda/envs/devel/bin/python /opt/conda/envs/devel/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpyuelewwh Check the logs for full command output.

@sebastic
Copy link
Contributor

There are two test failures with PROJ 7.1.0-rc2:

=================================== FAILURES ===================================
_________________ test_transformer__operations__scope_remarks __________________

    def test_transformer__operations__scope_remarks():
        transformer = TransformerGroup(28356, 7856).transformers[0]
        assert transformer.scope is None
>       assert [op.scope for op in transformer.operations] == [
            None,
            "Conformal transformation of GDA94 coordinates that have been derived through "
            "GNSS CORS.",
            None,
        ]
E       AssertionError: assert ['Large and m...ring survey.'] == [None, 'Confor... CORS.', None]
E         At index 0 diff: 'Large and medium scale topographic mapping and engineering survey.' != None
E         Full diff:
E         - ['Large and medium scale topographic mapping and engineering survey.',
E         + [None,
E         'Conformal transformation of GDA94 coordinates that have been derived through '
E         'GNSS CORS.',
E         -  'Large and medium scale topographic mapping and engineering survey.']...
E         
E         ...Full output truncated (2 lines hidden), use '-vv' to show

test/test_transformer.py:538: AssertionError
________________________ test_operations__scope_remarks ________________________

    def test_operations__scope_remarks():
    
        transformer = TransformerGroup(28356, 7856).transformers[0]
        coord_op = CoordinateOperation.from_string(transformer.to_wkt())
        assert coord_op.operations == transformer.operations
        # scope does not transfer for some reason
        # assert [op.scope for op in transformer.operations] == [
        #     op.scope for op in coord_op.operations
        # ]
>       assert [op.remarks for op in transformer.operations] == [
            op.remarks for op in coord_op.operations
        ]
E       AssertionError: assert ['Grid conver...tion to UTM.'] == [None, 'Scale ... only.', None]
E         At index 0 diff: 'Grid convergence uses opposite sign convention to UTM.' != None
E         Full diff:
E         - ['Grid convergence uses opposite sign convention to UTM.',
E         + [None,
E         'Scale difference in ppb where 1/billion = 1E-9. See CT codes 8444-46 for '
E         'NTv2 method giving equivalent results for Christmas Island, Cocos Islands '
E         'and Australia respectively. See CT code 8447 for alternative including '...
E         
E         ...Full output truncated (4 lines hidden), use '-vv' to show

test/crs/test_crs.py:1272: AssertionError
=============================== warnings summary ===============================
.pybuild/cpython3_3.8_pyproj/build/test/test_transformer.py::test_transformer_group__get_transform_crs
  /build/python-pyproj-2.6.1+ds/.pybuild/cpython3_3.8_pyproj/build/pyproj/transformer.py:73: UserWarning: Best transformation is not available due to missing Grid(short_name=nl_nsgi_rdtrans2018.tif, full_name=, package_name=, url=https://cdn.proj.org/nl_nsgi_rdtrans2018.tif, direct_download=True, open_license=True, available=False)
    super().__init__(

-- Docs: https://docs.pytest.org/en/latest/warnings.html
============== 2 failed, 548 passed, 1 warnings in 48.06 seconds ===============

@snowman2
Copy link
Member Author

@sebastic, thanks for testing this out. The test failures have been addressed in the master branch. See: #665

@sebastic
Copy link
Contributor

I don't see the commits referenced from #665, which commits fix these two failures?

@snowman2
Copy link
Member Author

#649 has the fixes in it.

@sebastic
Copy link
Contributor

The changes from #649 make the tests succeed with PROJ 7.1.0, but there is still a failure with 7.0.1:

=================================== FAILURES ===================================
_________________ test_transformer__operations__scope_remarks __________________

    def test_transformer__operations__scope_remarks():
        transformer = TransformerGroup(28356, 7856).transformers[0]
        assert transformer.scope is None
>       assert [op.scope for op in transformer.operations] == [
            "Large and medium scale topographic mapping and engineering survey.",
            "Conformal transformation of GDA94 coordinates that have been derived through "
            "GNSS CORS.",
            "Large and medium scale topographic mapping and engineering survey.",
        ]
E       AssertionError: assert [None, 'Confo... CORS.', None] == ['Large and me...ring survey.']
E         At index 0 diff: None != 'Large and medium scale topographic mapping and engineering survey.'
E         Full diff:
E         - [None,
E         + ['Large and medium scale topographic mapping and engineering survey.',
E         'Conformal transformation of GDA94 coordinates that have been derived through '
E         'GNSS CORS.',
E         -  None]...
E         
E         ...Full output truncated (2 lines hidden), use '-vv' to show

test/test_transformer.py:538: AssertionError
=============================== warnings summary ===============================
.pybuild/cpython3_3.8_pyproj/build/test/test_transformer.py::test_transformer_group__get_transform_crs
  /build/python-pyproj-2.6.1+ds/.pybuild/cpython3_3.8_pyproj/build/pyproj/transformer.py:73: UserWarning: Best transformation is not available due to missing Grid(short_name=nl_nsgi_rdtrans2018.tif, full_name=, package_name=, url=https://cdn.proj.org/nl_nsgi_rdtrans2018.tif, direct_download=True, open_license=True, available=False)
    super().__init__(

-- Docs: https://docs.pytest.org/en/latest/warnings.html
============== 1 failed, 549 passed, 1 warnings in 52.18 seconds ===============

@snowman2
Copy link
Member Author

Yeah, the behavior changes between versions of PROJ. PROJ 7.1.0 is the minimum supported version going forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants