1

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?

2
  • Do you have the coordinates of the 4 corners of the image? Also, easting and northing are referred to projected coordinates (epsg 4326 is a geographical CRS)
    – Vale
    Commented Jan 8, 2019 at 16:59
  • I do not have the 4 corners but i have also the size, so i can compute it.
    – Greg
    Commented Jan 9, 2019 at 8:56

1 Answer 1

1

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

2
  • > 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. How can i determine the EPSG:32642 code ? How do you choose "326" before "42" of "EPSG:32642" ?
    – Greg
    Commented Jan 9, 2019 at 8:32
  • I have found this site: spatialreference.org/ref/epsg/?page=16&search=UTM i will copy the 120 codes in a text file and use it to get a code from UTM
    – Greg
    Commented Jan 9, 2019 at 9:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.