PDAL / PDAL

PDAL is Point Data Abstraction Library. GDAL for point cloud data.

Home Page:https://pdal.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pdal_io_ogr_writer_test is failing with GDAL 3.9

imincik opened this issue · comments

Describe the bug
pdal_io_ogr_writer_test is failing when building with GDAL 3.9.0 in Nixpkgs.

$ nix-build -A pdal

...

42/129 Test  #42: pdal_io_ogr_writer_test ......................***Failed    5.75 sec                                                                                                                                                        │
│[==========] Running 15 tests from 1 test suite.                                                                                                                                                                                              │
│[----------] Global test environment set-up.                                                                                                                                                                                                  │
│[----------] 15 tests from OGRWriterTest                                                                                                                                                                                                      │
│[ RUN      ] OGRWriterTest.shapefile                                                                                                                                                                                                          │
│[       OK ] OGRWriterTest.shapefile (421 ms)                                                                                                                                                                                                 │
│[ RUN      ] OGRWriterTest.json                                                                                                                                                                                                               │
│[       OK ] OGRWriterTest.json (431 ms)                                                                                                                                                                                                      │
│[ RUN      ] OGRWriterTest.geopackage                                                                                                                                                                                                         │
│[       OK ] OGRWriterTest.geopackage (448 ms)                                                                                                                                                                                                │
│[ RUN      ] OGRWriterTest.creation_options                                                                                                                                                                                                   │
│/build/source/test/unit/io/OGRWriterTest.cpp:121: Failure                                                                                                                                                                                     │
│Expected equality of these values:                                                                                                                                                                                                            │
│  compare(infofile, outinfofile, 1)                                                                                                                                                                                                           │
│    Which is: 4                                                                                                                                                                                                                               │
│  0                                                                                                                                                                                                                                           │
│  (/build/source/test/data/ogr/creation_options.geojson.ogrinfo <-> /build/source/test/data/../temp/ogr/creation_options.geojson.ogrinfo)                                                                                                     │
│[  FAILED  ] OGRWriterTest.creation_options (487 ms)                                                                                                                                                                                          │
│[ RUN      ] OGRWriterTest.shapefile_measure                                                                                                                                                                                                  │
│[       OK ] OGRWriterTest.shapefile_measure (623 ms)                                                                                                                                                                                         │
│[ RUN      ] OGRWriterTest.attrs_all                                                                                                                                                                                                          │
│[       OK ] OGRWriterTest.attrs_all (583 ms)                                                                                                                                                                                                 │
│[ RUN      ] OGRWriterTest.geopackage_attrs_all                                                                                                                                                                                               │
│/build/source/test/unit/io/OGRWriterTest.cpp:121: Failure                                                                                                                                                                                     │
│Expected equality of these values:                                                                                                                                                                                                            │
│  compare(infofile, outinfofile, 1)                                                                                                                                                                                                           │
│    Which is: 237                                                                                                                                                                                                                             │
│  0                                                                                                                                                                                                                                           │
│  (/build/source/test/data/ogr/geopackage_attrs_all.gpkg.ogrinfo <-> /build/source/test/data/../temp/ogr/geopackage_attrs_all.gpkg.ogrinfo)                                                                                                   │
│[  FAILED  ] OGRWriterTest.geopackage_attrs_all (273 ms)                                                                                                             

...

Status of this:

  • Only seeing on linux
  • Seems to be a problem with setting precision and how it's handled on the two systems.
    • Linux is indicating more precision than what is currently being read.
  • Mac example:
source:   POINT Z (635619.8 850064.0 447)
precision 1:   POINT Z (635619.8 850064.0 447)
  • Linux example of same point:
source:   POINT Z (635619.8 850064.0 447)
precision 1:   POINT Z (635619.8 850064.0 447.0)

Any suggestion how to proceed in order to unblock the GDAL update ? Thank you.

Just build PDAL without tests?

Just build PDAL without tests?

Sure, I can exclude failing tests, but it is not clear to me whether this failure means we have some real problem or not.

As it says above, GDAL is producing output with a different precision than expected in some cases. The tests will have to be tweaked to match or some such. I doubt this is an issue for most PDAL users.

Yeah this is mostly an upstream GDAL issue that alters how some drivers are writing out, but I have a PR (#4411) That adjusts the test files based on the GDAL version installed, but that isn't quite finished yet.

The OGR Writer test is mostly there to test that what PDAL outputs matches what GDAL and OGR output, and the files we were using as the "correct" output were made with an old version of GDAL.

Yeah this is mostly an upstream GDAL issue that alters how some drivers are writing out, but I have a PR (#4411) That adjusts the test files based on the GDAL version installed, but that isn't quite finished yet.

The OGR Writer test is mostly there to test that what PDAL outputs matches what GDAL and OGR output, and the files we were using as the "correct" output were made with an old version of GDAL.

Thank you.

Until #4411 is merged, is there any way how to disable only failing pdal_io_ogr_writer_test subtests ?

[  FAILED  ] OGRWriterTest.creation_options
[  FAILED  ] OGRWriterTest.geopackage_attrs_all

You can't build without just those tests, but you can turn off tests entirely if you want with -DWITH_TESTS=OFF if you're building from source. I don't know how nix-build interacts with this though, so I can't help beyond that.

You can't build without just those tests, but you can turn off tests entirely if you want with -DWITH_TESTS=OFF if you're building from source. I don't know how nix-build interacts with this though, so I can't help beyond that.

Thanks a lot for help, we will disable all pdal_io_ogr_writer_test tests then (NixOS/nixpkgs@d9ba134)

Addressed in #4411