Changes between Version 12 and Version 13 of NetCDF_exportUpdateChanges


Ignore:
Timestamp:
Sep 22, 2011, 7:21:21 PM (13 years ago)
Author:
pds
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NetCDF_exportUpdateChanges

    v12 v13  
    9999When exporting rasters to NetCDF, save Coordinate Variables for the projected SRS, as required by the CF-1 convention, normally saved as "x" and "y".
    100100
    101 Optionally using -co options listed above, also write 2D 'lat' and 'lon' arrays, which are specified as part of the CF-1 convention for map projections.
     101Optionally using -co options listed above, also write 2D 'lat' and 'lon' arrays, which are specified as part of the CF-1 convention for map projections - but are not actually required for the Unidata-maintained NetCDF Java API and applications built upon them (eg ncWMS, Thredds Data Server).
    102102
    103103'''Rationale''':
     
    105105The CF-1 conventions specify these coordinate variables as necessary for grids, see [[http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.5/ch05s06.html ch5.6]] and [[http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.5/apf.html App F]] in the document.
    106106
    107 Tests with NetCDF CF-1 reading software show that rasters with projected grids will not be correctly interpreted without the coordinate variables in the projected system (the NetCDF-Java API determines this, since it's used by ncWMS, ToolsUI and Thredds Data Server).
     107Tests with NetCDF CF-1 reading software indeed show that rasters with projected grids will not be correctly interpreted without the coordinate variables in the projected system (the NetCDF-Java API determines this, since it's used by ncWMS, ToolsUI and Thredds Data Server).
    108108
    109 While the CF-1 convention examples also contain 2D "lat" and "lon" Variables containing the latitude and longitude at each data point, tests have shown that the NetCDF Java API can correctly interpret CF-1 data without these added. Thus we've chosen to make it ''optional'' to write these Variables, as they are redundant from GDAL's point of view (Lat and Lon are calculated on-the-fly), and they increase the size of a NetCDF file significantly. (E.g. if the actual band-data is stored as a 2D Byte array, but the lat and lon are stored as doubles, then the file-size can easily increase by 10X).
     109While the CF-1 convention examples also contain 2D "lat" and "lon" Variables containing the latitude and longitude at each data point, tests have shown that the NetCDF Java API can correctly interpret CF-1 data without these added. The rationale for this point is given at http://www.mail-archive.com/cf-metadata@cgd.ucar.edu/msg00759.html.
     110
     111Thus we've chosen to make it ''optional'' to write these Variables, as they are redundant from GDAL's point of view (Lat and Lon are calculated on-the-fly), and they increase the size of a NetCDF file significantly. (E.g. if the actual band-data is stored as a 2D Byte array, but the lat and lon are stored as doubles, then the file-size can easily increase by 10X).
    110112
    111113== Compatibility Issues ==