GeoTIFF – Creating a GeoTIFF File from a .Tiff File

exportgeotiff-tiffgoogle earth

I'm working on some software that displays a map, like this:

![enter image description here][1]

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

This is .TIFF export:

![enter image description here][2]

Now I also have to export it as GeoTiff. The software I am working on is in Delphi 7.

information

I have come across this steps to creating a geotiff, but since I am new to GeoTIFF, I am stuck after the first point.

question

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 can't figure out how to create the meta data for the tiff to create the GeoTIFF

Best Answer

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