World file

Last updated

A world file is a six line plain text sidecar file used by geographic information systems (GIS) to georeference raster map images. The file specification was introduced by Esri. [1] [lower-alpha 1]

Contents

Definition

Graphical view of world files parameters and computed values of the four first upper left pixels of an image. WorldFileParametersSchemas.gif
Graphical view of world files parameters and computed values of the four first upper left pixels of an image.

The generic meaning of the six parameters in a world file (as defined by Esri [1] ) is:

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:

All four parameters are expressed in the map units, which are described by the spatial reference system 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 (UTM) use these conventions:

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:

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 and the UTM (grid) zone was found to be 18 using a Web-based converter.

Filename extension

The base filename of a world file matches the raster's base filename, but has a different filename extension (suffix). There are three filename extension 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 mymap.jpg should have a world file named mymap.jpgw.

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:

Raster formatRaster file nameWorld file name
GIF mymap.gifmymap.gfw
JPEG mymap.jpgmymap.jgw
JPEG 2000 mymap.jp2mymap.j2w
PNG mymap.pngmymap.pgw
TIFF mymap.tifmymap.tfw

A third convention is to use a .wld file extension, irrespective of the type of raster file, as supported by GDAL and QGIS, but not Esri. [lower-alpha 1]

Localization

When writing world files it is advisable to ignore localization settings and always use "." as the decimal separator. Also, negative numbers should be specified with the "-" character exclusively. This ensures maximum portability of the images.

See also

Notes

  1. 1 2 Esri also has another world file format that applies to computer-aided design or CAD drawing files. That standard refers to the format of plain text computer files with names ending in .wld and is not discussed in this article.
  2. The E parameter is often a negative number. This is because most image files store data from top to bottom, while the software utilizes traditional Cartesian coordinates with the origin in the conventional lower-left corner. If your raster appears upside-down, you may need to add a minus sign. The parameter therefore describes the map distance between consecutive image lines.

Notes and references

  1. 1 2 "FAQ: What is the format of the world file used for georeferencing images?". Esri. 2016-05-05. Archived from the original on 2023-03-04. Retrieved 2017-09-29.

Related Research Articles

<span class="mw-page-title-main">Vector graphics</span> Computer graphics images defined by points, lines and curves

Vector graphics are a form of computer graphics in which visual images are created directly from geometric shapes defined on a Cartesian plane, such as points, lines, curves and polygons. The associated mechanisms may include vector display and printing hardware, vector data models and file formats, as well as the software based on these data models. Vector graphics are an alternative to raster or bitmap graphics, with each having advantages and disadvantages in specific situations.

<span class="mw-page-title-main">2D computer graphics</span> Computer-based generation of digital images

2D computer graphics is the computer-based generation of digital images—mostly from two-dimensional models and by techniques specific to them. It may refer to the branch of computer science that comprises such techniques or to the models themselves.

<span class="mw-page-title-main">Affine transformation</span> Geometric transformation that preserves lines but not angles nor the origin

In Euclidean geometry, an affine transformation or affinity is a geometric transformation that preserves lines and parallelism, but not necessarily Euclidean distances and angles.

Bresenham's line algorithm is a line drawing algorithm that determines the points of an n-dimensional raster that should be selected in order to form a close approximation to a straight line between two points. It is commonly used to draw line primitives in a bitmap image, as it uses only integer addition, subtraction, and bit shifting, all of which are very cheap operations in historically common computer architectures. It is an incremental error algorithm, and one of the earliest algorithms developed in the field of computer graphics. An extension to the original algorithm called the midpoint circle algorithm may be used for drawing circles.

In mathematics, a Gaussian function, often simply referred to as a Gaussian, is a function of the base form and with parametric extension for arbitrary real constants a, b and non-zero c. It is named after the mathematician Carl Friedrich Gauss. The graph of a Gaussian is a characteristic symmetric "bell curve" shape. The parameter a is the height of the curve's peak, b is the position of the center of the peak, and c controls the width of the "bell".

<span class="mw-page-title-main">3D projection</span> Design technique

A 3D projection is a design technique used to display a three-dimensional (3D) object on a two-dimensional (2D) surface. These projections rely on visual perspective and aspect analysis to project a complex object for viewing capability on a simpler plane.

Edge detection includes a variety of mathematical methods that aim at identifying edges, defined as curves in a digital image at which the image brightness changes sharply or, more formally, has discontinuities. The same problem of finding discontinuities in one-dimensional signals is known as step detection and the problem of finding signal discontinuities over time is known as change detection. Edge detection is a fundamental tool in image processing, machine vision and computer vision, particularly in the areas of feature detection and feature extraction.

In geodesy, conversion among different geographic coordinate systems is made necessary by the different geographic coordinate systems in use across the world and over time. Coordinate conversion is composed of a number of different types of conversion: format change of geographic coordinates, conversion of coordinate systems, or transformation to different geodetic datums. Geographic coordinate conversion has applications in cartography, surveying, navigation and geographic information systems.

A GIS file format is a standard for encoding geographical information into a computer file, as a specialized type of file format for use in geographic information systems (GIS) and other geospatial applications. Since the 1970s, dozens of formats have been created based on various data models for various purposes. They have been created by government mapping agencies, GIS software vendors, standards bodies such as the Open Geospatial Consortium, informal user communities, and even individual developers.

<span class="mw-page-title-main">YCbCr</span> Family of digital colour spaces

YCbCr, Y′CbCr, or Y Pb/Cb Pr/Cr, also written as YCBCR or Y′CBCR, is a family of color spaces used as a part of the color image pipeline in video and digital photography systems. Y′ is the luma component and CB and CR are the blue-difference and red-difference chroma components. Y′ is distinguished from Y, which is luminance, meaning that light intensity is nonlinearly encoded based on gamma corrected RGB primaries.

<span class="mw-page-title-main">Mode 7</span> Graphics mode on the Super NES video game console

Mode 7 is a graphics mode on the Super Nintendo Entertainment System video game console that allows a background layer to be rotated and scaled on a scanline-by-scanline basis to create many different depth effects. It also supports wrapping effects such as translation and reflection.

<span class="mw-page-title-main">Universal Transverse Mercator coordinate system</span> Map projection system

The Universal Transverse Mercator (UTM) is a map projection system for assigning coordinates to locations on the surface of the Earth. Like the traditional method of latitude and longitude, it is a horizontal position representation, which means it ignores altitude and treats the earth surface as a perfect ellipsoid. However, it differs from global latitude/longitude in that it divides earth into 60 zones and projects each to the plane as a basis for its coordinates. Specifying a location means specifying the zone and the x, y coordinate in that plane. The projection from spheroid to a UTM zone is some parameterization of the transverse Mercator projection. The parameters vary by nation or region or mapping system.

<span class="mw-page-title-main">Tissot's indicatrix</span> Characterization of distortion in map projections

In cartography, a Tissot's indicatrix is a mathematical contrivance presented by French mathematician Nicolas Auguste Tissot in 1859 and 1871 in order to characterize local distortions due to map projection. It is the geometry that results from projecting a circle of infinitesimal radius from a curved geometric model, such as a globe, onto a map. Tissot proved that the resulting diagram is an ellipse whose axes indicate the two principal directions along which scale is maximal and minimal at that point on the map.

<span class="mw-page-title-main">Corner detection</span> Approach used in computer vision systems

Corner detection is an approach used within computer vision systems to extract certain kinds of features and infer the contents of an image. Corner detection is frequently used in motion detection, image registration, video tracking, image mosaicing, panorama stitching, 3D reconstruction and object recognition. Corner detection overlaps with the topic of interest point detection.

Georeferencing or georegistration is a type of coordinate transformation that binds a digital raster image or vector database that represents a geographic space to a spatial reference system, thus locating the digital data in the real world. It is thus the geographic form of image registration. The term can refer to the mathematical formulas used to perform the transformation, the metadata stored alongside or within the image file to specify the transformation, or the process of manually or automatically aligning the image to the real world to create such metadata. The most common result is that the image can be visually and analytically integrated with other geographic data in geographic information systems and remote sensing software.

Camera resectioning is the process of estimating the parameters of a pinhole camera model approximating the camera that produced a given photograph or video; it determines which incoming light ray is associated with each pixel on the resulting image. Basically, the process determines the pose of the pinhole camera.

<span class="mw-page-title-main">Image rectification</span> Trasnformation process to project images

Image rectification is a transformation process used to project images onto a common image plane. This process has several degrees of freedom and there are many strategies for transforming images to the common plane. Image rectification is used in computer stereo vision to simplify the problem of finding matching points between images, and in geographic information systems (GIS) to merge images taken from multiple perspectives into a common map coordinate system.

TopoFlight is a three-dimensional flight planning software for photogrammetric flights.

Rossmo's formula is a geographic profiling formula to predict where a serial criminal lives. It relies upon the tendency of criminals to not commit crimes near places where they might be recognized, but also to not travel excessively long distances. The formula was developed and patented in 1996 by criminologist Kim Rossmo and integrated into a specialized crime analysis software product called Rigel. The Rigel product is developed by the software company Environmental Criminology Research Inc. (ECRI), which Rossmo co-founded.

<span class="mw-page-title-main">Barnsley fern</span> Fractal which resembles a plant

The Barnsley fern is a fractal named after the British mathematician Michael Barnsley who first described it in his book Fractals Everywhere. He made it to resemble the black spleenwort, Asplenium adiantum-nigrum.