18

I have a .tiff image that I am trying to overlay in google earth. For that I require to georeference it first. The image projection is UTM with NAD83 as datum. I know the lat/long of the four corners of the image.

I am doing the following way:

  1. gdalinfo to get the four coordinates.
  2. gdal_translate to specify lat/long info
  3. gdal2tiles.py to tile the image.

The only thing is bugging me is that I never specified UTM and NAD83, then how come it can overlay my image? Does anybody know how to specify this projection information?

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
Akd
  • 399
  • 2
  • 5
  • 10

1 Answers1

26

follow this way:

  1. Find your spatial reference code from here

  2. Learn your tif file upper left coordinate and lower right coordinate.

  3. use this command for making it coordinated:

    • gdal_translate -of GTiff -a_ullr ullon ullat lrlon lrlat -a_srs EPSG:4269 input.tif output.tif
  4. use this command for mercator:(epsg:3857)

    • gdalwarp -of GTiff -t_srs EPSG:3857 input.tif output.tif
  5. then use gdal2tiles.py to tile.

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
urcm
  • 22,533
  • 4
  • 57
  • 109
  • 1
    Thank you for the answer. But I need to overlay my UTM Projection onto google earth which uses WGS84 as datum. So shouldn't I set the target reference system to ESPG:4326 ? – Akd Jun 12 '12 at 17:40
  • 1
    According documentation and test: -a_ullr ulx uly lrx lry or with lat/lon terms -a_ullr ullon ullat lrlon lrlat is the correct way to use the command. – zetah May 27 '14 at 22:55
  • 2
    I have edited the post for the correct order of x and y in -a_ullr. – Nikos Alexandris Mar 21 '15 at 20:17
  • 2
    I try to georeferencing a tiff also, but I wonder how can we know the upper left coordinate and lower right coordinate ? Could you help me @Aragon ? – Manimalis Aug 13 '15 at 13:21
  • 1
    @Akd Aragon's gdalwarp to EPSG:3857 is good for Google. See http://wiki.openstreetmap.org/wiki/EPSG:3857 for more. – Dave X Feb 28 '13 at 21:25