[GIS] How to create GeoTIFF from image and UTM Coordinates

gdalgeotiff-tiff

I am a beginner in GeoTIFF and georeferencing.

I have an image in .emf file format.
I also have this UTM information: Easting,Northing,Zone,Hemisphere

Example: 400000,4379520,24,N

(I have also the size of the terrain in meters)

How can I use GDAL to create a GeoTIFF from this information?

(My GeoTIFF needs to be in WGS84, EPSG:4326)
(I need to use command line tools, no GUI)

I think I need to convert .emf to a file format which can be supported by GDAL such as .bmp or "standard" .tif. But After ?
Maybe with gdal_translate and/or gdalwarp, but how?

Best Answer

I think I need to convert .emf to a file format which can be supported by GDAL such as .bmp or "standard" .tif

Yes, you will need to convert it.
Suppose that the generated file is called image.tif.

Once you have converted it, you should see its properties to know its size in pixels. Suppose, for example, that the image measures 858 pixels wide, by 579 pixels high.

Suppose also that the terrain measures 17160m to the East, and 17370m to the North.

That is to say, that the image resulted from a spatial resolution of 20m in the x, and 30m in the y.


In your favorite text editor, you should create a blank file and write the following six lines:

20.0
0.0
0.0
-30.0
400000.0
4379520.0  

Where:
20.0 is the x pixel size in meters.
both 0.0 are rotations about x and y axis.
-30.0 is the y pixel size in meters. Its negative because the world file uses the upper left corner as origin.
400000.0 is Easting.
4379520.0 is Northing.

Save it as image.wld, at the same folder of the image.


As you know that the UTM information is from Zone 42, Northern hemisphere, you will create a GeotTIFF file by assigning it the CRS EPSG:32642.

gdal_translate -of GTiff -a_srs EPSG:32642 image.tif image-32642.tif

gdal_translate will read the image reference of the image.wld file automatically.


gdalwarp -t_srs EPSG:4326 image-32642.tif image-4326.tif

Related Question