Changes between Version 47 and Version 48 of NetCDF_exportUpdateChanges
- Timestamp:
- Oct 17, 2011, 9:26:47 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
NetCDF_exportUpdateChanges
v47 v48 80 80 81 81 The proposed changes in this section update the NetCDF driver when exporting to NetCDF to: 82 * Ensure the projection parameters are saved correctly according to their CF-1 definitions 82 83 * save extra information so datasets are CF-1 compliant and can be viewed as gridded data in CF-1 compliant NetCDF applications built on NetCDF Java (X/Y projected coordinate arrays, and optionally full !Lat/Lon arrays); 83 84 * save as much of the SRS information in CF-1 compliant format as possible (including ellipsoid parameters); … … 87 88 The following subsections describe these changes specifically. 88 89 89 ==== 3.1) When exporting to NetCDF map projections via GDAL, save projection coordinate variables. Optionally, also save lat and lon mapping variables. ==== 90 ==== 3.1) Ensure projection parameters are saved and read from correctly for all projections specified in CF-1.5 ==== 91 92 As logged at #2893 and #3324, the NetCDF driver as it stood in 1.8 was not able to write CF-1.5 compliant attributes for projections such as Lambert Conformal Conic. 93 94 A thorough analysis of the CF-1.5 map projections supported (see again [[http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.5/apf.html CF-1.5 App F]]) showed that the mapping of OGC WKT projection parameter names to CF-1.5 equivalents needed to be done per-projection. Whereas, the existing code tried to use a single global mapping of WKT attribute names to CF-1 for use in exporting. 95 96 To overcome this issue we have defined per-projection mappings of OGC WKT parameter names to CF-1.5 equivalents using simple data structures, and re-written the NetCDF driver export code (in the CreateCopy() function) to reference these mappings when saving a map-projected raster. 97 98 This was tested for all projections listed as part of CF-1.5 by translating input files in another format (eg GeoTIFF) into NetCDF, and then ensuring the resulting files were CF-compliant and could be opened as gridded data by the NetCDF Java API. 99 100 We also tested these files could have their projections correctly re-imported back into GDAL :- and in the process updated the NetCDF driver's projection import code (in !SetProjection()) as well. 101 102 103 104 ==== 3.2) When exporting to NetCDF map projections via GDAL, save projection coordinate variables. Optionally, also save lat and lon mapping variables. ==== 90 105 91 106 '''Related fix''': #2893 [[BR]] … … 112 127 Thus we've chosen to make it ''optional'' to write these Variables - but provide the 'WRITE_LONLAT' co option for users who wish to make sure their data is fully self-describing and CF-1 compliant, without relying on on-the-fly reprojection. 113 128 114 ==== 3. 2) Continue saving GDAL custom attribute tags in addition to CRS definition, but add option not to save ====129 ==== 3.3) Continue saving GDAL custom attribute tags in addition to CRS definition, but add option not to save ==== 115 130 116 131 '''New -co options''': -co WRITE_GDAL_TAGS=YES/NO (default: YES)[[BR]] … … 153 168 The GeoTranform array is not written to file unless there is no means to recover that information (i.e. in the case when lon/lat values are not written to file for a geographic CRS). 154 169 155 ==== 3. 3) Add saving of reference Ellipsoid parameters in CF-1 compliant format used by dataset ====170 ==== 3.4) Add saving of reference Ellipsoid parameters in CF-1 compliant format used by dataset ==== 156 171 157 172 '''New -co options''': No, though related to the new proposed WRITE_GDAL_TAGS option below. … … 206 221 * Code and history of changes is in a git repository at https://github.com/etiennesky/gdal-netcdf/ (gdal-netcdf-proj branch) 207 222 * Since the modifications above involved a lot of related changes to significant parts of the driver, we managed the actual development process using a Github repository for integration and testing. 208 * The autotest suite had been modified (in svn trunk) to test the improvements 223 * The autotest suite had been modified (in svn trunk) to test the improvements - including using an online cf-checker to test conformance when available. 224 * We also manually tested that NetCDF files created by the updated driver in each supported CF-1.5 projection could be opened via NetCDF-Java, in addition to the cf-checker used in the new autotests. This has allowed verification of the majority of projections, with a few remaining issues - see link below. 209 225 * We will ask the users of the driver to please test the new version with their important files and notify any regressions. 210 226 … … 213 229 * The code will be committed to svn trunk, and if possible will be back-ported to the 1.8 series (should a 1.8.2 release occur after implementation and sufficient testing). 214 230 * The commit will happen as soon as we get approval from members of the gdal-dev list or RFC vote (if needed) 231 232 == Appendices/Links == 233 234 TODO - links to Wiki page with status of projection-handling by driver in development. Will be useful to point people to this, if interested to help with testing.