
158
|
Chapter 3, Mapping Your World
#33 Georeference an Arbitrary Tourist Map
HACK
The World File
The simplest way to make use of this transformation is to put it in a sepa-
rate file that accompanies the image. The format is just the list of six num-
bers, separated with line breaks. This is called a world file, often seen in the
company of TIFFs as a TIFF world file (.tfw). A world file can accompany
any image format with GIS raster data in it. A common convention is to take
the first and last letters of the file extension, followed by a “w,” for the
world file extension—so a JPEG would travel with a .jgw, or an ESRI BIL
raster with a .blw.
Once you have a world file describing an image, you can load it into your
favorite GIS program. QGIS is a good choice for quick-and-easy viewing of
GIS data. Also, the GDAL toolkit understands world files and can use them
to convert raster data between different formats and different coordinate
systems, as described in “Convert Geospatial Data Between Different For-
mats”
[Hack #68].
The Matrix Transformation
The six numbers (coefficients) in the world file are values from a 3x3 affine
transformation matrix. The matrix describes a linear transformation between
one 2-D coordinate space and another—say, from pixels to latitude and
Figure 3-39. Georeferencing an image with the JavaScript client