Images are stored as raster data wherein each cell in the image has a row and column number. Vector data, such as feature classes in geodatabases, shapefiles, and coverages, is stored in real-world coordinates. To display images with this vector data, it is necessary to establish an image-to-world transformation that converts the image coordinates to real-world coordinates. This transformation information is typically stored with the image.
Generally, image formats, such as ERDAS IMAGINE, BSQ, BIL, BIP, GeoTIFF, and grids, store the georeferencing information in the header of the image file. However, several image formats (including those listed) store this information in a separate ASCII world file. Where the georeferencing information is stored often depends on the capabilities of the software used to generate the files or the user's preference. World files can be created with any editor, or you can export a world file for a raster dataset using the Export Raster World File tool.
World file naming conventions
It's easy to identify the world file that should accompany an image file: world files use the same name as the image, with the letter w appended. For example, the world file for the image file mytown.tif would be mytown.tifw, and the world file for redlands.jpg would be redlands.jpgw. Sometimes the naming convention varies from this first description, using the first and third characters of the image file's suffix and a final letter w as the world file suffix. Therefore, for mytown.tif, the world file would be mytown.tfw, or for redlands.jpg, its world file would be redlands.jgw.
For images that lack an extension or have an extension that is shorter than three characters, the letter w is added to the end of the file name without altering it. Therefore, the world file for the image file terrain would be terrainw, and the world file for the image file floorpln.rs would be floorpln.rsw.
Examples of world file names
|Raster data file||World files|
image.tfw, or image.tifw
image.blw or image.bilw
image.jgw or image.jpgw
Starting at ArcGIS 9.2 SP2, if the transformation cannot be expressed as a world file, the Update Georeferencing command on the Georeferencing toolbar writes the transformation into the .aux.xml file and also writes an approximate affine transformation into a text file or a world file with an x on the end of the extension name. For example, a TIFF image with this approximate affine transformation has the extension .tfwx. Keep in mind that this is not an exact transformation; it is only an approximation.
There is a special case where this text file contains a true affine transformation. If using Update Georeferencing on a raster dataset that already contains map coordinates, a text file with the x extension is written. For example, if georeferencing is performed on a TIFF that already contains map coordinates, the Update Georeferencing command creates a .tfwx file that contains a true affine transformation.
This text file can be used as a world file if it is needed for ArcGIS 9.1 and third-party software. To use this text file, delete the x in the world file extension name. Since this text file is not part of the raster dataset in ArcGIS 9.2, it should not be used as a world file in versions where ArcGIS can read the .aux.xml file such as in ArcGIS 9.2 and beyond.
How georeferencing information is accessed
The image-to-world transformation is accessed each time an image is displayed, for example, when you pan or zoom. The transformation is calculated from one of the following sources, listed in order of priority:
- The header file (if the image type supports one)
- The world file (This will be used first if the Use world file to define the coordinates of the raster check box is checked on the Options dialog box.)
- The row/column information of the image (an identity transformation)
World file contents
The contents of the world file will look similar to this:
20.17541308822119 0.00000000000000 0.00000000000000 -20.17541308822119 424178.11472601280548 4313415.90726399607956
When this file is present, ArcGIS performs the image-to-world transformation. The image-to-world transformation is a six-parameter affine transformation in the form of
x1 = Ax + By + C y1 = Dx + Ey + F
x1 = calculated x-coordinate of the pixel on the map
y1 = calculated y-coordinate of the pixel on the map
x = column number of a pixel in the image
y = row number of a pixel in the image
A = x-scale; dimension of a pixel in map units in x direction
B, D = rotation terms
C, F = translation terms; x,y map coordinates of the center of the upper left pixel
E = negative of y-scale; dimension of a pixel in map units in y direction
The transformation parameters are stored in the world file in this order:
20.17541308822119 - A 0.00000000000000 - D 0.00000000000000 - B -20.17541308822119 - E 424178.11472601280548 - C 4313415.90726399607956 - F
Each of these coefficients can be defined as
A = mx · cos t
B = my · (k · cos t - sin t)
D = mx · sin t
E = -1 · my · (k · sin t + cos t)
C = translation in x direction
F = translation in y direction
mx = change of scale in x direction
my = change of scale in y direction
k = shear factor along the x-axis = tan (skew angle) (the skew angle is measured from the y-axis)
t = rotation angle, measured counter-clockwise from the x-axis
Set ArcGIS to read the world file first
ArcGIS will automatically read the georeferencing in the header information of some file formats, such as GeoTIFF, which will override any georeferencing information stored in a world file. You can change this by checking the Use world file to define the coordinates of the raster check box on the Options dialog box.
- Click Customize on the Main menu and click ArcMap Options (or ArcCatalog Options, depending on the application you are using).
- Click the Raster tab in the Options window.
- Within the Raster tab, click Raster Dataset and check the Use world file to define the coordinates of the raster check box.
- Click OK.