FAILURE MAP
← Case archive

FA-70293 / Map projection transforms / Member archive

World file to corner geotransform and pixel centre: corner x half-pixel shift · case 03

Imported rasters sit one pixel east of their true position.

Member previewVariant 3 · 3 implementations · 8 checks per implementation

Case contract

Input [lines, col, row] where lines are the six world-file values in file order A, D, B, E, C, F: A and E are the pixel sizes, D and B the rotation terms, and (C, F) the map coordinate of the centre of the upper-left pixel. Return the corner-based geotransform [C - A/2 - B/2, A, B, F - D/2 - E/2, D, E] followed by the centre of pixel (col, row): C + A*col + B*row and F + D*col + E*row; all rounded to 6 decimals.

Why this case matters

GIS tools interchange world files and corner-origin geotransforms; the half-pixel convention and line order are classic sources of half-pixel and rotated-raster shifts.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
control #2[1002.5, 2.0, 0.5, 4999.6, 0.4, -2.0, 1081.25, 4947.6][1000.0, 2.0, 0.5, 4999.6, 0.4, -2.0, 1081.25, 4947.6]Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗