[gdal-dev] GDALOpenInternal Problem Opening specific HDF5 bands
clearlymichele at yahoo.com
Mon Oct 10 06:20:08 PDT 2016
I'm trying to open an HDF5 file, specific bands, but GDAL is giving an error message:
> "'HDF5:C:\pathToFile\pathToFile/filename.h5://ImageData/B4' does not> exist in the file system and is not recognized as a supported data set> name"
I got the error message after the GDALOpenInternal call using CPLGetLastErrorMsg(). I can't step into GDALOpenInternal (with Visual Studio) because we don't have GDAL source cpp file; just h file that came with the package, unless I'm searching for the wrong file name.
The string for the ConnectionString parameter for GDALOpenInternal is shown in the quotes above.
I found [qgis polygonize error 4 "file does not exist in the file system"], but they said it was because of using non-ascii characters in file path string. I didn't see any other pertinent info on this error message.
We need to access the specific band of the HDF5 file. I noticed that our slashes in the path are showing in different directions, but I'm not sure that would be the issue here. We have both windows and linux OS's. This error was seen on windows os.
We used (gdalinfo.exe filename.h5) and do see that the B4 exists there.
Using the string, HDF5:"C:\pathToFile\filename.h5"://ImageData/B2, didn't work for openInternal with GDAL.
I saw (gdal.org/gdal_tutorial.html), which gives an example to open a band after a GDALOpen, but it seems that it's supposed to work with GDALOpenInternal also according to my co-workers. We just don't have a good example of the connection string to get it working with GDALOpenInternal since we don't have access to that part of the code that does it. They want me to focus on using GDALOpenInternal.
I'm seeing lists.alioth.debian.org/pipermail/pkg-grass-devel/2012-November/…, which gives me hope, but doesn't have a good example. I saw this which could be an example, although it isn't using a path, but I'm not sure: gdalwarp HDF4_SDS:ASTER_L1B:"pg-PR1B0000-2002031402_100_001":2 pg-PR1B0000-2002031402_100_001_2.tif
My question is, what format for the connection string do I need to use GDALOpenInternal, if it's not what I show for the two things I tried above?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev