A tile is drawn without its neighbours
The property that makes a tile scheme work is that a request touches one square of the world. Nothing about the tile at depends on the tile beside it, so tiles can be rendered in any order, on any machine, and cached forever.
That independence is also the scheme’s structural limit, and unlike most limits in this field it is not about the projection at all.
The measurement, and its control
Clipping a polygon to a rectangle is Sutherland–Hodgman, which is exact arithmetic on the vertices, and the first thing to establish is that the clipping itself is not introducing anything.
The pieces’ areas sum to the whole polygon’s to a relative — one bit of a double. That is asserted before anything else is measured, because a clipper with a subtle error would produce displacement figures that were partly its own, and the whole argument would be about the implementation rather than about the scheme.
With that established, the centroid of each piece is a fact about the decomposition. For the European rectangle at zoom 4: nine pieces, and the furthest piece’s centroid is 1,863 kilometres from the whole feature’s.
The displacement is bounded by the feature, not by the tile
The obvious guess is that a tiling artefact is bounded by the tile size, which would make it shrink as the reader zooms in. It does the opposite, and the numbers say so plainly:
| zoom | tile | pieces | worst displacement |
|---|---|---|---|
| 2 | 10,019 km | 2 | 1,053 km |
| 3 | 5,009 km | 4 | 1,798 km |
| 4 | 2,505 km | 9 | 1,863 km |
| 5 | 1,252 km | 20 | 1,863 km |
| 6 | 626 km | 72 | 2,212 km |
The displacement does not fall with the tile size; it saturates at roughly half the feature’s own extent, because the furthest a piece’s centre can be from the whole’s is set by how far apart the two ends of the feature are. What does change with zoom is the number of pieces — two, four, nine, twenty, seventy-two — so the effect goes from a duplicated label to a scattered mist of them.
In screen units it grows without limit: 27 pixels at zoom 2, 190 at zoom 4, 904 at zoom 6. That is the number a reader sees, and it is why the artefact is a zoomed-out phenomenon: a country whose label appears twice, in two places, neither of them the country’s middle.
A city-sized feature behaves the same way at its own scale. A box across London gives nine pieces at zoom 10 with a worst displacement of 28.6 kilometres, eighty pieces at zoom 12, and 1,147 at zoom 14 — the same saturation, at the size of the feature rather than at the size of the tile.
What has to cross the boundary anyway
A tile cannot be rendered from strictly its own geometry, because ink is wider than a line.
A stroke of width reaches either side of the feature, so a road crossing a tile edge is drawn to the edge and no further, and the neighbouring tile does the same: a hairline gap at every crossing. A mitred join at a vertex just outside reaches further still, by — for a four-pixel stroke at a 30° join, 7.7 pixels.
Labels are worse. A place name 120 pixels wide, centred on a point ten pixels outside the tile, must be drawn by a tile that does not contain the point at all, so the geometry a renderer needs extends at least half a label beyond the edge: 60 pixels, or 23 per cent of a 256-pixel tile.
In ground units that buffer is 22.8 kilometres at zoom 8, 1,428 metres at zoom 12, and 89 metres at zoom 16 — the same fraction of a tile at every level, which is the useful way to hold it. The scheme’s independence is therefore not quite independence: each tile is rendered from a neighbourhood of itself, and the neighbourhood’s width is a rendering decision measured in pixels rather than a geographic one measured in metres.
Which operations survive being cut up
The general question behind all of this is worth stating in one line, because it decides what a tiled renderer can and cannot do: an operation can be tiled exactly when it commutes with restriction.
Operations that do commute — the whole of what a tile scheme is good at:
- filling a polygon, since the fill of a piece is the piece of the fill;
- stroking a line, given the buffer above;
- drawing a point marker, given a buffer of the marker’s own radius;
- colouring by an attribute, since an attribute is carried by the feature and survives clipping.
Operations that do not, and every one of them is a place where a tiled map visibly misbehaves:
- placing a label, which needs the whole feature, as measured above;
- deciding which labels to drop, which needs to know what else is on the screen — and the screen spans several tiles;
- simplifying geometry, since simplifying the pieces of a line and joining them is not the same line as simplifying the whole;
- computing anything about the feature — its area, its length, its centroid — which is the subject of the next half of this field and which is exactly the failure the hero figure measures.
That list is not a criticism. It is a specification: the operations in the second group have to be done somewhere else, once, over the whole feature, and their results attached to the tiles as data. Which is what every serious renderer does, and which is why a vector tile carries a label point as an attribute rather than expecting the renderer to find one.
The buffer has a price, and it is paid in bytes
A tile rendered from a neighbourhood of itself carries geometry it will not draw, and the overhead is computable from the buffer fraction alone.
A buffer of tile-widths on each side means each tile holds the content of a square across. At the 23 per cent computed above that is tiles’ worth of geometry — 116 per cent overhead in the limit where features are small compared to a tile, since each one is carried by every tile whose buffered square contains it.
The real figure is lower, because a large feature is clipped and its interior is carried once, and higher for dense point data, where every point near an edge appears in two, three or four tiles. Either way the buffer is not a rounding on the data volume; it is a factor.
That is the trade in its plainest form. Independence is bought with duplication: the scheme stores each edge region several times so that no renderer ever has to ask about a neighbour. Compare the survey world’s version in where two zones meet, where the same problem is solved the same way — an overlap belt in which points carry two coordinates — for the same reason and at the same kind of cost.
The decomposition that fixed the labels
The label problem has a solution and it is not a better tiling. It is to stop rendering in tiles.
A scheme that ships geometry rather than pictures — coordinates in a tile-local system, drawn by the reader’s own machine — has a viewport rather than a tile as its unit of rendering. Labels are then placed once over everything in view, collisions are resolved globally, and the two symptoms above disappear: no duplicate names, and no label that moves because a different tile won the argument.
What that does not fix is the geometry: the features still arrive clipped, so a feature’s centroid, area and length are still unavailable to the renderer, and still have to be computed once, elsewhere, over the whole thing and attached as an attribute. The distinction between the two halves is exactly the one made above — placing a label is a presentation operation and can be moved to the viewport, while computing a centroid is a measurement and cannot be done from pieces at all.
Which is the sentence this half of the field hands to the other half. Everything from here on is about measurements made on stored geometry, and the first thing to establish is that a measurement needs to know what it is measuring on — as computing an area needs a surface sets out, and as a coordinate without its system is not a location establishes before it.
The seam is a general shape
A tile boundary is a seam in the picture, and this site has met several.
Where two zones meet is the survey version: two grids covering the same ground, a belt of overlap, and a point that carries two coordinates. Giving up continuity is the projection version: an interrupted map places its tears where the distortion would otherwise be worst, and the size of the tear is measured rather than hidden. The antimeridian is a cut in the numbers is the numbering version, and the one place in this field where the seam cannot be moved away, only moved.
The tile seam is the mildest of the four and the only one that is chosen for convenience with no geometric content whatever. A zone boundary is where a projection’s error would grow too large; an interruption is where an ocean can absorb a tear; the antimeridian is forced by the topology of a circle. A tile edge is at a power of two.
That is why it is the only seam in the list that is invisible when handled correctly, and the only one whose handling is purely a matter of engineering: buffer the geometry, compute the global operations globally, and nothing shows.
How much of the map is affected, which is a probability
A feature is only affected if it crosses an edge, and how often that happens is arithmetic rather than a matter of luck. For a feature of extent on a tile of width , with the grid’s origin unrelated to the feature, the chance of crossing at least one edge in one direction is , so in two it is
and one for anything larger than a tile. That gives:
| feature | zoom 8 · 156.5 km | zoom 12 · 9.78 km | zoom 16 · 611 m |
|---|---|---|---|
| 100 m | 0.1% | 2.0% | 29% |
| 1 km | 1.3% | 19% | 100% |
| 10 km | 12% | 100% | 100% |
The pattern is that the deeper the zoom, the larger the share of features that are cut — which is the opposite of the intuition that zooming in shows things more faithfully, and it is the same inversion as the displacement table above.
What saves the appearance is the other half of the arithmetic: the same zoom that cuts everything also makes every feature large on the screen, so the pieces are big and the label placement has room. The two effects run in opposite directions and roughly cancel, which is why a well-built map looks correct at every level and why the failures cluster at the zooms where features are small on screen and comparable to a tile — which is a narrow band, and is exactly where duplicated country labels live.
The piece count is a law, and it is the one that grows
The displacement saturates and the piece count does not, so the piece count is the quantity that decides how bad a zoom level looks — and it has a closed form that the measured tables obey to within a piece.
A feature of extent L laid on a grid of pitch T, with the grid’s origin unrelated to the feature, spans on average 1 + L/T tiles in one direction, so
Against the European rectangle’s measured counts of 2, 4, 9, 20 and 72 at zooms 2 to 6, the expression gives 2.0, 4.0, 8.9, 20.1 and 73 — with the vertical extent taken in Mercator’s own northing rather than in degrees of latitude, which is where a first attempt goes wrong. On the London box at zoom 14 it gives 1,126 against a measured 1,147.
Five orders of magnitude, one expression, no fitting.
And the law says the count quadruples for every level once the feature is larger than a tile, because both factors are then dominated by L/T and T halves. That is the growth the displacement table does not show: at zoom 4 a European feature is nine labels in the wrong place and at zoom 8 it would be over two thousand, each of them still up to 1,863 kilometres from the feature’s middle.
Which sharpens the essay’s own observation about where the failures live. The displacement is worst when a feature is comparable to a tile, and the count is worst when it is far larger — so a country label at zoom 4 is a handful of badly placed names and the same country at zoom 10 is a mist of them. The reason nobody sees the second is not that the arithmetic stops; it is that no renderer labels clipped pieces at those levels, having attached a label point as an attribute exactly as this essay recommends.
The law also prices the buffer’s duplication more precisely than the 116 per cent figure. A buffer of b tile-widths adds 2b to each factor, so the ratio of buffered to unbuffered content is ((1 + L/T + 2b)/(1 + L/T))², which tends to one for a large feature and to (1 + 2b)² for a small one. The overhead is therefore a property of the feature size relative to the tile, and the 116 per cent quoted is the small-feature limit — correct for point data and a considerable over-estimate for coastlines.
What a reader actually sees
Three symptoms, and they are recognisable once named.
A duplicated label — the same name appearing twice on one screen, on either side of an invisible line. That is the centroid failure with two pieces.
A label that moves when the map is panned. Panning does not change the tiles, but it changes which of them are in view and which label a renderer chooses to keep when two collide; the label placement problem is not tileable, so its answer depends on the viewport.
A hairline crack in a coastline or a road at a particular zoom, which is the buffer being too small for the stroke width the style asks for — and which appears at one zoom and not another because the stroke is in pixels and the buffer was computed in metres.
All three are absent from most maps most of the time, which is a genuine engineering achievement and worth saying. The scheme’s independence is real; what is not real is the idea that it is free.
The trade, stated in the field’s own terms
The scheme buys delivery — one lookup for any part of the world at any scale, cacheable forever, renderable in parallel — and pays in globality: every operation that needs to see a whole feature has to be moved out of the renderer.
That is the same shape as every other trade in this collection. Every projection minimises something and this scheme minimises the cost of serving a picture; what it gives up is not a metric property but a structural one, and the structural loss has a size — 1,863 kilometres for a European feature at zoom 4, 23 per cent of a tile for a label’s buffer, and a piece count that reaches 1,147 for a city at zoom 14.
Naming a cost and measuring it are different, and the second is what the site is for.
One last reading of the law is worth carrying, because it says which of the two quantities a renderer should be tuned against. The displacement saturates and the count does not, so a scheme that is judged by how far wrong a label is looks equally bad at every zoom, and one judged by how many wrong labels there are looks worse at every level. Only the second matches what a reader complains about.
Where this ladder goes next
The last rung of this ladder asks the question the whole screen half has been circling: the pyramid needed a square world and a projection, and Mercator was not the only one available. The equal-area cylindrical whose world is exactly square has standard parallels at ±55.654°, and what choosing it would have cost is measurable in the same units as what choosing Mercator did.
Named alongside this one
Essays reaching for the same objects. Nobody chose these; they are what the concept index makes visible.
- The scale of a screen map is not one number convention · ground resolution · tolerance · verification · zoom level
- A coordinate is a number with a width convention · ground resolution · quantisation · tolerance
- A meridian boundary moves when its datum does boundary · convention · tolerance · verification
- A tripoint defined three times boundary · convention · tolerance · verification
- An equidistance line belongs to a surface boundary · convention · tolerance · verification
- Inside is a claim about the edges boundary · locality · tolerance · verification
What links here
The 8 essays that link to this one and share the most of its objects, of 12 that link here.
The objects this essay names
Each one links to every other essay that touches it.
BoundaryCentroidClippingConventionGround resolutionLocalityQuantisationTile pyramidToleranceVerificationZoom level