TfL's dock-maintenance crews work from a tablet app that has to keep working in a depot with no signal. The app pre-seeds a raster basemap for Greater London. The vendor quotes storage by the tile at 40 KB average, and the product owner wants to know, before signing, how many tiles that is and how many megabytes — across zoom levels 10 to 15, and at zoom 15 on its own, which is the level the crews actually use.
Compute the bounding box of the 33 boroughs in WGS 84, then count the Web Mercator (XYZ, 256 px) tiles that cover it at each zoom from 10 to 15 inclusive.
Report:
tiles_z15 — tiles at zoom 15tiles_total — tiles across zooms 10–15storage_mb — tiles_total × 40 KB, in MB (1 MB = 1024 KB), to 1 decimalTile indices follow the standard formulas:
x = floor((lon + 180) / 360 · 2^z)
y = floor((1 − ln(tan φ + sec φ) / π) / 2 · 2^z)A tile is counted if any part of it falls inside the box — count from the tile containing the box's north-west corner to the tile containing its south-east corner, inclusive on both axes.
These are where the teaching is. Read them twice.
Every offline field app, from utility inspection to disaster response, is sized this way before the tiles are seeded — and undersizing it is discovered in the field.
Work the problem in whatever tool you like, then enter the answers here.
tiles_z15tiles_totalstorage_mb3 scored, 0 informational
Tiles at zoom 15
38%Tiles across zooms 10–15
38%Storage at 40 KB per tile
25%