<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hello. I asked this question a few weeks ago, but I think my question was not complete enough, and I also think I did not attach the right files. So, I would like to try again, if that is ok.<div class=""><br class=""></div><div class="">I have a .nc file. When I do:</div><div class=""><br class=""></div><div class="">>>ncdump -c <file.nc> </div><div class=""><br class=""></div><div class="">I can inspect the coordinates in the x and y directions. When I do this, it shows the x vector correctly as: 487200, 487300,…625300. And it shows the y vector correctly as 4690100, 4690200,…4937600. My file is in projected (EPSG:32612) coords.</div><div class=""><br class=""></div><div class="">Next, I use gdal_translate to change .tif. I do this as: </div><div class=""><br class=""></div><div class="">gdal_translate -of GTiff <file.nc> <file.tif></div><div class=""><br class=""></div><div class="">This is my question —> after converting to tif, I can look at the header info with gdalinfo. When I do this, I see: </div><div class=""><br class=""></div><div class=""><div class="">****</div><div class=""><div class="" style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;"><span class="" style="font-variant-ligatures: no-common-ligatures;">Corner Coordinates:</span></div><div class="" style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;"><span class="" style="font-variant-ligatures: no-common-ligatures;">Upper Left  (  486790.000, 4937650.000) </span></div><div class="" style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;"><span class="" style="font-variant-ligatures: no-common-ligatures;">Lower Left  (  486790.000, 4690050.000) </span></div><div class="" style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;"><span class="" style="font-variant-ligatures: no-common-ligatures;">Upper Right (  624990.000, 4937650.000) </span></div><div class="" style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;"><span class="" style="font-variant-ligatures: no-common-ligatures;">Lower Right (  624990.000, 4690050.000) </span></div><div class="" style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;"><span class="" style="font-variant-ligatures: no-common-ligatures;">Center      (  555890.000, 4813850.000) </span></div></div><div class="" style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;"><span class="" style="font-variant-ligatures: no-common-ligatures;">****</span></div><div class="" style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;"><span class="" style="font-variant-ligatures: no-common-ligatures;"><br class=""></span></div><div class="" style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;"><span class="" style="font-variant-ligatures: no-common-ligatures;">The y coord of lower left is 4690050…compare that to the info above about the .nc file. I think this is ok. It is 50m different. Presumably, ncdump is reporting on the coords of grid centers and gdalinfo is reporting on boundaries (1/2 a grid cell difference), so it is 50 m less. Fine. BUT, look at the x coord of the lower left grid cell. It is 486790, compared to 487200 in the netcdf file. In other words, the x coord of the tif file is like 410 m less than the netcdf file. I am very confused about the difference in the x coordinate vector between the .nc and the .tif files. </span></div></div><div class="" style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;"><span class="" style="font-variant-ligatures: no-common-ligatures;"><br class=""></span></div><div class="" style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;">Is there a different way that I should be using gdal_translate to avoid this 400 m ‘offset’? I can certainly override the limits with -a_ullr, and that works fine, and gives me the expected coordinate values and 100 m grid resolution, etc. However, that does not seem like the most elegant solution. </div><div class="" style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;"><span class="" style="font-variant-ligatures: no-common-ligatures;"><br class=""></span></div><div class="" style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;"><span class="" style="font-variant-ligatures: no-common-ligatures;">Dave.</span></div><div class="" style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;"><span class="" style="font-variant-ligatures: no-common-ligatures;"><br class=""></span></div><div class="" style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;"><span class="" style="font-variant-ligatures: no-common-ligatures;">files here: <a href="https://drive.google.com/drive/folders/1CclJGBj_L_Z-9hq_Xkse0ARKDdnNvKZJ?usp=sharing" class="">https://drive.google.com/drive/folders/1CclJGBj_L_Z-9hq_Xkse0ARKDdnNvKZJ?usp=sharing</a> </span></div><div class=""><br class=""><div class="">
<div class="">---------------------------------------------------<br class="">David F. Hill<br class="">Professor<br class="">Civil and Construction Engineering<br class="">Oregon State University<br class="">220 Owen Hall<br class="">Corvallis, OR 97331<br class="">541.737.4939<br class=""><a href="mailto:david.hill@oregonstate.edu" class="">david.hill@oregonstate.edu</a><br class=""><a href="http://www.engr.oregonstate.edu/~dfh" class="">http://www.engr.oregonstate.edu/~dfh</a><br class="">---------------------------------------------------</div><div class=""><br class=""></div><br class="Apple-interchange-newline">

</div>

<br class=""></div></div></div></body></html>