[GIS] Georeferencing using GDAL

gdalgeoreferencing

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?

Best Answer

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.