[gdal-dev] GRIB can't get nodata and cmake can't disable FileGDB

Ivan Lucena ivan.lucena at outlook.com
Mon Apr 24 18:47:55 PDT 2023


Hi,

I updated a Linux machine from GDAL 2.3 to 3.4 and after that some python scripts started to crash.

I found out that when band.GetNodataValue() was called for bands > 1 the return was always None.

But I tested the same WMO file with gdalinfo or gdalinfo.py and all the bands return the correct no_data, -9999.

WMO data comes in GRIB format and the driver was custom made for that product/provider. I guess.

By looking at the gdalinfo.py code, I figured out that, if I call GetStatistics() before GetNoDataValue(), the no_data returned was also -9999 for all bands.

That means, there is a bug in the GRIB driver on 3.4 that wasn't there on 2.3

I tested on GDAL 3.4 on Windows with GDAL Anaconda installation and got the same error.

I could just advise my coworkers to add a call to getStatistics(True, False) before calling GetNoDataValue() on their code, or cancel the updated to GDAL 3.4. But there are problem with 2.3 and MSSQL that work just fine with 3.4,

So I decided to build GDAL 3.6 to see if still have that problem. And I should also formally report the issue with GRIB.

But I am getting a compilation error, somewhere on ogrsf_frmts/openfilegdb, and I cannot turn off that driver on cmake. The parameter -DGDAL_USE_FILEGDB=OFF seems to work fine. The output messages says FileGDB is disabled, but the makefile is still going there. And I don't need that driver. What else can I do to disable it?

Have anyone noticed those two problem? Any solution or suggestion?

Thanks,

Ivan



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230425/f6757967/attachment.htm>


More information about the gdal-dev mailing list