OSGeo / gdal

GDAL is an open source MIT licensed translator library for raster and vector geospatial data formats.
https://gdal.org
Other
4.91k stars 2.55k forks source link

GDAL tests are failing with GEOS 3.13.0 #10870

Closed imincik closed 1 month ago

imincik commented 1 month ago

What is the bug?

Some GDAL tests are failing with GEOS 3.13.0 .

Steps to reproduce the issue

Build GDAL with Nix.

  1. Checkout Nixpkgs GEOS 3.13.0 branch

    gh pr checkout 344310
  2. Build GDAL

    
    nix-build -A gdal

...

=================================== FAILURES =================================== ____ test_check_geometry_equals_orientation_differs ____

def test_check_geometry_equals_orientation_differs():
    poly_ccw = ogr.CreateGeometryFromWkt("POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))")
    poly_cw = ogr.CreateGeometryFromWkt("POLYGON ((0 0, 0 1, 1 1, 0 1, 0 0))")

    if ogrtest.have_geos():
      ogrtest.check_feature_geometry(poly_ccw, poly_cw)

/build/source/build/autotest/ogr/ogr_ogrtest.py:93:


/nix/store/h3i0acpmr8mrjx07519xxmidv8mpax4y-python3-3.12.5/lib/python3.12/contextlib.py:81: in inner return func(*args, **kwds)


args = (<osgeo.ogr.Geometry; proxy of <Swig Object of type 'OGRGeometryShadow ' at 0x7ffedad47870> >, <osgeo.ogr.Geometry; proxy of <Swig Object of type 'OGRGeometryShadow ' at 0x7ffedad459e0> >, 0.0001) kwds = {'_root_actual': <osgeo.ogr.Geometry; proxy of <Swig Object of type 'OGRGeometryShadow ' at 0x7ffedad45740> >, '_root...ected': <osgeo.ogr.Geometry; proxy of <Swig Object of type 'OGRGeometryShadow ' at 0x7ffedad45ce0> >, 'context': None}

@wraps(func)
def inner(*args, **kwds):
    with self._recreate_cm():
      return func(*args, **kwds)

E AssertionError: Error in vertex 2/5 exceeds tolerance. E Expected: POLYGON ((0 0,0 1,1 1,0 1,0 0)) E Actual: POLYGON ((0 0,1 0,1 1,0 1,0 0)) E assert [1.0, 0.0] == approx([0.0 ±....0 ± 1.0e-04]) E E comparison failed. Mismatched elements: 2 / 2: E Max absolute difference: 1.0 E Max relative difference: inf E Index | Obtained | Expected E 0 | 1.0 | 0.0 ± 1.0e-04 E 1 | 0.0 | 1.0 ± 1.0e-04

/nix/store/h3i0acpmr8mrjx07519xxmidv8mpax4y-python3-3.12.5/lib/python3.12/contextlib.py:81: AssertionError =========================== short test summary info ============================ FAILED ogr/ogr_ogrtest.py::test_check_geometry_equals_orientation_differs - AssertionError: Error in vertex 2/5 exceeds tolerance. Expected: POLYGON ((0 0,0 1,1 1,0 1,0 0)) Actual: POLYGON ((0 0,1 0,1 1,0 1,0 0)) assert [1.0, 0.0] == approx([0.0 ±....0 ± 1.0e-04])

comparison failed. Mismatched elements: 2 / 2: Max absolute difference: 1.0 Max relative difference: inf Index | Obtained | Expected 0 | 1.0 | 0.0 ± 1.0e-04 1 | 0.0 | 1.0 ± 1.0e-04 = 1 failed, 12790 passed, 1418 skipped, 6 deselected, 6 xfailed in 246.52s (0:04:06) = 100 - done. error: builder for '/nix/store/7ngzx765j6kizhwx75rip27z18ifk0j7-gdal-3.9.2.drv' failed with exit code 1; last 10 log lines:

assert [1.0, 0.0] == approx([0.0 ±....0 ± 1.0e-04])

comparison failed. Mismatched elements: 2 / 2: Max absolute difference: 1.0 Max relative difference: inf Index | Obtained | Expected 0 | 1.0 | 0.0 ± 1.0e-04 1 | 0.0 | 1.0 ± 1.0e-04 = 1 failed, 12790 passed, 1418 skipped, 6 deselected, 6 xfailed in 246.52s (0:04:06) = 100 - done.

Versions and provenance

NixOS 23.11

Additional context

-

rouault commented 1 month ago

was fixed few days ago per 91e4f55f8f374a75f8f2ecd05670edcfa4c0af84

imincik commented 1 month ago

Great thanks, this change is fixing the problem.