[gdal-dev] gdal_translate for nc --> tiff. Coords seem to change?

Hill, David Foster David.Hill at oregonstate.edu
Mon Jun 28 11:59:24 PDT 2021


I am new to GDAL, and have spent the past two weeks exploring its use for (largely) nc —> tiff conversions. I am puzzled by a few things, however. I have a .nc file and when I use 

>> ncdump -c file.nc

the coords are shown to me. The min x is 487200 and the min y is 4690100. The grid size is 100 m. If I then do:

>> gdal_translate -of GTiff file.nc file.tif

and then

>> gdalinfo file.tif, 

it shows the ‘lower left’ corner coordinates as

486790, 4690050

For the y coord, I can see how this makes sense…assume that ncdump is giving coords of the grid cell centers, not the ‘corner’ of the grid cells. Thus, the 50 m difference. For the x coord, the values are like 410 m different, so I am puzzled about that.

I am sure this is an overly simple question, but I would welcome any tips / guidance on what I am doing wrong. Thank you.
David F. Hill
Civil and Construction Engineering
Oregon State University
220 Owen Hall
Corvallis, OR 97331
david.hill at oregonstate.edu

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1563 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210628/94676cca/attachment-0001.bin>

More information about the gdal-dev mailing list