<HTML><BODY>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: tahoma; BACKGROUND-COLOR: white">
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT
face="Times New Roman"><SPAN style="mso-spacerun: yes"> Hi
Everone,</SPAN></FONT></FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT
face="Times New Roman"><SPAN style="mso-spacerun: yes"></SPAN><SPAN
style="mso-spacerun: yes"> </SPAN>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 I’m sure I’m just going
something real dumb. <?xml:namespace prefix = o ns =
"urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT
face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN
style="mso-spacerun: yes"> </SPAN>I needed to update to the
latest version to get the HDF5 capable GDAL, so I downloaded
FWTools100a7.exe and installed it.</FONT></FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT
face="Times New Roman"><SPAN style="mso-spacerun: yes">
</SPAN>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.</FONT></FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT
face="Times New Roman"><SPAN style="mso-spacerun: yes">
</SPAN>I also downloaded 5-165-win.zip, the precompiled binaries of the HDF5
library 1.6.5.</FONT></FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman"
size=3>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.</FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New
Roman" size=3> </FONT></o:p></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman"
size=3>I have had success doing tests used the gdalinfo utility on the
database file:</FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New
Roman" size=3> </FONT></o:p></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman"
size=3>C:\Program Files\FWTools1.0.0a7\bin>gdalinfo dbdbv_level0.h5</FONT>
</DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman"
size=3>< Prints all the metadata, all the subdataset
information></FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New
Roman" size=3> </FONT></o:p></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman"
size=3>I have had no success with tests of using gdal_translate on the
database file:</FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New
Roman" size=3> </FONT></o:p></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman"
size=3>C:\Program Files\FWTools1.0.0a7\bin>gdal_translate -of JPEG
HDF5:"dbdbv_level0.h5":34477 ds34477.jpg</FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman"
size=3>szFilenname dbdbv_level0.h5</FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman"
size=3>Open!!</FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman"
size=3><After about 10 seconds the program crashes as it prints
“/dbdbv/0.500/g/34477” which is the complete name of the correct
dataset.></FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New
Roman" size=3> </FONT></o:p></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman"
size=3> 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 </FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman"
size=3>poDataset = (GDALDataset *) GDALOpen( filename_, GA_ReadOnly );</FONT>
</DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman"
size=3>with the filename set to “..\..\terrain\DBDBV4_0\dbdbv_level0.h5” and
GDALOpen() never returns.</FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman"
size=3>(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.)</FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New
Roman" size=3> </FONT></o:p></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman"
size=3>Then when I get the file open, how would I read a
particular dataset (like “/dbdbv/0.500/g/34477”) through the API?</FONT>
</DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New
Roman" size=3> </FONT></o:p></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman"
size=3>Thank you for your time,</FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT
face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>Doug
Coward</FONT></FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT
face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>Software
Engineer</FONT></FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT
face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>21<SUP>
st</SUP> Century Systems Inc.</FONT></FONT></DIV></DIV>
</BODY></HTML>