[gdal-dev] GDAL Java Bindings and HDF4 File format

Even Rouault even.rouault at mines-paris.org
Tue Jan 18 14:37:55 EST 2011


Le mardi 18 janvier 2011 20:20:05, Sam Ritchie a écrit :
> Hey all,
> 
> Short question first, then the longer explanation.
> 
> *QUESTION*: My java SWIG bindings, generated from source, can't read the
> HDF4 format. How can I fix this?

Sam,

The fact that you can't read HDF4 files is very likely unrelated with the use 
of the Java bindings. You should concentrate on making GDAL standard command 
line utilities, such as gdalinfo, to recognize your HDF4 file first.

Does gdalinfo --format HDF4 returns something like :

Format Details:
  Short Name: HDF4
  Long Name: Hierarchical Data Format Release 4
  Help Topic: frmt_hdf4.html

This would be a sign that your GDAL build is correctly configured.

If so, you can try "gdalinfo yourfile.hdf". If it works, you can then move on 
the Java side. If not, well, you've got a file that isn't handled by the HDF4 
driver and this would probably deserve a Trac ticket with a link to it.

I'd node that https://svn.osgeo.org/fdo/tags/3.4_G032/Thirdparty/gdal isn't 
the official repository of GDAL. It looks like an import of GDAL 1.6.0 made by 
the FDO project. I'd encourage you migrating to GDAL 1.7.3 or the soon-to-be-
released GDAL 1.8.0 as many bugfixing occured in the Java bindings starting 
with GDAL 1.7.0.

Best regards,

Even


More information about the gdal-dev mailing list