[Gdal-dev] New user having a problem reading a HDF5 formatted file
Douglas Coward
doug.coward at 21csi.com
Fri Jan 27 16:01:01 EST 2006
Hi Everone,
I am trying trouble opening a file to read data from a DBDBV (digital
bathymetric data base variable resolution) HDF5 formatted file using GDAL.
And Im sure Im just going something real dumb.
I needed to update to the latest version to get the HDF5 capable GDAL,
so I downloaded FWTools100a7.exe and installed it.
I copied the C:\Program Files\FWTools1.0.0a7\include directory and the
C:\Program Files\FWTools1.0.0a7\lib directory to my source code tree. And I
link gdal_i.lib into my project and include the gdal_priv.h header in my
source file.
I also downloaded 5-165-win.zip, the precompiled binaries of the HDF5
library 1.6.5.
I copied the 5-165-win\include directory and the 5-165-win\lib directory to
my source code tree. And I link hdf5.lib into my project and include the
hdf5.h header in my source file.
I have had success doing tests used the gdalinfo utility on the database
file:
C:\Program Files\FWTools1.0.0a7\bin>gdalinfo dbdbv_level0.h5
< Prints all the metadata, all the subdataset information>
I have had no success with tests of using gdal_translate on the database
file:
C:\Program Files\FWTools1.0.0a7\bin>gdal_translate -of JPEG
HDF5:"dbdbv_level0.h5":34477 ds34477.jpg
szFilenname dbdbv_level0.h5
Open!!
<After about 10 seconds the program crashes as it prints
/dbdbv/0.500/g/34477 which is the complete name of the correct dataset.>
My real problem is that using the GDAL API Tutorial for opening a file to
read, my program will calls GDALAllRegister(); just fine, then it calls
poDataset = (GDALDataset *) GDALOpen( filename_, GA_ReadOnly );
with the filename set to ..\..\terrain\DBDBV4_0\dbdbv_level0.h5 and
GDALOpen() never returns.
(Ooops, for two weeks I have been thinking that this function never returns,
but I just accidentally left the debugger running while writting this email
and GDALOpen did return with the file open, 22 minutes later.)
Then when I get the file open, how would I read a particular dataset (like
/dbdbv/0.500/g/34477) through the API?
Thank you for your time,
Doug Coward
Software Engineer
21st Century Systems Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20060127/2676042c/attachment.html
More information about the Gdal-dev
mailing list