FA-70274 / Map projection transforms / Member archive
Affine geotransform inverse to pixel indices: far edge bounds · case 04
Points just beyond the right or bottom edge return a pixel index equal to the raster size.
Case contract
Input [gx, gy, gt, width, height] with a six-term affine gt: X = gt0 + col*gt1 + row*gt2, Y = gt3 + col*gt4 + row*gt5, where (gt0, gt3) is the outer corner of pixel (0, 0). Invert with the 2x2 determinant, take floor of the fractional column and row, and return [col, row] if inside [0, width) x [0, height), otherwise None (also None for a singular transform).
Why this case matters
Point sampling of rasters and click-to-pixel lookups rely on this inverse; half-pixel or sign mistakes read the neighbouring cell.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| boundary #25 | [100, 1] | null | 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 ↗