Changes between Version 1 and Version 2 of HDF


Ignore:
Timestamp:
Apr 1, 2007, 4:12:47 PM (17 years ago)
Author:
warmerdam
Comment:

added note about building to fix netcdf issue.

Legend:

Unmodified
Added
Removed
Modified
  • HDF

    v1 v2  
    66= Building with HDF4 =
    77
    8 NCSA HDF library can be downloaded from the [http://hdf.ncsa.uiuc.edu/ The NCSA HDF Home Page] at the the [http://www.ncsa.uiuc.edu/ National Center for Supercomputing Applications].
     8NCSA HDF library can be downloaded from the [http://hdf.ncsa.uiuc.edu/ The NCSA HDF Home Page] at the the [http://www.ncsa.uiuc.edu/ National Center for Supercomputing Applications].  HDF 4.2r1 is generally the preferred version if working from source.  The szip option is not widely used, and may be omitted for simplicity.
    99
    1010If your OS distribution already contains prebuilt HDF library you can use one from the distribution.
     11
     12== Open File Limits ==
    1113
    1214Please note, that NCSA HDF library compiled with several defaults which is defined in ''hlimits.h'' file. For example, ''hlimits.h'' defines the maximum number of opened files:
     
    1719
    1820If you need open more HDF4 files simultaneously you should change this value and rebuild HDF4 library (there is no need to rebuild GDAL if it is already compiled with HDF4 support).
     21
     22== Incompatibility with NetCDF Libraries ==
     23
     24The HDF4 libraries include an implementation of the netcdf api which can access hdf files.  If building with HDF4 and NetCDF it is necessary to build the HDF library with this disable.  This can be accomplished by defining the macro HAVE_NETCDF when building the HDF libraries.  I normally accomplish this by configuring the HDF4 libraries as follows:
     25
     26{{{
     27export CFLAGS="-fPIC -DHAVE_NETCDF"
     28export CXXFLAGS="-fPIC -DHAVE_NETCDF"
     29export LIBS="-lm"
     30./configure --disable-fortran
     31}}}
     32
     33The -fPIC and LIBS may not be necessary on all platforms.  Without this fix either GDAL will crash intermittently when accessing netcdf files, or the build of GDAL will fail.
     34