Changes between Version 18 and Version 19 of NetCDF_exportUpdateChanges


Ignore:
Timestamp:
Oct 10, 2011, 6:06:31 PM (13 years ago)
Author:
etourigny
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NetCDF_exportUpdateChanges

    v18 v19  
    22
    33(Note: this is an initial draft by pds - to collect related ideas for input and if necessary RFC development)
    4 
    5 (Note from Etienne, I have added some comments starting with -> )
    64
    75Status: Development
     
    2725== Planned Changes ==
    2826
     27=== Changes to metadata items ===
     28
     29As is common with many programs which manipulate netcdf data, a new GDAL metadata item (with version number) is added.  Also, the netcdf history attribute will be updated, and the Conventions attribute will be set to CF-1.5 to reflect support or latest CF convention and its projections.
     30
     31{{{
     32                :Conventions = "CF-1.5" ;
     33                :GDAL = "GDAL 1.9dev, released 2011/01/18" ;
     34                :history = "Mon Oct 10 21:12:19 2011: GDAL NCDFCreateCopy( trmm4.nc, ... )\n",
     35}}}
     36
     37'''Has back-compat impact?''': No
     38
    2939=== Change to a default south-up orientation for NetCDF data ===
    3040
    3141'''Related tix''': #4251[[BR]]
    3242
    33 '''New -co options''': ?? Should we include an option to allow force assume south-regular?
    34 
    35 -> Definitely no!
     43'''New -co options''': No
    3644
    3745'''Has back-compat impact?''': Only for GDAL versions prior to 1.6 (r18152).  Since then, a check is made to ensure the driver recognizes bottom-up grids and flips the y-axis accordingly.
     
    3947'''Change''':
    4048
    41 When GDAL exports to NetCDF, translate the data so that it is in "south up" orientation, i.e. invert the data from the GDAL default. Likewise upon import from CF-1, verify if the data is in "south up" orientation, and translate the y values by default.
     49When GDAL exports to NetCDF, translate the data so that it is in "south up" orientation, i.e. invert the data from the GDAL default. Import is not changed as it is already compatible.
    4250
    4351
     
    5058
    5159'''Related tix''': N/A [[BR]]
    52 '''New -co options''': -co WRITEGDALTAGS (yes/no, defaults to yes)[[BR]]
     60'''New -co options''': -co WRITE_GDAL_TAGS (yes/no, defaults to yes)[[BR]]
    5361'''Has back-compat impact?''': No
    5462
    5563'''Change''':
    5664
    57 Currently, as well as following the CF-1 conventions to save projection metadata, the NetCDF driver also writes metadata in several custom attributes:
     65In addition to following the CF-1 conventions to save projection metadata, the NetCDF driver writes metadata in several custom attributes:
    5866 * A "spatial_ref" tag containing full OGC WKT string, including datum and EPSG codes if known.
    59  * A geotransform array, saved as a string (!GeoTransform).
    60  * Previously saved values of NN, SS, WE and WW are not saved any more (as they are incorporated into the geotransform array), although they are checked upon import for compatibility.
     67 * A geotransform array saved as a string (GeoTransform), and individual corner coordinates (NN, SS, WE and WW).
    6168
    62 The WRITEGDALTAGS driver creation option would allow the user to choose not to write these tags. However it would be set to 'YES' by default.
     69The new WRITE_GDAL_TAGS driver creation option allows the user to choose not to write these tags. However it would be set to 'YES' by default.
    6370
    64 Note: when importing files in NetCDF format, the driver will check the GDAL-written WKT matches the projection information stored in the CF-compliant attributes. If not, the CF-compliant CRS will be considered as authoritative.
     71The new implementation saves the GeoTransform array only if the lon/lat or x/y values are not written to the file, and the corner coordinates are never saved as they are redundant.
     72
     73Note: when importing files in NetCDF format, the driver checks the GDAL-written WKT matches the projection information stored in the CF-compliant attributes. If there is a conflict, the CF-compliant CRS will be considered as authoritative.
    6574
    6675'''Rationale''':
     
    7079However, there is certainly a use-case to export to a NetCDF file with no intention to access again via GDAL and use purely for use by CF-1 applications, in which case we don't need to save the added metadata.
    7180
    72 Note: In the longer-term we would view it as advantageous that the CF-1 conventions were augmented to allow recording of full datum information, and reduce the need to store extra CRS information in GDAL-managed attributes. However this will require agreement of the CF-1 community for a new standard, and would take time to agree upon and adopt.
     81Note: In the longer-term we would view it as advantageous that the CF-1 conventions were augmented to allow recording of full datum information, and reduce the need to store extra CRS information in GDAL-managed attributes. However this will require agreement of the CF-1 community for a new standard, and would take time to agree upon and adopt.  See https://cf-pcmdi.llnl.gov/trac/ticket/69 .
    7382
    7483=== Add saving of Datum reference Ellipsoid parameters in CF-1 compliant format, in addition to within GDAL's WKT ===
    7584
    7685'''Related tix''': #2893 [[BR]]
    77 '''New -co options''': No, though related to the new proposed WRITEGDALTAGS option above.
     86'''New -co options''': No, though related to the new proposed WRITE_GDAL_TAGS option above.
    7887
    7988'''Has back-compat impact?''': No
     
    101110'''Related tix''': #2893 [[BR]]
    102111'''New -co options''':
    103   * WRITELONLAT=yes/no/ifneeded (default: yes for geographic, ifneeded for projected)
    104   * TYPELONLAT=float/double (default: double for geographic, float for projected)
     112  * WRITE_LONLAT=YES/NO/IFNEEDED (default: YES for geographic, IFNEEDED for projected) ->Note, this not implemented yet
     113  * TYPE_LONLAT=float/double (default: double for geographic, float for projected)
    105114
    106115'''Has back-compat impact?''': No
     
    124133Thus 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).
    125134
    126 === Changes to metadata items ===
    127 
    128 As is common with many programs which manipulate netcdf data, a new GDAL metadata item (with version number) is added.  Also, the netcdf history attribute will be updated, and the Conventions attribute will be set to CF-1.5 to reflect support or latest CF convention and its projections.
    129 
    130 '''Has back-compat impact?''': No
    131135
    132136== Compatibility Issues ==