Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

im not sure if this question is suitable for GIS

I'm working on a software that displays a map, like this ![enter image description here][1]

i also have some export functions which exports the the about image as .bmp/.Tiff/.Jpg/.PNG/.Wmf/.SVG

This is .TIFF export ![enter image description here][2]

Now i have to export it as GeoTiff also

The software i am working on is in Delphi 7.


i have come across this steps to creating a geotiff

but since i am new to GeoTIFF , i am stuck after the 1st point.


so please tell me is it possible to convert the .TIFF file to .geotiff?

what i have tried

remotesensing geotiff

how to write geotiff files in delphi possibly-compressed

but i cant figure out how to create the meta data for the tiff to create the geoTiff

share|improve this question
from your mapdisplay, is it possible to obtain the below information? values of the four corners and center 2.Pixel size(in x and y directions) in mapdisplay – vinayan Apr 5 '12 at 8:01
@vinayan : values of the four corners and center this is possible... 2.Pixel size(in x and y directions) in mapdisplay i didnt get you... pixel size as in? – TheGeo Apr 5 '12 at 9:05
2.Pixel size(in x and y directions) in mapdisplay you mean pixel size of the each point on the map? – TheGeo Apr 5 '12 at 9:09
would you consider marking any of the below as answers if your problem is solved? – vinayan Apr 24 '12 at 11:40
up vote 6 down vote accepted

There is a little bit of information which might help you in your task. First you may need to download FWTools inorder to use geotifcp and listgeo.

Create a TIFF File(You already did it..) Let us call it initialtif.tif

find the image width and height(from where you saved it). Image Width and Height

imageWidth = 1016
imageHeight = 551

Create a World File for our initialtif.tif using the below parameters.

From Wiki, the World File is defined as below. Refer below image for details. mapWidth and mapHeight are to be measured from your map application.

Line 1: A: pixel size in the x-direction in map units/pixel = mapWidth/imageWidth
Line 2: D: rotation about y-axis = 0
Line 3: B: rotation about x-axis = 0
Line 4: E: pixel size in the y-direction in map units, almost always negative[3] = -mapHeight/imageHeight
Line 5: C: x-coordinate of the center of the upper left pixel = C
Line 6: F: y-coordinate of the center of the upper left pixel = F

Enter these 6 numbers on a text file and save as initialtif.tfw

World File Details

Get a GeoTiff(say reference.tif) in the same Coordinate System/projection. Get one from your friends or create it yourself using Qgis/Arcgis..

extract metadata from GeoTiff using listgeo command(In Windows..)

listgeo -proj4 reference.tif >metadata.txt

Create GeoTiff using geotifcp command

geotifcp -g metadata.txt -e forWorld.TFwx forWorld.TIF finaltiff.tif
share|improve this answer
+1, awesomely simple explanation. but still i can get Line 1: A: pixel size in the x-direction in map units/pixel = mapWidth/imageWidth how to get it? – TheGeo Apr 5 '12 at 12:27
is it ? 13141548/551 in case of your example – TheGeo Apr 5 '12 at 12:30
@PresleyDias - It will be (13141548/1016)..width divided by width.. – vinayan Apr 5 '12 at 14:37

The world file is VERY simple and this is most of the meta data you need to convert your .tif to a geotif. While we're on the subject, in most GIS applications, if you have a world-file, you don't need to convert to geotiff or JP2000 or any other format where the geotocation information is embedded. The GIS will look for and read the world file.

A world file has a similar extension as the image format except the last letter is a 'w'. So the world file for a tiff is '.tfw', for a '.bmp' it is '.bpw', for a '.jpg' it is '.jpw' and so on.

A good description of the world-file can be found here. From that and the image dimensions, you should be able to write your own world file by hand. For example, below is a world file for a random tiff off my hard-drive. In my case the units are meters. The bits in brackes are my annotations:

2.50  (pixel size in the x-direction in map units)
0.00  (rotation about y-axis)
0.00  (rotation about y-axis)
-2.50  (pixel size in the y-direction in map units)
450001.250  (x-coordinate of the center of the upper left pixel)
1209998.750  (y-coordinate of the center of the upper left pixel)

That's it!

Alternatively you could make a geotiff in one step using GDAL (see gdalwarp). You effectively are pluging in all this information into the command-line parameters plus you can set the out-going projection too. This would be my preference to the four-step process described in the link. You will note from the documentation that 'geotiff' is the default output format, so you don't even have to specify it!

share|improve this answer
+1,ok, nice explanation, but how to get the 2.50 (pixel size in the x-direction in map units) pixel size? – TheGeo Apr 5 '12 at 12:16
Divide the width of the image in realworld units by the number of pixels to get meters per pixel for each direction. You should know the width in real-world units from when you create the image and get the image dimensions in pixels from the image file's properties. – MappaGnosis Apr 5 '12 at 12:30
The problem with world files is that they don't contain full spatial reference information - datums, projections etc. So they are not trully equivalent to full GeoTIFF metadata. – Igor Brejc Apr 8 '12 at 12:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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