Changes between Version 46 and Version 47 of NetCDF_exportUpdateChanges


Ignore:
Timestamp:
Oct 17, 2011, 8:13:12 AM (13 years ago)
Author:
etourigny
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NetCDF_exportUpdateChanges

    v46 v47  
    124124 * and individual corner coordinates (NN, SS, WE and WW).
    125125
    126 The new implementation saves the GeoTransform array only for a geographic CRS, in the specific case that lon/lat values are not written to the file. The corner coordinates are never saved as they are redundant.
    127 
     126The new implementation does not save the GeoTransform array, with the exception of when the GeoTransform cannot be retrieved from the netcdf file (i.e. only for a geographic CRS, in the specific case that lon/lat values are not written ). This has the effect that in some cases, the computed pixel width and height (GT(1) and GT(5)) differs by a very small amount from the original values in the GDAL raster file, due to various floating-point operations and half-pixel shifts.
     127
     128For example,
     129{{{
     130Given a landsat file (tmp/melb-small_AEA.nc) generated by the autotest netcdf_cdf_4:
     131
     132src:(1232736.8666076646, 30.080459243369152, 0.0, -4118493.9582119514, 0.0, -30.080459243369152)
     133dst:(1232736.8666076646, 30.080459243369834, 0.0, -4118493.9582119514, 0.0, -30.080459243366494)
     134
     135The difference in width/height is less than 10E^-11 (10 pm), while the corners are identical.
     136
     137However, when translating the original landsat file (melb-small.tif) in UTM, the pixel width/height of 30m is preserved exactly.
     138}}}
     139
     140We feel that this difference is marginal, however should a strong argument be presented, we could save the GeoTransform as before and compare with the values stored in the CF dimensions variable for conflict.
     141The corner coordinates are never saved as they are redundant. When importing a CF file, if GeoTransform cannot be computed from dimension variables, GeoTransform and corner coordinates are consulted if available.
     142 
    128143We 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.
    129144
    130 When importing files in NetCDF format, the driver checks the GDAL-written WKT (including Datum) matches the projection information stored in the CF-compliant attributes. If there is a conflict, the CF-compliant CRS will be considered as authoritative.
     145When importing files in NetCDF format, the driver checks the GDAL-written WKT (including Datum), matches the projection information stored in the CF-compliant attributes. If there is a conflict, the CF-compliant CRS will be considered as authoritative.
    131146
    132147'''Rationale''':