Ticket #2846 (closed defect: duplicate)
flipped NetCDF driver output
| Reported by: | lagerratrobe | Owned by: | warmerdam |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | GDAL_Raster | Version: | 1.5.2 |
| Severity: | normal | Keywords: | netcdf |
| Cc: | ksshannon@… |
Description
When converting CF convention NetCDF data using GDAL 1.5.2, released 2008/05/29, output GeoTIFF's are upside down. The NetCDF file which I am using to test can be downloaded from http://www.unidata.ucar.edu/software/netcdf/examples/tos_O1_2001-2002.nc.
The SUBDATASET of interest is the "tos" one, and when queried by gdalinfo it shows that it contains 24 bands, each of which varies by NETCDF_DIMENSION_time variable that increments by 15.
I am able to test that I can extract one of these bands with GDAL, and convert it to GeoTIFF with the following command:
gdal_translate -b 1 NETCDF:"tos_O1_2001-2002.nc":tos sea_temp_band_1.tif
However, as you can see from the screenshot that I've posted at http://2.bp.blogspot.com/_-yICqdt0mtY/SZxtI4yUHdI/AAAAAAAAA-I/z7W_O6qBXho/s1600-h/upside_down_netcdf.jpg, the data in the file appears to be upside down. Since this file is a sample from the Unidata web site, I'm reasonably confident that the file follows the CF convention. The georeferencing and pixel dimensions in the GeoTIFF seem to be reasonable, so it appears that the row-order is simply "flipped".
