3

I dont have much knowledge with GIS. I need help with editing the coordinates of a GeoTiff file.

For eg, these are the corner coordinates of a file:

Upper Left ( 62.0000000, 47.0000000) ( 62d 0' 0.00"E, 47d 0' 0.00"N)

Lower Left ( 62.0000000, 39.7103806) ( 62d 0' 0.00"E, 39d42'37.37"N)

How do I change these to these? so as to reposition the file.

Upper Left ( 69.2896194, 47.0000000) ( 69d17'22.63"E, 47d 0' 0.00"N)

Lower Left ( 69.2896194, 39.7103806) ( 69d17'22.63"E, 39d42'37.37"N)

Any help will would be much appreciated. Thanks!

Lukas
  • 812
  • 1
  • 14
  • 43

1 Answers1

1

I've not tried this but it might be possible using gdalwarp and the -te bbox option. You'll need to look up the right hand edge (XMAX)

gdalwarp -te 69.2896194 XMAX 39.7103806 47.0000000 src.tif dest.tif
Ian Turton
  • 10,018
  • 1
  • 28
  • 47
  • i fit worked please accept the answer for the benefit of others coming later – Ian Turton Dec 22 '19 at 17:21
  • I found that the solution has a issue, data gets corrupted. gdal_translate seems to work nicely. – user8277017 Dec 23 '19 at 15:05
  • If you have Python, consider using `gdal_edit`: https://gdal.org/programs/gdal_edit.html That way you can *only* edit the metadata in-place, without touching the data. It will also be way faster compared to copying the data (with `gdalwarp`, or `gdal_translate`). – Rutger Kassies Dec 27 '19 at 08:33