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

Hill, David Foster David.Hill at oregonstate.edu
Mon Jun 28 13:42:10 PDT 2021


Here is a link to the .tif:

https://drive.google.com/file/d/1ZxNdoURdLZS1HRUQUhF-evD1NpuIDcvk/view?usp=sharing <https://drive.google.com/file/d/1ZxNdoURdLZS1HRUQUhF-evD1NpuIDcvk/view?usp=sharing>

And here is a link to the .nc:

https://drive.google.com/file/d/1pcXklnup5AxYe3DQfGfsZ3mwwe8WI8mf/view?usp=sharing <https://drive.google.com/file/d/1pcXklnup5AxYe3DQfGfsZ3mwwe8WI8mf/view?usp=sharing> 


---------------------------------------------------
David F. Hill
Professor
Civil and Construction Engineering
Oregon State University
220 Owen Hall
Corvallis, OR 97331
541.737.4939
david.hill at oregonstate.edu
http://www.engr.oregonstate.edu/~dfh
---------------------------------------------------



> On Jun 28, 2021, at 12:53 PM, Even Rouault <even.rouault at spatialys.com> wrote:
> 
> [This email originated from outside of OSU. Use caution with links and attachments.]
> 
> David,
> 
> providing a link to a such file could be useful for investigation
> 
> Even
> 
> Le 28/06/2021 à 20:59, Hill, David Foster a écrit :
>> Hello.
>> 
>> 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
>> Professor
>> Civil and Construction Engineering
>> Oregon State University
>> 220 Owen Hall
>> Corvallis, OR 97331
>> 541.737.4939
>> david.hill at oregonstate.edu <mailto:david.hill at oregonstate.edu>
>> http://www.engr.oregonstate.edu/~dfh <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.engr.oregonstate.edu%2F~dfh&data=04%7C01%7C%7Cf1052ff53fe1478320b708d93a6e67c0%7Cce6d05e13c5e4d6287a84c4a2713c113%7C0%7C0%7C637605068745495027%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=2U4m8gjslAiHa%2FjfQlCHsjR30mQyoUKaZK6lZTA1W9M%3D&reserved=0>
>> ---------------------------------------------------
>> 
>> 
>> 
>> 
>> 
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org <mailto:gdal-dev at lists.osgeo.org>
>> https://lists.osgeo.org/mailman/listinfo/gdal-dev <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fgdal-dev&data=04%7C01%7C%7Cf1052ff53fe1478320b708d93a6e67c0%7Cce6d05e13c5e4d6287a84c4a2713c113%7C0%7C0%7C637605068745495027%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=Es0pPW8W2v2kSzDllxKkcLuzn2zJwFZ%2BCtHI3BahwAU%3D&reserved=0>
> -- 
> http://www.spatialys.com <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.spatialys.com%2F&data=04%7C01%7C%7Cf1052ff53fe1478320b708d93a6e67c0%7Cce6d05e13c5e4d6287a84c4a2713c113%7C0%7C0%7C637605068745505025%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=BcNPqrHMHjyxWT0koLvKjnN6ZKZ%2BtNiYwMuM%2BgYfGkw%3D&reserved=0>
> My software is free, but my time generally not.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210628/e62ee528/attachment.html>
-------------- 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/e62ee528/attachment.bin>


More information about the gdal-dev mailing list