-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
GDAL provider unable to open .bag / .hdf5 file in QGIS #1428
Comments
Works for me on Linux with GDAL 2.4.1 and libhdf5 1.8.16. |
Yes my Ubuntu QGIS handles the .bag files fine. Just Win 10! So where would one raise bug for libhdf5? On QGIS issue tracker? |
Can you try one of the build at http://gisinternals.com/stable.php and see if gdalinfo works on your bag file ? |
Or with the version? 1.10.4 vs 1.8.x? |
Not exactly 1.10.4, but Ubuntu 18.04 has 1.10.0 and BAG autotest work on it : https://api.travis-ci.com/v3/job/190978363/log.txt |
Using the
The same error when I downgrade GDAL to 2.4.0 or upgrade to 2.5.0dev. |
So from the confirmation on the last post, do I take it this is purely a HDF5 issue? if so where should it be reported? |
I'm afraid the cause of the problem is not well spotted yet. I believe there are some subtleties how to build HDF5 on Windows @jef-n I've just built HDF5 1.10.4 on Linux and rebuilt GDAL against and it works fine.
|
I have the exact same issue with OSGeo4W distribution on both QGIS 3.8.0 and 3.4.9. I was not able to open any HDF5 file. The error log is exactly the same with what @giumas posted. However, gdalinfo on HDF5 works with OSGeo4W that came with QGIS 3.2, and stopped working after QGIS 3.4 (there is no QGIS 3.3). This might be a hint on finding where the HDF5 library installation on Windows went wrong? Here is my error log with OSGeo4W shell that came with QGIS 3.8.0.
|
I have the same issue here with QGIS 3.8.0 on Win 10. The error log when gdalinfo called from OSGeo4W Shell:
|
Same with I have the same issue here with QGIS 3.8.3 on Win 10 x64. (gdal 2.4.1, hdf 1.10.4)
|
Built 1.10.5 - same error on gdalinfo - just before the a crash. rebuilding netcdf and GDAL… |
Any news about this? |
HDF5 was recently notorious for changing their ABI (application binary interface) frequently in ways that broke library binary compatibility. The messages above strongly suggest this is the current problem. Simply stated, the quick fix is to recompile anything that calls HDF5 directly. This includes gdal and netcdf, among other things. These must be recompiled against the HDF5 headers matching your currently installed HDF5 library. There are limited ABI compatibility reports for HDF5. The current version 1.10.5 has reportedly good backward compatibility to 1.10.4 and 1.10.3. I recommend recompiling anything that was built against 1.10.2 or older. All 1.8 builds are completely ABI incompatible with all 1.10 versions. https://portal.hdfgroup.org/display/support/HDF5%201.10.5#compatibility1104 |
Our company is having to revert back from 3.10 to 3.4 as it's essential to be able to manage .bag files. It's unlikely we can take advantage of quick fix mentioned above re recompile due to security policies! I just raised a similar ticket on QGIS github: In case anything can be done to compile compatible versions into official release. |
CANCELLED: ((( New info. I can reproduce this problem, or one like it, on Mac OS 10.14.6 (Mojave). So it looks like this is not just a Windows build problem any more. ))) Rest of comment deleted by author. This comment was a mistake. I did not have the HDF5/BAG driver installed at this time on my Mac version of GDAL. |
Please ignore my previous comment. I did not have the HDF5 driver installed. After rebuilding properly, GDAL 3.0.1 on Mac handles this .bag file correctly. Sorry for the confusion.
|
@jef-n I've investigated the issue. With GDAL master and OSGeo4W http://download.osgeo.org/osgeo4w/x86_64/release/hdf5/hdf5-1.10.5-1.tar.bz2 + http://download.osgeo.org/osgeo4w/x86_64/release/szip/szip-2.1.1-1.tar.bz2 + Visual Studio 2017, I managed to get a working build that can open the https://data.ngdc.noaa.gov/platforms/ocean/nos/coast/H12001-H14000/H12656/BAG/H12656_MB_50cm_MLLW_27of31.bag file by specifying for nmake.opt:
HDF5_H5_IS_DLL = YES is important. I didn't manage to get linking to succeed otherwise. This is a new setting of GDAL master that activates -DH5_BUILT_AS_DYNAMIC_LIB in frmts/hdf5/makefile.vc . Without it, -D_HDF5USEDLL_ is used and I got linking errors. So I'm not sure how you can manage to get a build at all with GDAL 3.0... I've just backported the support for HDF5_H5_IS_DLL to the 3.0 branch per 0a3365a I've also just installed a fresh OSGeo4W of GDAL 3.0.2 only and when opening a HDF5 file, I get the following error
|
oops sorry "at jef". I did mean @jef-n to look at #1428 (comment) |
@roault wrote:
Install or fully activate HDF5 1.10.5, then rebuild GDAL. Also rebuild ALL other packages that directly link to HDF5. I looked into this in a little more detail. HDF5 does not support drop-in ABI compatibility for ANY recent versions. Therefore, every time the HDF5 library is updated, ALL packages that have direct dependencies on HDF5 must be rebuilt. There is an environmental variable kludge mentioned in the error message. I consider this kludge incredibly dangerous, and it should never have been made public. Do not use! Danger Will Robinson! |
I said "rebuild GDAL". You may need to go all the way back to GDAL The same is true for any other packages with direct HDF5 dependency. |
This message in this context is also diagnostic of a mix-up of two different installed HDF5 library versions. Check both header files and libraries for multiple installed versions. In the case of HDF5, it may be necessary to purge all but a single version of each include and library file. There are proper ways for multiple installed library versions to co-exist. I am not sure that HDF5 in its current state is capable of such support. |
I know how to build GDAL, thanks ;-) My comment was a note for @jef-n that there's something fishy in the OSGeo4W setup. I did finally manage to force installation of 1.10.5 in the OSGeo4W installer (1.10.4 is installed by default because in setup.ini 1.10.5 is in the [test] section), but then I'm hitting the issue raised by others regarding 'H5Pcreate(): not a property list class'). |
Yes of course. I was only trying to emphasize the version issues and due caution. I am glad you got your custom build working. |
Is If that is confirmed, then I think it will be time to ask HDF5 support for an interpretation of the message stack related to 'H5Pcreate(): not a property list class'. |
Try gdal-3.0.3-2 please. |
For people not installing qgis-full, I believe they must explicitly install the gdal-hdf5 package now. |
correct - same as other for plugins (ecw, mrsid, sosi, oracle, mss, filegdb) |
Did you hit a stumbling point in trying to built it as a non-plugin driver? I did manage in #1428 (comment) to have a build with the HDF5 driver built-in (but I didn't try with other drivers such as netCDF etc) |
No. I didn't try. It would probably have worked in the first place - if I had used |
Re:
Is that easy enough to do within a Windows OS? via OSGeo4W for example? |
I don't have a Windows VM running, but from memory, in the osgeo4w-installer select Advanced install or something similar, and then you can select individual packages. There is one that should be called "gdal-hdf5" |
I'm having similar problems using gdal 3.0.4 / QGis 3.12.1. |
Closing. Was a binary build issue, not a source one |
Expected behavior and actual behavior.
I'm unsure if this is purely a GDAL bug or QGIS related issue?
I expected to be able to open the below type file within QGIS:
Example .bag file to test:
https://data.ngdc.noaa.gov/platforms/ocean/nos/coast/H12001-H14000/H12656/BAG/H12656_MB_50cm_MLLW_27of31.bag
But it will not load - see below attempts
Steps to reproduce the problem.
Start QGIS - Top Menu > Layer > Data Source Manager
Add layer via Raster selection
Fails with following error:
Also attempted by running command via python console:
os.system(r'''gdal_translate -of AAIGrid E:/Users/rosso/GIS/GlobalMapper/H12656_MB_50cm_MLLW_27of31.bag E:/Users/rosso/GIS/GlobalMapper/final.asc''')
But that fails to run & console spits out:
Tried to run via Raster 'Translate' QGIS GUI:
Operating system
Windows 10
GDAL version and provenance
Compiled against GDAL/OGR - 2.4.1
QGIS - 3.6.1-Noosa
The text was updated successfully, but these errors were encountered: