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

test_issue2353bis fails with GDAL 3.5.2 & PROJ 9.1.0 #2592

Closed
sebastic opened this issue Sep 18, 2022 · 3 comments
Closed

test_issue2353bis fails with GDAL 3.5.2 & PROJ 9.1.0 #2592

sebastic opened this issue Sep 18, 2022 · 3 comments
Milestone

Comments

@sebastic
Copy link
Contributor

sebastic commented Sep 18, 2022

As reported in Debian Bug #1020074:

=================================== FAILURES ===================================
______________________________ test_issue2353bis _______________________________

caplog = <_pytest.logging.LogCaptureFixture object at 0x7fdc50a4ef80>

    @pytest.mark.skipif(
        not gdal_version.at_least('3.4'),
        reason="Requires GDAL 3.4.x")
    def test_issue2353bis(caplog):
        """Errors left by a successful transformation are cleaned up."""
        caplog.set_level(logging.INFO)
        bounds = [458872.4197335826, -2998046.478919534, 584059.8115540259, -2883810.102037343]
        with rasterio.Env():
            transform_bounds("EPSG:6931", "EPSG:4326", *bounds)
>           assert "Point outside of" in caplog.text
E           AssertionError: assert 'Point outside of' in ''
E            +  where '' = <_pytest.logging.LogCaptureFixture object at 0x7fdc50a4ef80>.text

tests/test_warp.py:2108: AssertionError
------------------------------ Captured log call -------------------------------
DEBUG    rasterio._env:env.py:317 GDAL data files are available at built-in paths.
DEBUG    rasterio._env:env.py:317 PROJ data files are available at built-in paths.
DEBUG    rasterio._env:env.py:317 Started GDALEnv: self=<rasterio._env.GDALEnv object at 0x7fdc50a4d450>.
DEBUG    rasterio._env:env.py:353 Stopped GDALEnv <rasterio._env.GDALEnv object at 0x7fdc50a4d450>.
=============================== warnings summary ===============================
rasterio/path.py:15
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_rasterio/build/rasterio/path.py:15: RasterioDeprecationWarning: rasterio.path will be removed in version 1.4.
    warnings.warn(

rasterio/__init__.py:277: 1 warning
.pybuild/cpython3_3.10_rasterio/build/tests/test_blocks.py: 5 warnings
.pybuild/cpython3_3.10_rasterio/build/tests/test_boundless_read.py: 1 warning
.pybuild/cpython3_3.10_rasterio/build/tests/test_crs.py: 1 warning
.pybuild/cpython3_3.10_rasterio/build/tests/test_dataset_rw.py: 1 warning
.pybuild/cpython3_3.10_rasterio/build/tests/test_dtypes.py: 1 warning
.pybuild/cpython3_3.10_rasterio/build/tests/test_gdal_raster_io.py: 14 warnings
.pybuild/cpython3_3.10_rasterio/build/tests/test_mask_creation.py: 1 warning
.pybuild/cpython3_3.10_rasterio/build/tests/test_no_georef.py: 1 warning
.pybuild/cpython3_3.10_rasterio/build/tests/test_open_options.py: 1 warning
.pybuild/cpython3_3.10_rasterio/build/tests/test_overviews.py: 1 warning
.pybuild/cpython3_3.10_rasterio/build/tests/test_read.py: 1 warning
.pybuild/cpython3_3.10_rasterio/build/tests/test_rpcs.py: 1 warning
.pybuild/cpython3_3.10_rasterio/build/tests/test_tags.py: 1 warning
.pybuild/cpython3_3.10_rasterio/build/tests/test_write.py: 5 warnings
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_rasterio/build/rasterio/__init__.py:277: NotGeoreferencedWarning: Dataset has no geotransform, gcps, or rpcs. The identity matrix will be returned.
    dataset = DatasetReader(path, driver=driver, sharing=sharing, **kwargs)

.pybuild/cpython3_3.10_rasterio/build/tests/test_blocks.py: 5 warnings
.pybuild/cpython3_3.10_rasterio/build/tests/test_complex_dtypes.py: 3 warnings
.pybuild/cpython3_3.10_rasterio/build/tests/test_creation_options.py: 1 warning
.pybuild/cpython3_3.10_rasterio/build/tests/test_dataset_rw.py: 2 warnings
.pybuild/cpython3_3.10_rasterio/build/tests/test_descriptions.py: 4 warnings
.pybuild/cpython3_3.10_rasterio/build/tests/test_dtypes.py: 1 warning
.pybuild/cpython3_3.10_rasterio/build/tests/test_gdal_raster_io.py: 35 warnings
.pybuild/cpython3_3.10_rasterio/build/tests/test_no_georef.py: 2 warnings
.pybuild/cpython3_3.10_rasterio/build/tests/test_png.py: 1 warning
.pybuild/cpython3_3.10_rasterio/build/tests/test_profile.py: 1 warning
.pybuild/cpython3_3.10_rasterio/build/tests/test_rpcs.py: 1 warning
.pybuild/cpython3_3.10_rasterio/build/tests/test_scale_offset.py: 8 warnings
.pybuild/cpython3_3.10_rasterio/build/tests/test_tags.py: 3 warnings
.pybuild/cpython3_3.10_rasterio/build/tests/test_units.py: 4 warnings
.pybuild/cpython3_3.10_rasterio/build/tests/test_warp.py: 1 warning
.pybuild/cpython3_3.10_rasterio/build/tests/test_write.py: 22 warnings
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_rasterio/build/rasterio/__init__.py:287: NotGeoreferencedWarning: Dataset has no geotransform, gcps, or rpcs. The identity matrix will be returned.
    dataset = writer(

.pybuild/cpython3_3.10_rasterio/build/tests/test_boundless_read.py::test_issue2382
.pybuild/cpython3_3.10_rasterio/build/tests/test_memoryfile.py::test_write_rpcs_to_memfile
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_rasterio/build/rasterio/io.py:140: NotGeoreferencedWarning: The given matrix is equal to Affine.identity or its flipped counterpart. GDAL may ignore this matrix and save no geotransform without raising an error. This behavior is somewhat driver-specific.
    return writer(mempath, 'w+', driver=driver, width=width,

.pybuild/cpython3_3.10_rasterio/build/tests/test_dataset.py: 1 warning
.pybuild/cpython3_3.10_rasterio/build/tests/test_features.py: 7 warnings
.pybuild/cpython3_3.10_rasterio/build/tests/test_mask.py: 21 warnings
.pybuild/cpython3_3.10_rasterio/build/tests/test_no_georef.py: 1 warning
.pybuild/cpython3_3.10_rasterio/build/tests/test_write.py: 2 warnings
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_rasterio/build/rasterio/__init__.py:287: NotGeoreferencedWarning: The given matrix is equal to Affine.identity or its flipped counterpart. GDAL may ignore this matrix and save no geotransform without raising an error. This behavior is somewhat driver-specific.
    dataset = writer(

.pybuild/cpython3_3.10_rasterio/build/tests/test_nodata.py::test_set_mem_inf_nodata
.pybuild/cpython3_3.10_rasterio/build/tests/test_nodata.py::test_set_mem_nan_nodata
.pybuild/cpython3_3.10_rasterio/build/tests/test_warnings.py::test_notgeoref_warning
.pybuild/cpython3_3.10_rasterio/build/tests/test_warnings.py::test_no_notgeoref_warning[None-gcps1-None]
.pybuild/cpython3_3.10_rasterio/build/tests/test_warnings.py::test_no_notgeoref_warning[None-None-rpcs2]
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_rasterio/build/rasterio/io.py:140: NotGeoreferencedWarning: Dataset has no geotransform, gcps, or rpcs. The identity matrix will be returned.
    return writer(mempath, 'w+', driver=driver, width=width,

.pybuild/cpython3_3.10_rasterio/build/tests/test_warnings.py::test_no_notgeoref_warning[transform0-None-None]
.pybuild/cpython3_3.10_rasterio/build/tests/test_warnings.py::test_no_notgeoref_warning[None-gcps1-None]
.pybuild/cpython3_3.10_rasterio/build/tests/test_warnings.py::test_no_notgeoref_warning[None-None-rpcs2]
  /usr/lib/python3/dist-packages/_pytest/python.py:192: PytestRemovedIn8Warning: Passing None has been deprecated.
  See https://docs.pytest.org/en/latest/how-to/capture-warnings.html#additional-use-cases-of-warnings-in-tests for alternatives in common use cases.
    result = testfunction(**testargs)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_warp.py::test_issue2353bis - AssertionError: assert 'Point ...
= 1 failed, 1168 passed, 21 skipped, 11 xfailed, 8 xpassed, 173 warnings in 30.71s =

Expected behavior and actual behavior.

Test does not fail.

Steps to reproduce the problem.

Run tests with GDAL 3.5.2 & PROJ 9.1.0 (on Debian unstable).

Environment Information

rasterio info:
  rasterio: 1.3.2
      GDAL: 3.5.2
      PROJ: 9.1.0
      GEOS: 3.11.0
 PROJ DATA: /root/.local/share/proj:/usr/share/proj
 GDAL DATA: None

System:
    python: 3.10.7 (main, Sep  8 2022, 14:34:29) [GCC 12.2.0]
executable: /usr/bin/python3
   machine: Linux-5.10.0-18-amd64-x86_64-with-glibc2.34

Python deps:
/usr/lib/python3/dist-packages/_distutils_hack/__init__.py:18: UserWarning: Distutils was imported before Setuptools, but importing Setuptools also replaces the `distutils` module in `sys.modules`. This may lead to undesirable behaviors or errors. To avoid these issues, avoid using distutils directly, ensure that setuptools is installed in the traditional way (e.g. not an editable install), and/or make sure that setuptools is always imported before distutils.
  warnings.warn(
/usr/lib/python3/dist-packages/_distutils_hack/__init__.py:33: UserWarning: Setuptools is replacing distutils.
  warnings.warn("Setuptools is replacing distutils.")
    affine: 2.3.1
     attrs: 22.1.0
   certifi: 2022.06.15
     click: 8.0.3
     cligj: 0.7.2
    cython: 0.29.32
     numpy: 1.21.5
    snuggs: 1.4.7
click-plugins: None
setuptools: 65.3.0

Installation Method

Debian package

@sgillies
Copy link
Member

sgillies commented Sep 28, 2022

Is there a lot of churn around bounds of projection between GDAL and PROJ? Or are my attempts to paper over it the real problem now?

@snowman2
Copy link
Member

After looking closer, I think that this is related to: OSGeo/gdal#6081

@snowman2
Copy link
Member

Thanks for the report 👍

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

No branches or pull requests

3 participants