[gdal-dev] gdal_translate differences between versions 3.4.3 and 3.5.1?

Matthew Savoie matthew.savoie at colorado.edu
Tue Jul 26 12:38:58 PDT 2022


Hi all,

I have noticed a difference in the output of gdal_translate between GDAL 3.4.3
and 3.5.1 and I can't see in the changelog that I should see a difference.
This is just a request to see if I missed something or if there might be change
not described in gdal_translate between versions 3.4.3 and 3.5.1.

I have a netcdf4/hdf5 file (test.nc) that I extract a variable and turn into a geotiff with the gdal_translate command:

> `gdal_translate -a_srs EPSG:4326 NETCDF:"./test.nc":analysed_sst test_nc2tiff.tif`

I have run this command with gdal 3.4.3 and gdal 3.5.1 and get different output files.

The difference in the file metadata between the two versions is that using gdal
3.4.3: there is a value for `Origin` and `Pixel Size` and the Corner
Coordinates are in Latitude and longitude.  When I use gdal 3.5.1 there are no metadata
values for Origin or Pixel Size, and the Corner Coordinates look to be in grid
cells.

3.4.3 output:
   ...
   Origin = (-179.995005493240370,89.994997863650838)
   Pixel Size = (0.010000000152592,-0.009999999762615)
   ...
   Corner Coordinates:
   Upper Left  (-179.9950055,  89.9949979) (179d59'42.02"W, 89d59'41.99"N)
   Lower Left  (-179.9950055, -89.9949979) (179d59'42.02"W, 89d59'41.99"S)
   Upper Right ( 180.0050000,  89.9949979) (180d 0'18.00"E, 89d59'41.99"N)
   Lower Right ( 180.0050000, -89.9949979) (180d 0'18.00"E, 89d59'41.99"S)
   Center      (   0.0049973,   0.0000000) (  0d 0'17.99"E,  0d 0' 0.01"N)
   ...

3.5.1 output:
   ...
   Corner Coordinates:
   Upper Left  (    0.0,    0.0)
   Lower Left  (    0.0,17999.0)
   Upper Right (36000.0,    0.0)
   Lower Right (36000.0,17999.0)
   Center      (18000.0, 8999.5)
   ...

   I'm wondering if this is a bug or a feature.  I'm happy to provide a sample file or admit my ignorance if I should have known this was a new change.

Thanks,

Matt Savoie

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220726/6b70bb4b/attachment.htm>


More information about the gdal-dev mailing list