Changes between Version 6 and Version 7 of NetCDF_exportUpdateChanges


Ignore:
Timestamp:
Sep 21, 2011, 10:30:37 PM (13 years ago)
Author:
pds
Comment:

Wrote notes on lat and lon arrays.

Legend:

Unmodified
Added
Removed
Modified
  • NetCDF_exportUpdateChanges

    v6 v7  
    6565=== When exporting to NetCDF map projections via GDAL, save projection coordinate variables. Optionally, also save lat and lon mapping variables. ===
    6666
    67 *Related tix*: #2893 [[BR]]
    68 *New -co options*:
     67''Related tix'': #2893 [[BR]]
     68''New -co options'':
     69  * WRITELONLAT=yes/no (default: yes for geographic, no for projected)
     70  * TYPELONLAT=float/double (default: double for geographic, float for projected)
    6971
    70 *Rationale*:
    71 X and Y needed as part of CF-1 conventions - and without them, files are not recognised as gridded data by the  NetCDF-Java API, and thus ncWMS, ToolsUI and TDS.
    72  They do not add a significant file-size overhead.
    73 Similarly,
     72''Has back-compat impact?'': No
    7473
    75 Related issues:
    76  * South-up change on both import and export?
    77  * adding X and Y coords
     74''Change'':
    7875
     76When exporting rasters to NetCDF, save Coordinate Variables for the projected SRS, as required by the CF-1 convention, normally saved as "x" and "y".
     77
     78Optionally 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.
     79
     80''Rationale'':
     81
     82The 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.
     83
     84Tests 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).
     85
     86While 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).
    7987== Compatibility Issues ==
    8088