A screen map is a pyramid of tiles
Nearly every map anybody looks at now is delivered as square images of 256 pixels, indexed by three integers, drawn in one projection. The scheme is usually described as an implementation detail. It is a coordinate system, it is almost entirely forced by one requirement, and the requirement is not the one usually given.
What the scheme actually is
Three integers name a tile: a zoom level , and a column and row and within that level. At level there are tiles across and down, so in total — one at the top, four at the next, and 274,877,906,944 at level 19, which is a number no one has ever drawn.
Each tile is an image of a fixed pixel size, conventionally 256 across. The whole world at level is therefore pixels wide, and since the world is a fixed number of projected metres wide, the metres per pixel follow immediately:
with the radius the projection uses. That gives 156,543.034 metres per pixel at level 0, 38.2 at level 12, and 0.299 at level 19. Those are the numbers every scheme publishes, and they are exact rather than rounded: the level is a power of two and the world’s width is a constant.
Why it has to be a square
The property that makes the whole thing work is that a tile at one level is exactly four tiles at the next. Not approximately, not after resampling: the same ground, cut in quarters, at twice the linear resolution. That is what lets a cache hold one level and serve requests at another without touching a pixel, and it is what makes the index a tree rather than a list.
So the requirement is that the world be covered by whole squares at the root, and with a single root tile that means the projected world must be exactly as wide as it is tall. That condition is the origin of the scheme’s most-quoted oddity, the cut at 85.0511287798° of latitude: Mercator’s northing runs to infinity at the pole, so a cut is unavoidable, and the cut that makes the world square is at the latitude whose northing equals half the world’s width — one number, forced by the choice of a one-tile root.
The qualification in that sentence is load-bearing and is the subject of the square costs the poles. A root of tiles works just as well, and allows any world whose aspect ratio is the rational ; the geographic tiling has used a two-tile root and a world all along. What the square is forced by is not the quadtree but the decision to start from one image.
The cut’s own number falls out of that sentence in one line, and it is worth doing because the figure is usually quoted rather than derived. Mercator’s northing is ln tan(45° + φ/2) in units of the sphere’s radius, and half the world’s width in those units is π. Setting the two equal gives tan(45° + φ/2) = e^π = 23.1407, so 45° + φ/2 = 87.5256° and φ = 85.0511287798°. The exponential of π is the whole of it: the latitude is not a compromise between anything, it is the place where one transcendental equals another because somebody wanted one image at the root.
That also says how the number would move under the alternatives. A two-tile root halves the required northing to π/2, giving e^(π/2) = 4.8105 and a cut at 78.69°; a root two tiles tall instead doubles it to 2π, giving e^(2π) = 535.49 and a cut at 89.786°. Each is one exponential and each was available.
The index is the geometry
The three integers can be folded into one string. At each level a tile is one of four quadrants of its parent, so the path from the root is a sequence of digits 0 to 3 — the quadkey, which is the bits of and interleaved.
That representation is not a naming convenience. It makes a geometric question into a string question: a tile is inside another exactly when its key extends the other’s. Testing containment, which is four floating-point comparisons on rectangles, becomes testing a prefix. Every parent of a tile is a prefix of its key, and the parents come out in order.
The site’s gate checks both directions of that claim over sixty-four tiles at level six and every one of their ancestors: the key round-trips to the tile it names, and the rectangle it names is contained in every rectangle its prefixes name. The check is worth having because the property is inherited from two other facts — the world is square, and each level is an exact quartering — and a scheme that had drifted on either would still produce keys that looked right.
Two routes to a tile’s extent
A tile’s rectangle can be computed two ways, and the site computes both.
The closed form divides the world by and multiplies by the indices, which is what a program does. The subdivision starts from the whole world and halves it times, following the bits of and , which is what the pyramid means. Over forty tiles at level 8 the two agree to metres — floating-point noise on a coordinate of twenty million.
Agreement to that tolerance is not a formality. It is the statement that the scheme really is a quadtree over the projected plane rather than an indexing convention laid on top of one, and it is the kind of check the fleet’s own habit demands: two independent routes to the same number, or neither is believed.
The doubling is a claim about the projection
The exactness of the doubling is easy to read as arithmetic — of course halving a square gives half the width — but it carries a condition that is not arithmetic at all: the projection must not depend on the zoom level.
That is not a foregone conclusion. A scheme could reasonably choose a different projection for each level, and there is a good cartographic argument for it: the projection best suited to the whole world is not the one best suited to a single city, and every printed atlas ever made switches projection between its world map and its city plans. A scheme that did so would produce better-shaped maps at every level and would destroy the pyramid, because a tile at level 12 would no longer be four tiles at level 13 — it would be four tiles of a different map, computed independently, sharing no pixels and no cache.
So the scheme’s single projection is a consequence of the data structure rather than a cartographic judgement, and it is the reason a slippy map behaves the way it does: zooming in changes nothing but the scale, and the shape of a coastline arriving at level 14 is the shape that was already there at level 4, magnified. That continuity is what makes the interaction feel like moving a lens over a map rather than fetching a series of different maps, and it is bought at the cost of using one projection everywhere, including the two places where it is worst — the poles, which are cut off, and any measurement, which is wrong by the factor below.
The number that is not a distance
Here is where the scheme stops being merely a convention and starts misleading.
The published resolution — 38.2 metres per pixel at level 12 — is a distance in projected metres. On a Mercator projection the scale factor is , so the ground distance a pixel covers is smaller by :
At 51.5° north that is 23.8 metres rather than 38.2. At 60° it is 19.1, exactly half the published figure. The table is not wrong; it is a table of a projected quantity, published without a latitude column, and read as ground distance by everyone including the people who write specifications against it.
What the factor does to a stated scale
Turning metres per pixel into “1:50,000” needs one more convention: how large a pixel is on paper. The standard rendering pixel is 0.28 millimetres, which is 90.7 dots per inch, and nothing measures it — it is a number agreed on so that two programs can report the same scale for the same picture.
With it, level 12 is 1:136,495 at the equator. At 60° north the same picture is a 1:68,765 map. A reader who asks for a scale and is given a zoom level is being given a number that is true along one line of the Earth, which is the subject of the scale of a screen map is not one number.
The projection in the scheme is the site’s own headline
That last gap deserves its own sentence, because it is this site’s founding result arriving in a place nobody looks for it.
The scheme’s projection applies spherical Mercator formulae to geodetic latitudes read off the WGS84 ellipsoid. That is not a small approximation with a small consequence: it is what makes the projection non-conformal, measured at 0.3848° of maximum angular deformation against a noise floor of for genuinely conformal projections — the argument of Web Mercator is not conformal.
Here the same defect shows up as a discrepancy in scale. The relative scale at 60° is 1.985 rather than 2.000, a departure of 7,522 parts per million from . The control that makes that a measurement rather than an artefact of differencing is in the same figure: the spherical Mercator, measured by identical machinery, reproduces to under parts per million.
Seven thousand parts per million is 7 metres per kilometre. Nothing on a screen map at continental zoom cares. A survey chain that has just spent four corrections getting to a centimetre, as in what a tape measures, cares a great deal, and the two worlds meet whenever survey data is put on a web map.
Where a pixel stops being a place
A pixel is not a point. It is a square of ground with a size, and every vertex drawn into it is moved to its centre.
The move is at most half a pixel in each direction, so at most half a diagonal in total: 16.8 metres at level 12, 1.05 at level 16, 0.13 at level 19. What that costs is not obvious in either direction — the displacement is smaller at high latitude, because the pixel covers less ground there, which is the opposite of what the stretched-looking map suggests.
That last observation is the pixel is a place with a size, and it is a genuinely odd property of the scheme: whether two things appear as two things is not a function of the data at all.
What a tile does not know
A tile is rendered from the geometry inside it. That is what makes the scheme scale — a request touches one square of the world and nothing else — and it is also its most visible failure, because a feature that crosses a boundary is drawn twice by two renderers that cannot see each other.
The consequence is measurable. Clipping a rectangle spanning Europe to the nine tiles it crosses at level 4 gives nine pieces whose areas sum to the whole to a relative — the clipping is exact — and whose centroids are up to 1,863 kilometres from the whole feature’s. A label placed at each piece’s centroid is nine labels, none of them where the feature’s centre is. A tile is drawn without its neighbours takes that apart.
The exponential also explains why no cut is a comfortable one. Reaching an extra degree of latitude near the pole costs a multiplicative jump in the world’s height — from 85.05° to 89.79° is a factor of twenty-three in northing — so the choices available are not a smooth range to be traded against the area lost. They are a short list, each a power of two apart, and the area a scheme gives up falls much more slowly than the height it must accommodate rises.
What is convention and what is forced
It is worth separating the two, because the scheme is usually presented as one undifferentiated block of arbitrary choices.
Forced by the quadtree: a square projected world; an exact power-of-two relationship between levels; a cut at whatever latitude makes the world square, given the projection.
Conventions, and different schemes make them differently: the tile size in pixels — 256 or 512; the direction the row index counts, north-down in most schemes and south-up in one older one; the quadkey against three separate integers; the 0.28 mm rendering pixel.
And one that is neither: the projection. Nothing about a quadtree requires Mercator. What Mercator supplies is conformality — the property that a rotated or tilted view does not shear — and the usual argument, that a square world requires it, is simply false. There is a cylindrical equal-area projection whose world is exactly square, its standard parallels are at ±55.654°, and the pyramid did not have to be Mercator measures what choosing it would have cost instead.
The scheme as a coordinate system
Set against the site’s other coordinate systems, the tiling is unusual in one respect and ordinary in every other.
It is ordinary in that it is a projection with a stated ellipsoid, a stated origin and stated units, exactly as what a grid is made of requires of a national grid. Its false origin is the north-west corner rather than a point south-west of the country; its unit is the pixel rather than the metre; its scale factor is 1 on the equator rather than 0.9996 on a central meridian.
It is unusual in that the unit changes with the zoom. Every other coordinate system on this site has one unit for the whole system. Here a coordinate is only meaningful with a level attached, and the same ground is addressed by twenty different pixel coordinates depending on how closely it is being looked at. That is why a pixel coordinate is never stored: what is stored is degrees, and the pixel is computed at the moment of drawing — which is exactly the operation the rest of this field is about.
What the tiling scheme is good at
None of the above is an argument that the scheme is bad. It is an extremely good answer to the problem it solves, and the reason is worth stating in the same measured terms as the criticism.
A conformal projection means that the map looks locally correct at every point, at every zoom, in every direction of view. A square world means an exact quadtree. Powers of two mean no resampling. Between them those three give a scheme in which a request for any part of the world at any scale costs one lookup, in which the images are cacheable forever, and in which a reader dragging a map never sees a shape distort under the cursor.
What the scheme is bad at is being measured off — of areas, of distances, and of the scale it prints. Which is a way of saying that it made the trade every projection makes, and the rest of this field is about which operations land on the losing side of it. Every projection minimises something; this one minimises the cost of delivery.
Where this ladder goes next
The next rung takes the printed scale apart — what a zoom level means as a scale denominator, and why a single number for the whole world is not a simplification but a category error. After that comes the scale bar, which is the same problem in the form a reader can actually see, and then the cut at the top of the world, computed rather than quoted.
The measurements this essay rests on — the exact doubling, the containment property of quadkeys, the two routes to a tile’s extent, and the ground resolution at every latitude — are all in the site’s own gate, and every one of them is written so that it can fail.
Named alongside this one
Essays reaching for the same objects. Nobody chose these; they are what the concept index makes visible.
- A tolerance in map units is not a tolerance conformality · convention · scale factor · tolerance · verification · web mercator
- An area on the grid is not an area on the ground conformality · convention · scale factor · tolerance · verification
- Four radii of the Earth conformality · convention · scale factor · tolerance · verification
- Measuring instead of naming conformality · scale factor · tolerance · verification · web mercator
- Simplification does not commute with the projection conformality · coordinate reference system · ground resolution · scale factor · tolerance
- The units are part of the coordinate convention · coordinate reference system · scale factor · tolerance · verification
What links here
The 8 essays that link to this one and share the most of its objects, of 18 that link here.
The objects this essay names
Each one links to every other essay that touches it.
ConformalityConventionCoordinate reference systemGround resolutionQuadkeyScale factorTile pyramidToleranceVerificationWeb MercatorZoom level