FA-69900 / Map projection transforms / Member archive
Slippy map tile index from coordinates: row axis orientation · case 05
Northern cities are fetched from southern tile rows.
Case contract
Input [lon, lat, z] with lon in [-180, 180], any latitude, z >= 0. With n = 2**z tiles per axis, column = floor((lon+180)/360*n) and row = floor((1 - asinh(tan(lat))/pi)/2*n) (row 0 at the north edge); both are clamped to [0, n-1] so lon=180 falls in the last column and latitudes beyond the mercator limit fall in the edge rows. Return [z, column, row].
Why this case matters
Tile servers and caches key storage by these indices; an off-by-one or flipped axis fetches the wrong image.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| control #5 | [12, 1206, 2555] | [12, 1206, 1540] | 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 ↗