Figure

Metres per pixel, published and on the ground, zoom 0 to 18

Drawn here at the parameters it defaults to, with every essay that calls it.
Metres per pixel, published and on the ground, zoom 0 to 18. The scheme's own resolution, and what a pixel is worth on the ground at four latitudes. Every level is exactly half the one above, so the published line is straight on a logarithmic axis and any two levels differ by a power of two. The ground curves are the same line lowered by log cos φ: at 75° a pixel covers 3.9 times less ground than the table says, so a reader there is looking at a map 3.9 times larger in scale than the one asked for.

The scheme's own resolution, and what a pixel is worth on the ground at four latitudes. Every level is exactly half the one above, so the published line is straight on a logarithmic axis and any two levels differ by a power of two. The ground curves are the same line lowered by log cos φ: at 75° a pixel covers 3.9 times less ground than the table says, so a reader there is looking at a map 3.9 times larger in scale than the one asked for.

It is drawn by screen-figure with show: "resolution-ladder" — one member of a family of 12 figures that share a generator, so the drawing above is what that generator returns when it is asked for this one and given nothing else.

8 essays call it. Every call below passes it something, because a placement that passes nothing draws whichever member of the family the generator happens to default to rather than the one its essay argues about.

Where it is called

Changing this changes every one of these figures.

The tile pyramid, four levels down to quadkey 120. The world as a square, quartered three times. Each level's tile is exactly half the width of its parent, so a tile is four tiles at the next level and never needs resampling to serve one — the property the whole scheme rests on, and one that holds only because the projected world is square. Level 3 has 64 tiles at 19567.9 metres per pixel, which at 51.5° north is 12181.3 metres of ground per pixel rather than the number the scheme publishes. What a machine does with it

A screen map is a pyramid of tiles

The scheme every slippy map runs on is a coordinate system with three integers and one projection, and almost all of it is forced. A square world is what makes the quadtree work, the levels are exact powers of two, and the published resolution — 156,543 metres per pixel at zoom zero — is a distance on the ground at exactly one latitude.

What "1:136,495" means at each latitude, at zoom 12. A screen map at zoom 12 prints one scale for the whole world. The curve is how much larger in scale the map really is, measured from the projection's own derivatives rather than from a formula: at 60° it is 1.98 times, so the map labelled 1:136,495 is a 1:68,765 map. The hollow marks are sec φ, the textbook answer. They do not sit on the curve — the worst gap is 9949 parts per million at 85° — because Web Mercator puts a geodetic latitude into a spherical formula, and the same spherical Mercator measured the same way reproduces sec φ exactly. What a machine does with it

The scale of a screen map is not one number

A zoom level prints one scale for the whole world, and the map is at that scale along exactly one line. At 60° north the picture labelled 1:136,495 is a 1:68,765 map — and the factor is not quite sec φ either, because the projection puts a geodetic latitude into a spherical formula.

One pixel at zoom 11: 76.4 m projected, 47.6 m at 51.5°. The grid squares are pixels, at their own size. The open mark is the stored coordinate and the filled one is where it is drawn: rounding moves it 20.2 metres, against a worst case of 33.6 — half a pixel's diagonal, which is the whole of the bound. The second point sits 43 metres away, 0.58 of a pixel east and 0.70 north, so whether the two are drawn as one dot or two is decided by where the tile grid happens to fall: they merge for 12 per cent of the possible offsets, against the 12 per cent the two fractions predict. What a machine does with it

The pixel is a place with a size

Drawing a coordinate rounds it to a pixel, which moves it by up to half a diagonal — 16.8 metres at zoom 12. Whether two points 43 metres apart appear as two dots is not a property of the data at all: they merge for 12 per cent of the positions the tile grid could take, and the closed form predicts 12.4.

A feature across nine tiles at zoom 4, and the nine labels it gets. A rectangle from -10° to 30° east and 36° to 62° north, drawn in the projected plane with the tile boundaries over it. A renderer that draws each tile from the geometry inside that tile puts the label at the centroid of the piece, marked hollow; the whole feature's centroid is the filled mark. The furthest piece's label is 1863 kilometres from it. The pieces' areas sum to the whole to 2.2e-16 of a relative part, so the clipping is exact and the displacement is the operation rather than an error in it. What a machine does with it

A tile is drawn without its neighbours

Independence is what makes the scheme scale: one request touches one square of the world. It also means a feature crossing nine tiles is nine features, each labelled at its own centroid — up to 1,863 kilometres from the whole one — and the displacement is bounded by the size of the feature rather than the size of a tile, so it grows as the reader zooms out.

The scale asked for and the scale the pyramid has, at 0°. A tiling scheme exists only at integer zoom levels, a factor of two apart in resolution, so a request for any scale between them is answered by the nearest rung. The ratio runs from 0.707 to 1.405 — 1/√2 to √2 — and repeats identically at every doubling, which is four times that in area. A request for 1:10,000 is served at zoom 16, which is 1:8,531; A request for 1:25,000 is served at zoom 14, which is 1:34,124; A request for 1:50,000 is served at zoom 13, which is 1:68,247. Nothing anywhere reports it, because the map that arrives is a perfectly good map of something. What a machine does with it

Zoom is a ladder

A tiling scheme exists only at integer zoom levels a factor of two apart, so a request for 1:25,000 is answered with 1:34,124 — 36 per cent coarser, and 86 per cent coarser in area. The mismatch runs from 1/√2 to √2 and repeats identically at every doubling, and nothing anywhere reports it, because the map that arrives is a perfectly good map of something.

Equal bands of screen, unequal bands of ground. A section through a camera pitched 60° from straight down, at the height that makes an untilted view exactly the flat map — 1152 pixels above the plane for a 768-pixel screen and a 36.87° field of view. The rays are drawn at equal spacings up the screen and the blocks below them are the ground each of those equal bands covers: 1.75 plane units per pixel at the bottom of the frame and 16.88 at the top, a factor of 9.7. Nothing about this is a projection of the sphere; it is a photograph of a map, and the map underneath it is still Web Mercator. What a machine does with it

A tilted view has no zoom level

Every essay about the screen so far assumes the map lies flat on it, which was true until about 2015. Pitch the camera sixty degrees and one frame asks for 3.6 zoom levels at once, a square tile covers ground four and a half times deeper than it is wide, and the pyramid has one integer per tile to answer with.

The same 2-pixel road at three latitudes, zoom 5. The dark bar is the mark as drawn — 2 pixels, identical in all three panels, because that is what the stylesheet says. The pale band behind it is the ground that mark covers, drawn to one common ground scale: 9.78 kilometres at the equator, 6.92 at 45° and 1.70 at 80°. The reader sees the dark bar and is being told about the pale one. What a machine does with it

The road is drawn two pixels wide

Seven rungs measure what a screen map does to position. Nothing on a map is a point: every mark has a width, the width is chosen in pixels, and a two-pixel road covers 9.78 kilometres of ground at the equator and 1.70 at 80° north. That is a generalisation applied at a strength varying by a factor of six across one sheet, by a stylesheet with no latitude in it.

One of these three lines does not slope. Three lengths at each zoom, for a world coordinate near the antimeridian. The pixel halves with every level, as it must. The spacing between representable double-precision values is far below it and halves with it. The spacing between representable SINGLE-precision values does not move at all — 2.0 metres at every zoom, because it is a property of the size of the number and the world does not get smaller. The two cross at zoom 17, and past it a vertex snaps to a lattice coarser than the pixels it is drawn into. What a machine does with it

The renderer runs out of numbers before the zoom does

Eleven essays price the pyramid in exact arithmetic. The pipeline that draws it carries single precision, where a world coordinate near the antimeridian quantises to two metres — at every zoom, because the number does not get smaller when the pixel does. At zoom 22 that is fifty-four pixels.

The whole library