World File - Definition

Definition

World files do not specify a coordinate system; this information is generally stored somewhere else in the raster file itself or in another companion file. The generic meaning of world file parameters are:

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

This description is however misleading in that the D and B rotation parameters are not really rotations (in degrees or gradients) and in that as soon as D or B are not zero, the A and E parameters do not correspond to the pixel size any more. The A, D, B and E parameters are sometimes named "x-scale", "y-skew", "x-skew" and "y-scale". A better description of the A, D, B and E parameters would be:

  • Line 1: A: x component of the pixel width (x-scale)
  • Line 2: D: y component of the pixel width (y-skew)
  • Line 3: B: x component of the pixel height (x-skew)
  • Line 4: E: y component of the pixel height (y-scale), almost always negative

All four parameters are expressed in the map units depending on the coordinate system associated with the raster.

When D or B are different from zero the pixel width is given by:

and the pixel height by

World files describing a map on the Universal Transverse Mercator coordinate system (UTM) use these conventions:

  • D and B are usually 0, since the image pixels are usually made to align with the UTM grid
  • C is the UTM easting
  • F is the UTM northing
  • Units are always meters per pixel

The above description applies also to a rectangular, non-rotated image which might be, for example, overlaid on an orthogonally projected map. If the world file describes an image that is rotated from the axis of the target projection, however, then A, D, B and E must be derived from the required affine transformation (see below). Specifically, A and E will no longer be the meter/pixel measurement on their respective axes.

These values are used in a six-parameter affine transformation:


\begin{bmatrix} x\prime \\
y\prime \end{bmatrix}
= \begin{bmatrix} A & B & C\\
D & E & F\end{bmatrix}
\begin{bmatrix} x \\
y \\
1 \end{bmatrix}

which can be written as this set of equations:

\begin{align}
x' &= A\,x + B\,y + C \\
y' &= D\,x + E\,y + F
\end{align}

where:

x' is the calculated UTM easting of the pixel on the map
y' is the calculated UTM northing of the pixel on the map
x is the column number of the pixel in the image counting from left
y is the row number of the pixel in the image counting from top
A or x-scale; dimension of a pixel in map units in x-direction
B, D are rotation terms
C, F are translation terms: x, y map coordinates of the center of the upper-left pixel
E is negative of y-scale: dimension of a pixel in map units in y-direction

The y-scale (E) is negative because the origins of an image and the UTM coordinate system are different. The origin of an image is located in the upper-left corner, whereas the origin of the map coordinate system is located in the lower-left corner. Row values in the image increase from the origin downward, while y-coordinate values in the map increase from the origin upward. Many mapping programs are unable to handle "upside down" images (i.e. those with a positive y-scale).

To go from UTM(x'y') to pixel position(x,y) one can use the equation:

\begin{align}
x=(Ex'-By'+BF-EC)/(AE-DB)\\
y=(-Dx'+Ay'+DC-AF)/(AE-DB)
\end{align}


Example: Original falknermap.jpg is 800×600 pixels (map not shown). Its world file is falknermap.jgw and contains:

32.0 0.0 0.0 -32.0 691200.0 4576000.0

The position of Falkner Island light on the map image is:

x = 171 pixels from left y = 343 pixels from top

This gives:

x1 = 696672 meters Easting y1 = 4565024 meters Northing

The UTM (grid) zone is not given so the coordinates are ambiguous — they can represent a position in any of the approximately 120 UTM grid zones. In this case, approximate latitude and longitude (41.2, −072.7) were looked up in a gazetteer and the UTM (grid) zone was found to be 18 using a Web-based converter.

Read more about this topic:  World File

Famous quotes containing the word definition:

    Beauty, like all other qualities presented to human experience, is relative; and the definition of it becomes unmeaning and useless in proportion to its abstractness. To define beauty not in the most abstract, but in the most concrete terms possible, not to find a universal formula for it, but the formula which expresses most adequately this or that special manifestation of it, is the aim of the true student of aesthetics.
    Walter Pater (1839–1894)

    The definition of good prose is proper words in their proper places; of good verse, the most proper words in their proper places. The propriety is in either case relative. The words in prose ought to express the intended meaning, and no more; if they attract attention to themselves, it is, in general, a fault.
    Samuel Taylor Coleridge (1772–1834)

    It’s a rare parent who can see his or her child clearly and objectively. At a school board meeting I attended . . . the only definition of a gifted child on which everyone in the audience could agree was “mine.”
    Jane Adams (20th century)