Ticket #2379 (new enhancement)

Opened 2 months ago

Last modified 2 months ago

GDAL with NetCDF4 - Adjustment to recognize netCDF4

Reported by: maartenplieger Assigned to: warmerdam
Priority: normal Milestone:
Component: default Version: 1.5.0
Severity: normal Keywords: NetCDF4
Cc:

Description

Adjustment to the netCDF driver to recognize the netCDF4 files. In 'netCDFdataset.cpp' at line 1308: I added " && !((nc_inq_libvers()[0]=='4')&&EQUALN((const char *)poOpenInfo->pabyHeader+1,"HDF",3))) ". This line checks for the netCDF4 library ('4') and for a 'HDF' header. This makes sure that in case of the netCDF4 library, HDF files are also picked up by this driver. (NetCDF4 uses the HDF5 file format, see: http://www.unidata.ucar.edu/software/netcdf/netcdf-4/)

Change History

05/16/08 09:31:32 changed by maartenplieger

  • milestone set to 1.5.2.

Adjustment to the netCDF driver to recognize the netCDF4 files. In 'netCDFdataset.cpp' at line 1308: I added:

&& !(poOpenInfo->nHeaderBytes < 5 ((nc_inq_libvers()[0]=='4')&&EQUALN((const char*)poOpenInfo->pabyHeader+1,"HDF",3))))

This line checks for the netCDF4 library ('4') and for a 'HDF' header. This makes sure that in case of the netCDF4 library, HDF files are also picked up by this driver. (NetCDF4 uses the HDF5 file format, see: http://www.unidata.ucar.edu/software/netcdf/netcdf-4/)

05/16/08 09:33:01 changed by maartenplieger

  • version changed from unspecified to 1.5.0.
  • milestone deleted.