A world file is a six line
plain text
In computing, plain text is a loose term for data (e.g. file contents) that represent only characters of readable material but not its graphical representation nor other objects ( floating-point numbers, images, etc.). It may also include a lim ...
sidecar file used by
geographic information system
A geographic information system (GIS) consists of integrated computer hardware and Geographic information system software, software that store, manage, Spatial analysis, analyze, edit, output, and Cartographic design, visualize Geographic data ...
s (GIS) to
georeference
Georeferencing or georegistration is a type of coordinate transformation that binds a digital raster image or vector database that represents a geographic space (usually a scanned map or aerial photograph) to a spatial reference system, thus loca ...
raster map images. The file specification was introduced by
Esri
Environmental Systems Research Institute, Inc., doing business as Esri (), is an American Multinational corporation, multinational geographic information system (GIS) software company headquartered in Redlands, California. It is best known for ...
.
Filename extension
The base
filename
A filename or file name is a name used to uniquely identify a computer file in a file system. Different file systems impose different restrictions on filename lengths.
A filename may (depending on the file system) include:
* name – base ...
of a world file matches the raster's base filename, but has a different
filename extension
A filename extension, file name extension or file extension is a suffix to the name of a computer file (for example, .txt, .mp3, .exe) that indicates a characteristic of the file contents or its intended use. A filename extension is typically d ...
(suffix). There are three
filename extension
A filename extension, file name extension or file extension is a suffix to the name of a computer file (for example, .txt, .mp3, .exe) that indicates a characteristic of the file contents or its intended use. A filename extension is typically d ...
naming conventions used for world files, with variable support across software.
One simple convention with widespread support is to append the letter "w" to the end of the raster filename. For example, a raster named should have a world file named .
An alternative file naming convention that uses a three-character extension to conform to the
8.3 file naming convention uses the first and last character of the raster file's extension, followed by "w" at the end. For example, here are a few naming conventions for popular raster formats:
A third convention is to use a file extension, irrespective of the type of raster file, as supported by
GDAL
The Geospatial Data Abstraction Library (GDAL) is a computer software library for reading and writing raster and vector geospatial data formats (e.g. shapefile), and is released under the permissive X/MIT style free software license by the ...
and
QGIS
QGIS is a geographic information system (GIS) software that is free and open-source. QGIS supports Windows, macOS, and Linux. It supports viewing, editing, printing, and analysis of geospatial data in a range of data formats. Its name comes from ...
, but not
Esri
Environmental Systems Research Institute, Inc., doing business as Esri (), is an American Multinational corporation, multinational geographic information system (GIS) software company headquartered in Redlands, California. It is best known for ...
.
Content

The generic meaning of the six parameters in a world file (as defined by Esri
) is:
*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'' parameters are not angular rotations, and that the ''A'' and ''E'' parameters do not correspond to the pixel size if ''D'' or ''B'' are not zero. 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 is:
*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), typically negative
*Line 5: ''C'': ''x''-coordinate of the center of the original image's upper left pixel transformed to the map
*Line 6: ''F'': ''y''-coordinate of the center of the original image's upper left pixel transformed to the map
All four parameters are expressed in the map units, which are described by the
spatial reference system
A spatial reference system (SRS) or coordinate reference system (CRS) is a framework used to precisely measure locations on the surface of Earth as coordinates. It is thus the application of the abstract mathematics of coordinate systems and anal ...
for the raster.
When ''D'' or ''B'' are non-zero the pixel width is given by:
:
and the pixel height by
:
World files describing a map on the
Universal Transverse Mercator coordinate system
The Universal Transverse Mercator (UTM) is a map projection system for assigning Geographic coordinate system, coordinates to locations on the surface of the Earth. Like the traditional method of latitude and longitude, it is a horizontal positi ...
(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
The metre (or meter in US spelling; symbol: m) is the base unit of length in the International System of Units (SI). Since 2019, the metre has been defined as the length of the path travelled by light in vacuum during a time interval of of ...
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
In Euclidean geometry, an affine transformation or affinity (from the Latin, '' affinis'', "connected with") is a geometric transformation that preserves lines and parallelism, but not necessarily Euclidean distances and angles.
More general ...
:
:
which can be written as this set of equations:
:
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:
:
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
A gazetteer is a geographical dictionary or wikt:directory, directory used in conjunction with a map or atlas.Aurousseau, 61. It typically contains information concerning the geographical makeup, social statistics and physical features of a co ...
and the UTM (grid) zone was found to be 18 using a Web-based converter.
Localization
When writing world files it is advisable to ignore
localization settings and always use dot as the
decimal separator
FIle:Decimal separators.svg, alt=Four types of separating decimals: a) 1,234.56. b) 1.234,56. c) 1'234,56. d) ١٬٢٣٤٫٥٦., Both a comma and a full stop (or period) are generally accepted decimal separators for international use. The apost ...
. Also, negative numbers should be specified with the "-" character exclusively. This ensures maximum portability of the images.
See also
*
Esri grid An Esri grid is a raster GIS file format developed by Esri, which has two formats:
#A proprietary '' binary'' format, also known as an ''ARC/INFO GRID'', ''ARC GRID'' and ''many'' other variations
#A non-proprietary ''ASCII'' format, also known as ...
– embeds a similar georeferencing context within a single raster file
*
GeoTIFF
GeoTIFF is a public domain metadata standard which allows georeferencing information to be embedded within a TIFF file. The potential additional information includes map projection, coordinate systems, ellipsoids, datums, and everything else nec ...
*
MapInfo TAB format - a popular geospatial vector data format for GIS software
Notes
References
{{reflist
External links
Online Worldfile CalculatorWorldfile Basics
GIS raster file formats
Cartography