132 | | CF-1 convention's only support of datums currently is to specify a reference ellipsoid using parameters such as 'semi_major_axis' and 'inverse_flattening'. |
133 | | |
134 | | While these attributes alone do not fully specify the datum (which requires an EPSG code so control points can be referenced), they at least allow fairly accurate map projection of the created NetCDF file using tools such as ncWMS. |
135 | | |
136 | | In the longer-term it would be beneficial to work with the CF-1 community to allow saving of full datum information in a format readable by CF-1. |
| 131 | CF-1 convention's only support of datums currently is to specify a reference ellipsoid using parameters such as 'semi_major_axis' and 'inverse_flattening'. While these attributes alone do not fully specify the datum (which requires an EPSG code so control points can be referenced), they at least allow fairly accurate map projection of the created NetCDF file using tools such as ncWMS. |
| 132 | |
| 133 | In the longer-term it would be beneficial to work with the CF-1 community to allow saving of full datum information in a format readable by CF-1, and we've made preliminary enquiries here and would welcome cooperation with the CF-1 community, but updating the CF-1 standard is outside the scope of this current GDAL NetCDF work. |
151 | | 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. |
152 | | |
153 | | 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. |
154 | | |
155 | | **PDS comment**: do you mean just "lon/lat" above? As that's what it looks like in the code. And the new driver always saves X/Y right? |
| 147 | We propose adding a new WRITE_GDAL_TAGS driver creation option to allow the user to choose not to write these tags. However it would be set to 'YES' by default. |
| 148 | |
| 149 | A further refinement in the new driver is that the new implementation saves the GeoTransform array only if the lon/lat values are not written to the file, and the corner coordinates are never saved as they are redundant. |
| 150 | |
| 151 | **PDS comment**: I edited the above sentence to remove "X/Y" that was with "lon/lat" above? As that's what it looks like in the code. And the new driver always saves X/Y right? |
164 | | We assume by default that if users export to a NetCDF file from GDAL, then they may wish to import into GDAL again and retain full information. Currently, the CF-1 convention doesn't allow saving all the projection information that GDAL can manipulate via a WKT (such as named Datums, and EPSG authorities). |
165 | | |
166 | | 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 the user may wish to have no additional metadata present. |
167 | | |
168 | | 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 . |
169 | | |
| 163 | We assume by default that if users export to a NetCDF file from GDAL, then they may wish to import into GDAL again and retain full information. As stated above, the CF-1 convention doesn't allow saving all the projection information that GDAL can manipulate via a WKT, so we recommend keeping current behaviour by default to allow lossless re-import into GDAL. The 'extra' attributes do not interfere with the ability of CF-1 compliant tools such as NetCDF-Java to open and update rasters. |
| 164 | |
| 165 | The extra option to not save GDAL tags has been added in recognition of 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 the user may wish to have no additional metadata present. |