Changes between Version 18 and Version 19 of NetCDF_exportUpdateChanges
- Timestamp:
- Oct 10, 2011, 6:06:31 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
NetCDF_exportUpdateChanges
v18 v19 2 2 3 3 (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 -> )6 4 7 5 Status: Development … … 27 25 == Planned Changes == 28 26 27 === Changes to metadata items === 28 29 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. 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 29 39 === Change to a default south-up orientation for NetCDF data === 30 40 31 41 '''Related tix''': #4251[[BR]] 32 42 33 '''New -co options''': ?? Should we include an option to allow force assume south-regular? 34 35 -> Definitely no! 43 '''New -co options''': No 36 44 37 45 '''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. … … 39 47 '''Change''': 40 48 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.49 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. Import is not changed as it is already compatible. 42 50 43 51 … … 50 58 51 59 '''Related tix''': N/A [[BR]] 52 '''New -co options''': -co WRITE GDALTAGS (yes/no, defaults to yes)[[BR]]60 '''New -co options''': -co WRITE_GDAL_TAGS (yes/no, defaults to yes)[[BR]] 53 61 '''Has back-compat impact?''': No 54 62 55 63 '''Change''': 56 64 57 Currently, as well as following the CF-1 conventions to save projection metadata, the NetCDF driver alsowrites metadata in several custom attributes:65 In addition to following the CF-1 conventions to save projection metadata, the NetCDF driver writes metadata in several custom attributes: 58 66 * 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). 61 68 62 The WRITEGDALTAGS driver creation option would allowthe user to choose not to write these tags. However it would be set to 'YES' by default.69 The 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. 63 70 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. 71 The 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 73 Note: 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. 65 74 66 75 '''Rationale''': … … 70 79 However, 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. 71 80 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. 81 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. See https://cf-pcmdi.llnl.gov/trac/ticket/69 . 73 82 74 83 === Add saving of Datum reference Ellipsoid parameters in CF-1 compliant format, in addition to within GDAL's WKT === 75 84 76 85 '''Related tix''': #2893 [[BR]] 77 '''New -co options''': No, though related to the new proposed WRITE GDALTAGS option above.86 '''New -co options''': No, though related to the new proposed WRITE_GDAL_TAGS option above. 78 87 79 88 '''Has back-compat impact?''': No … … 101 110 '''Related tix''': #2893 [[BR]] 102 111 '''New -co options''': 103 * WRITE LONLAT=yes/no/ifneeded (default: yes for geographic, ifneeded for projected)104 * TYPE LONLAT=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) 105 114 106 115 '''Has back-compat impact?''': No … … 124 133 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). 125 134 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?''': No131 135 132 136 == Compatibility Issues ==