Ticket #2893 (new defect)
netcdf driver does not read and write CF-1.0 coordinate system properly for projected CRS
| Reported by: | warmerdam | Owned by: | etourigny |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | GDAL_Raster | Version: | svn-trunk |
| Severity: | normal | Keywords: | netcdf |
| Cc: | dnadeau, kyle, pds, etiennesky |
Description
If I generate a netcdf file from a UTM GeoTIFF file like this:
gdal_translate -srcwin 0 0 20 20 utm.tif out.nc -of netcdf
and then remove the spatial_ref and geotransform metadata items which are non-standard GDAL items (using ncdump/vi/ncgen) I end up with what should have been a valid CF-1.0 file that GDAL does not recognise the coordinate system from, nor extract the geotransform.
Driver: netCDF/Network Common Data Format
Files: out.nc
out.nc.aux.xml
Size is 20, 20
Coordinate System is `'
Metadata:
NC_GLOBAL#Conventions=CF-1.0
NC_GLOBAL#AREA_OR_POINT=Area
Band1#grid_mapping=transverse_mercator
Band1#long_name=GDAL Band Number 1
transverse_mercator#Northernmost_Northing=3.75132e+06
transverse_mercator#Southernmost_Northing=3.75012e+06
transverse_mercator#Easternmost_Easting=441920
transverse_mercator#Westernmost_Easting=440720
transverse_mercator#grid_mapping_name=transverse_mercator
transverse_mercator#latitude_of_projection_origin=0.000000e+00
transverse_mercator#central_meridian=-1.170000e+02
transverse_mercator#scale_factor_at_central_meridian=9.996000e-01
transverse_mercator#false_easting=5.000000e+05
transverse_mercator#false_northing=0.000000e+00
AREA_OR_POINT=Area
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0, 20.0)
Upper Right ( 20.0, 0.0)
Lower Right ( 20.0, 20.0)
Center ( 10.0, 10.0)
Band 1 Block=20x1 Type=Byte, ColorInterp=Gray
NoData Value=0
Metadata:
NETCDF_VARNAME=Band1
We need to review the GDAL NetCDF driver logic for reading this CF-1.0 info and try and correct it. It is also possible we are writing something wrong.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

