Geotiff and Tiff World File Basics...


Unrotated mapsheets

Tiff World File (.tfw)

Pretty basic, 6 rows:
First row is x-pixel resolution
Second and third rows are so-called "rotational components" but are set to zero in the case of an unrotated mapsheet.
The fourth row is the y-pixel resolution. The negative sign indicates that the image y-axis is positive down which is the opposite from real world coordinates.
The 5th and 6th rows are the Easting and Northing of the upper left pixel (0,0 in image coordinates).

10000
0
0
-10000
-3683154.58
4212096.53

Geotiff File

A geotiff wraps all of this information (and potentially more) into the image file itself, thus we don't have to worry about carting around a secondary meta file with our imagery since the information is embedded in the imagery file itself. The same information is represented in a geotiff meta file:

Geotiff_Information:
   Version: 1
   Key_Revision: 1.0
   Tagged_Information:
      ModelTiepointTag (2,3):
         0.5              0.5              0                
         -3683154.58      4212096.53       0                
      ModelPixelScaleTag (1,3):
         10000            10000            0                
      End_Of_Tags.
   Keyed_Information:
      End_Of_Keys.
   End_Of_Geotiff.
There are two ways to convert a tiff to geotiff, both use the program geotifcp:

1) We have a .tfw file and wish to load this information into the imagery file.

      geotifcp -e test.tfw test.tif test_geotiff.tif

2) We have a geotiff metafile and wish to load this information into the imagery file.

      geotifcp -g test.meta test.tif test_geotiff.tif

Rotated mapsheets

Tiff World File

Example: We have a 10 metre resolution mapsheet that has been rotated -32.5 degrees, the upper left pixel has coordinates (808622.306, 2604203.284). The .tfw file is slightly more complicated in that the pixel resolution changes due to the rotation. The first four columns are computed as such while the fifth and sixth column remain the same:

pixel resolution * cos(rotation angle)
-pixel resolution * sin(rotation angle)
-pixel resolution * sin(rotation angle)
-pixel resolution * cos(rotation angle)

Note that the above equations reduce to the usual .tfw format when the rotation angle is zero (cos(0) = 1, sin(0) = 0). Also note that the 4th column still has the extra negative sign.

So, for our 10 meter resolution image, we get the following .tfw file.
8.4339
-5.37299
-5.37299
-8.4339
808622.306
2604203.284

Again, this same information can be represented in the geotiff meta format, though in slightly different manner than the unrotated case:

Geotiff_Information:
   Version: 1
   Key_Revision: 1.0
   Tagged_Information:
	ModelTransformationTag (4,4):
         8.4339     -5.37299    0                808622.306        
         -5.37299   -8.4339     0                2604203.284       
         0                0                0                0                
         0                0                0                1 
   End_Of_Tags.
End_Of_Geotiff.

The geotiff meta data can be loaded into the geotiff using the geotifcp command:

      geotifcp -g area0.meta area0.tif area0_geotiff.tif

IMPORTANT: you cannot load a .tfw file for a rotated mapsheet using the geotifcp command.