Opened 20 months ago

Closed 19 months ago

Last modified 17 months ago

#5366 closed defect (fixed)

GHA last coverage is failing on raster GDAL polygonize cUnit test

Reported by: robe Owned by: robe
Priority: medium Milestone: PostGIS 3.0.10
Component: raster Version: master
Keywords: Cc:

Description

Given this has been working and we haven't made any changes since this failure, I'm suspecting something upstream changed, perhaps GDAL polygonize again

https://github.com/postgis/postgis/actions/runs/4677114956/jobs/8284248542

Test: test_gdal_polygonize ...FAILED
    1. cu_gdal.c:170  - CU_ASSERT_DOUBLE_EQUAL(gv[0].val,1.8,FLT_EPSILON)
    2. cu_gdal.c:174  - CU_ASSERT_DOUBLE_EQUAL(lwgeom_area(gobserved),lwgeom_area(gexpected),FLT_EPSILON)
    3. cu_gdal.c:176  - CU_ASSERT_DOUBLE_EQUAL(gv[1].val,0.0,FLT_EPSILON)
    4. cu_gdal.c:179  - CU_ASSERT_DOUBLE_EQUAL(lwgeom_area(gobserved),lwgeom_area(gexpected),FLT_EPSILON)
    5. cu_gdal.c:215  - CU_ASSERT_DOUBLE_EQUAL(gv[1].val,0.0,FLT_EPSILON)
    6. cu_gdal.c:218  - CU_ASSERT_DOUBLE_EQUAL(lwgeom_area(gobserved),lwgeom_area(gexpected),FLT_EPSILON)
    7. cu_gdal.c:270  - CU_ASSERT_DOUBLE_EQUAL(lwgeom_area(gobserved),lwgeom_area(gexpected),FLT_EPSILON)
    8. cu_gdal.c:272  - CU_ASSERT_DOUBLE_EQUAL(gv[1].val,0.0,FLT_EPSILON)
    9. cu_gdal.c:275  - CU_ASSERT_DOUBLE_EQUAL(lwgeom_area(gobserved),lwgeom_area(gexpected),FLT_EPSILON)
    10. cu_gdal.c:328  - CU_ASSERT_DOUBLE_EQUAL(gv[0].val,1.8,FLT_EPSILON)
    11. cu_gdal.c:332  - CU_ASSERT_DOUBLE_EQUAL(lwgeom_area(gobserved),lwgeom_area(gexpected),FLT_EPSILON)
    12. cu_gdal.c:334  - CU_ASSERT_DOUBLE_EQUAL(gv[1].val,0.0,FLT_EPSILON)
    13. cu_gdal.c:337  - CU_ASSERT_DOUBLE_EQUAL(lwgeom_area(gobserved),lwgeom_area(gexpected),FLT_EPSILON)
Warning 6: PNG driver doesn't support data type Float64. Only eight bit (Byte) and sixteen bit (UInt16) bands supported. Defaulting to Byte

  Test: test_raster_to_gdal ...passed
  Test: test_gdal_to_raster ...passed
  Test: test_gdal_warp ...passed
Suite: raster_geometry
  Test: test_raster_envelope ...passed
  Test: test_raster_envelope_geom ...passed
  Test: test_raster_convex_hull ...passed
  Test: test_raster_surface ...passed
  Test: test_raster_perimeter ...passed
  Test: test_raster_pixel_as_polygon ...passed
  Test: test_raster_get_pixel_bilinear ...xw = 1.5, yw = 0.5, xr = 1.5, yr = 0.5
xw = 1.5, yw = 0.5, value = 20, nodata = 0

Given debbie is not failing, I don't think it's PG16 at fault

Change History (11)

comment:1 by robe, 20 months ago

Docker build has been failing since march (some debian apt issue, which I guess my patch updates and time updates fixed on April 8th). So the issue upstream could have been introduced any time between March 1st and April 11th. At a glance not seeing anything in GDAL commit logs between such a period to cause this issue.

Could also be a change in GEOS I suppose, but debbie, winnie, or berries should have caught those.

comment:2 by robe, 20 months ago

dbaston suggested this one which seems to be the likely culprit committed March 4th

https://github.com/OSGeo/gdal/pull/7344

comment:3 by robe, 19 months ago

The answers are the same it's just the order of polygons and values in the array is different. I'm revising the tests to just sum the values and the areas so to not have to worry about the order in the array.

comment:4 by robe, 19 months ago

Milestone: PostGIS 3.4.0PostGIS 3.2.4

comment:5 by Regina Obe <lr@…>, 19 months ago

In 8228878/git:

Change gdal polygonize tests to be sum of areas and values
instead of checking individual elements.
This is to account for GDAL 3.7 results array sorted in different order
from prior versions.
References #5366 for PostGIS 3.4.0

comment:6 by Regina Obe <lr@…>, 19 months ago

In e58affa/git:

Change gdal polygonize tests to be sum of areas and values
instead of checking individual elements.
This is to account for GDAL 3.7 results array sorted in different order
from prior versions.
References #5366 for PostGIS 3.3.3

comment:7 by Regina Obe <lr@…>, 19 months ago

In fa7823d/git:

Change gdal polygonize tests to be sum of areas and values
instead of checking individual elements.
This is to account for GDAL 3.7 results array sorted in different order
from prior versions.
References #5366 for PostGIS 3.2.5

comment:8 by robe, 19 months ago

Resolution: fixed
Status: newclosed

comment:9 by Regina Obe <lr@…>, 17 months ago

In c7b679c3/git:

Change gdal polygonize tests to be sum of areas and values
instead of checking individual elements.
This is to account for GDAL 3.7 results array sorted in different order
from prior versions.
References #5366 for PostGIS 3.1.10

comment:10 by robe, 17 months ago

Milestone: PostGIS 3.2.4PostGIS 3.0.10

comment:11 by Regina Obe <lr@…>, 17 months ago

In f7d95150/git:

Make gdal polygonize behave consistently
across all GDAL versions (behavior changed in GDAL 3.7)
Closes #5366 for PostGIS 3.0.10

Note: See TracTickets for help on using tickets.