Figure

One pixel at zoom 11: 76.4 m projected, 47.6 m at 51.5°

Drawn here at the parameters it defaults to, with every essay that calls it.
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.

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.

It is drawn by screen-figure with show: "pixel-grid" — 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.

6 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.

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 same kernels, across an edge. Each kernel measured over the same five rasters as the smooth measurement, on a field that carries a step across a tilted line instead of a smooth function. The solid lines are the edge and the faint ones the smooth field. The orders on the smooth field are nearest 1.00, bilinear 1.98, cubic 2.93; across the edge they are nearest 0.78, bilinear 0.58, cubic 0.60 — within a factor of 1.33 of one another, and the fastest of them belongs to nearest-neighbour, which does no interpolating at all. The ranking a smooth field establishes does not survive a discontinuity, and a real raster is mostly edges. What a machine does with it

An edge has no order of convergence

On a smooth field the three resampling kernels converge at orders 1, 2 and 3 and the choice is obvious. Across a discontinuity they converge at 0.78, 0.58 and 0.60 — within a factor of 1.4 of each other, in an order that puts nearest-neighbour first, and a real raster is mostly edges.

One unit of a vector tile, in metres of ground. A vector tile's coordinates are integers on a lattice 4096 units across the tile, and the tile halves at every level, so one unit is a distance that halves too: 5.48 m at z10 and 0.086 m at z16, at 55°. It is also a different distance at every latitude, by cos φ, because the tile is in Web Mercator — the same factor that makes a grid metre a different quantity of ground at every latitude, arriving in the file format rather than in the projection. What a machine does with it

A vector tile has an integer grid

Six essays on this ladder treat a vector tile as the thing a raster tile is not: geometry, resolution-free, styled at draw time. Its coordinates are integers on a lattice 4,096 units across a tile, the tile halves at every level, and at 55° north one unit is 88 metres at zoom 6 and 21 millimetres at zoom 18.

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