FA-70302 / Map projection transforms / Member archive
World file to corner geotransform and pixel centre: pixel centre origin · case 02
Pixel-centre eastings are half a pixel west of where the world file puts them.
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 fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| control #1 | [-180.0, 0.25, 0.0, 90.0, 0.0, -0.25, -167.5, 81.125] | [-180.0, 0.25, 0.0, 90.0, 0.0, -0.25, -167.375, 81.125] | 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 ↗