World file coordinates: pixel center or image corner?

A raster can land half a pixel away from its intended position even when you copy every number correctly. The source and destination may attach those numbers to different points: the center of the upper-left pixel, or the outer corner of that pixel.

For a conventional world file, treat its last two coefficients as the upper-left pixel’s center. If your destination expects a corner-based geotransform, convert the origin as well as the coefficient order. Do not shift the image by eye until it looks convincing.

A dot at the center of an upper-left grid cell connected to a marker at the grid's outer corner
Generated conceptual center-versus-corner illustration; this grid is not the measured exercise raster.

Read the six lines in their stored order

A world file accompanies a raster with six affine-transform coefficients. Esri documents their order as A, D, B, E, C, F. Using zero-based column and row indices for pixel centers:

X = A × column + B × row + C
Y = D × column + E × row + F

Here C and F locate the center at column 0, row 0. The GDAL world-file reference uses the same center convention. Keep the coefficients tied to the actual image dimensions; a crop or resize can invalidate their relationship to the pixels.

Work through a tiny fictional image

Assume a synthetic image three columns wide and two rows high. It has no real location. Coordinates below are in an unspecified planar grid and use map units, not asserted metres or degrees. Its world file is:

2
0
0
-2
500001
4499999

Thus A = 2, D = 0, B = 0, E = −2, C = 500001 and F = 4499999. Each step to the right increases X by two. Each step down decreases Y by two. There is no rotation in this example.

Point being locatedColumn, row in center-based coordinatesX, Y in map units
Upper-left pixel center0, 0500001, 4499999
Last pixel center2, 1500005, 4499997
Outer upper-left corner−0.5, −0.5500000, 4500000
Outer lower-right corner2.5, 1.5500006, 4499996

The outer extent is six units wide and four high. The span between the first and last pixel centers is only four units by two. Both calculations are correct; they measure different things. Calling the center-to-center span the full image width would omit half a cell at each end.

Notice the vertical sign in the upper-left conversion: moving half a row upward raises Y by one, from 4499999 to 4500000. Subtracting one from both coordinates would get this particular corner wrong.

Convert to GDAL’s corner convention

The GDAL geotransform tutorial places pixel/line position (0, 0) at the outer upper-left corner. The center of the first pixel is then (0.5, 0.5). For the general world-file coefficients above, construct the GDAL array in this order:

GT(0) = C − 0.5 × A − 0.5 × B
GT(1) = A
GT(2) = B
GT(3) = F − 0.5 × D − 0.5 × E
GT(4) = D
GT(5) = E

Our exercise gives [500000, 2, 0, 4500000, 0, -2]. Apply GDAL’s transform at (0.5, 0.5): it returns (500001, 4499999), agreeing with the original center. That round trip is more useful than comparing two numbers without naming the point each describes.

Do not paste the six world-file lines straight into a GDAL array. The order differs and the origin differs. If B or D is nonzero, include both terms in the corner conversion. For bounds of a rotated raster, transform all four outer corners; the image’s upper-left corner is not necessarily the minimum X or maximum Y of its footprint.

Correct arithmetic still needs a coordinate reference

These six numbers contain no CRS identifier. They do not tell us which datum, projection or unit definition belongs to the example. Large coordinate values alone do not identify a UTM zone. Obtain that information from the supplied metadata or producer before placing a real image on a geographic basemap. The coordinate-format guide explains why a plausible pin cannot replace a known reference system.

Also record which georeferencing source the viewer actually used. Embedded raster metadata and a sidecar can disagree. Esri’s documentation describes precedence settings; the mere presence of a world file does not establish that a viewer applied it.

A useful handover contains the original raster and sidecar, dimensions, six raw coefficients, center/corner convention, derived transform, CRS evidence and software reading mode. For this exercise, the outer upper-left corner is (500000, 4500000) in the unspecified grid. That is a checked coordinate conversion, not a verified real-world location or a claim of survey accuracy.

Author: OSINT Jet · Primary sources reviewed 22 November 2026