I've been generating some large (28800x13920) grids of BYTE data representing the NALCMS2005 North American Land Cover dataset (original 250m projected data resampled to a WGS84 grid at 15 arc sec). I store the grid as a NetCDF 4 file with GZIP compression, using gzip level 6 and CF conventions; i.e. I use a "crs" variable to define the coordinate reference system, "lat" and "lon" dimensions and coordinate variables to define the geodetic latitude and longitude axes, and "lat_bounds" and "lon_bounds" variables to define the bounds of each row/column of the grid.

When I select one of these files with qgis-1.8.0-9_0.el6.x86_64 on a CentOS system or with qgis-1.8.0-6.fc16.i686 on a Fedora Core 16 system (these are my two Linux options right now), the "Select raster layers to add..." dialog that lists the layers found in the file displays them as


QGIS is able to load the data and display it, but the coordinate reference system and grid geometry are completely ignored. I realize that NetCDF4 files are technically also HDF5 files, but read on.

When I select one of the same files with QGIS on a Mac (Mountain Lion 10.8.4), the "Select raster layers to add..." dialog show the layers in the file as


and successfully recognizes the CRS in the file. Unfortunately, this solution is not doing a lot for me because reading and displaying the data on this system takes about 30 minutes, and good luck changing anything or doing any navigation.

So... if I do "gdalinfo --formats | grep -i df" on the different systems I get exactly the same result:

GMT (rw): GMT NetCDF Grid Format netCDF (rw+): Network Common Data Format HDF4 (ro): Hierarchical Data Format Release 4 HDF4Image (rw+): HDF4 Dataset NDF (rov): NLAPS Data Format HDF5 (ro): Hierarchical Data Format Release 5 HDF5Image (ro): HDF5 Dataset

"gdalinfo --version" on the three systems:

  • Mac: GDAL 1.9.1, released 2012/05/15
  • FC16: GDAL 1.7.3, released 2010/11/10
  • CentOS 6.3: GDAL 1.8.1, released 2011/07/09

Maybe those older GDAL libraries on the Linux systems are the problem and I just need to build QGIS from source using GDAL 1.9 on one of the Linux machines.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.