Raster World File (World File)

Print Top page

A raster image is stored as a two-dimensional array of elements (pixels), where each element has a row and column number. To use a raster image in the program, the pixel coordinates (row and column) must be transformed into real-world coordinates on the ground. Transformation parameters are usually stored with the image. Some image formats, such as GeoTIFF, store georeferencing information in the file header.

 

However, other image formats (BMP, PCX, TIFF, JPEG, and others) store this information in a separate ASCII file. This file is called a world file. The world file must accompany the image file. A world file can be created using any text editor. It has the same name as the image file, with the character "w" appended to the file extension.

 

For example, the world file for a graphic file named RASTER.tiff would be named RASTER.tiffw.

 

When using 8.3 format filenames, the world file extension is formed differently: the character "w" is added after the first and third characters of the original extension.

 

For example: For an image file named RASTER.bmp, the world file would be named RASTER.bpW.

 

World File Contents

 

A world file contains six lines:

The calculated size of a pixel in the X-direction in map units (meters).

Rotation term for the row (typically 0.0).

Rotation term for the column (typically 0.0).

The calculated size of a pixel in the Y-direction in map units (meters), usually negative.

The X-coordinate of the center of the upper-left pixel in map units (meters).

The Y-coordinate of the center of the upper-left pixel in map units (meters).

 

Calculating Pixel Size

 

The pixel size value is calculated using the formula:

MeterInElement = Scale / Resolution, where:

 

Scale is the raster scale.

Resolution is the scanning resolution (dots per meter).

 

Example of a World File (acapulco.tfw) with coordinates and pixel size in meters:

 

text

1.000000

0.000000

0.000000

-1.000000

402780.914321

1863489.150628

 

Recently, world files with coordinates in degrees have become increasingly popular. Since the world file format does not support projection parameters, when loading a raster into a standalone window, the coordinate transformation from degrees to meters is performed using the parameters of a nautical chart (WGS 84 ellipsoid, direct cylindrical conformal Mercator projection, a conventional rectangular coordinate system for overview maps).

 

When loading a raster image into an open document, the coordinate transformation is performed using the parameters of the document's main map.

 

Therefore, knowing the ellipsoid used for the degree coordinates in the world file is crucial for choosing the correct loading scheme to ensure proper raster positioning.

 

Procedure for Loading a Raster Image Using a World File with Degree Coordinates:

1. Create a map or custom map with the required projection parameters (Menu: File > Create > Map or File > Create > Custom Map).

2. Open the created map in a standalone window.

3. Add the raster image to the document using the world file (Menu: File > Add > Raster > .BMP|.TIFF|.JPEG|.PCX).

 

Example of a World File (Saratov.tfw) with coordinates and pixel size in degrees:

 

0.000231146726507495

0.0

0.0

-0.000144010286406934

45.9177874899999949

51.6288470610511894