What a machine does with it

A line has a length only at a scale

Every measurement on this site so far has been of a curve given by a formula, sampled as finely as the picture needed. A map is not that: the geometry that reaches the page has been through an algorithm whose job is to throw most of it away. The first thing that goes is the idea that the line had a length.

One hundred and eighty essays on this site have measured a curve. Every one of them measured a curve that came from a formula, sampled at whatever step made the picture smooth, and every length quoted was the length of that sampling, in a plane whose straightness was itself a claim. Nothing has ever depended on the step, because the curves were smooth and the answers converged.

A map does not work that way. What reaches the page at 1:10,000,000 is not the 1:10,000 geometry drawn smaller — it is a different geometry, produced by an algorithm with a tolerance, and the algorithm ran somewhere in the pipeline that nothing downstream records, in the same way that the operation decides the coordinate system without saying so. Before any of that can be measured, one thing has to be established, and it is the thing that makes the rest of this ladder necessary: for the curves cartography actually carries, the length is not a property of the line.

A curve built to have dimension 1.2619. The generator replaces every segment with four of equal length at headings 0, +60.0°, −60.0° and 0. Closing the displacement fixes the length ratio at 0.33335, and four copies at that ratio give a dimension of exactly log 4 / log(2 + 2 cos θ) = 1.2619. Nothing here is measured yet: this is the construction the measurement will be checked against. Drawn at depth 5, which is 1024 segments, with the second-level shape shown faint beneath it.
Fig. 1 A curve built to have a fractal dimension chosen in advance. The generator replaces every segment with four of equal length at headings 0, +60°, −60° and 0; closing the displacement fixes the length ratio at exactly ⅓, and four copies at ratio ⅓ give a dimension of log 4 / log 3 = 1.2619. Nothing here is measured yet. This is the construction that the measurement will be checked against.

Why there is no coastline in this essay

The obvious way to write this argument is to fetch a coastline and measure it. That is what the original plan for this collection called for, and it was the wrong call for a reason that matters more here than anywhere else on the site.

A shapefile’s geometry has a simplification level. The same coast at 1:110,000,000 and at 1:10,000,000 has different lengths, and the difference is partly the coast and partly the vendor. Measuring the exponent of a coastline therefore measures the coast and whoever generalised it, in unknown proportion, and no amount of care in the measurement can separate the two.

That decision is what makes this essay possible rather than what forbids it. The subject here is the algorithm, and a measurement of an algorithm needs an input whose properties are known before the algorithm sees them. A curve built from a stated rule has exactly that: its dimension is a number solved for in closed form from the rule, and the measurement can then be asked whether it returns it. What follows is a check of a measuring instrument, using a standard, before the instrument is pointed at anything.

The ruler, and what it finds

Set a pair of dividers to a span r, put one point on the start of the curve, swing the other forward to the first crossing of the curve, and step. Count the steps, multiply by r, and that is the length the ruler measures.

The same curve, walked with two rulers. A pair of dividers set to 0.234 steps round the curve 5.3 times and reports a length of 1.243. Set to 0.065 it takes 26.0 steps and reports 1.693, 1.36 times as much. Neither is wrong. The curve has no length that does not name a ruler.
Fig. 2 The same curve walked with two rulers. The long stride steps round in a few dozen paces and reports one length; the short stride follows more of the wiggle, takes far more steps, and reports about twice as much. Neither ruler is being used wrongly. The disagreement is the subject.

The first crossing matters, and getting it wrong is the easiest way to produce a plausible number that is not a measurement. A wiggly curve leaves and re-enters the circle of radius r several times; taking a later crossing skips a piece of curve and reports a length that is too short, by an amount that depends on how wiggly the curve is — which is precisely the quantity being measured.

Walked properly, the measured length is not a length. It is a function of r, and for a self-similar curve it is a power of r:

L® ∝ r^(1 − D)

with D the curve’s dimension. A smooth curve has D = 1, the exponent is zero, and every ruler agrees — which is what makes an area computed on a stated surface a number rather than a protocol. A curve with D = 1.2619 has an exponent of −0.2619, and halving the ruler multiplies the measured length by 2^0.2619 = 1.20.

Length against ruler, on log axes. The measured length falls as a power of the stride, so on log axes it is a straight line and its slope is 1 − D. Fitted over the 14 strides between 5.49e-3 — four times the curve's own finest segment — and 2.60e-1, a quarter of its diameter: slope -0.2207, so D = 1.2207 against 1.2619 by construction, with r² = 0.9557. The band is part of the answer: below it the curve is a set of straight lines and above it there are too few steps to count.
Fig. 3 Length against ruler on log axes, over the band where the curve is self-similar. The slope is 1 − D, and fitting it returns 1.234 against the 1.2619 the curve was built with. The band is bounded below by four times the curve’s own finest segment and above by a quarter of its diameter, and both bounds are properties of the construction rather than of the subject — which is why a fitted exponent has to be quoted with the band it was fitted over.

What was computed, and how

Five curves were built to five dimensions chosen in advance. Choosing the dimension means solving

D = log 4 / log(2 + 2 cos θ)

for the generator’s angle θ, which is a one-line bisection: D = 1.1 needs θ = 40.25°, D = 1.2619 needs exactly 60°, D = 1.4 needs 69.76°, and D = 1.6 needs 79.09°. Each curve was then handed to the divider walk with no knowledge of the angle it came from.

The measurement returns the construction. Five curves, each built to a dimension chosen in advance by solving log 4 / log(2 + 2 cos θ) for θ, each then measured by the divider walk with no knowledge of the angle it was built at. The worst departure is 0.0523, at depth 7. This is the figure that licenses every other number in the family: without it the exponent would be a property of the sampling rather than of the curve.
Fig. 4 Constructed against measured, at depth 7 — 16,384 segments per curve. The worst departure is 0.052, at the roughest curve, where the self-similar band is narrowest because the construction’s own length ratio is closest to a half. This is the figure that licenses every other number in the family: without it, an exponent would be a property of the sampling rather than of the curve.

The recovery is good enough to trust and not better than that, and the reason is worth stating rather than smoothing over. Depth 7 gives a finest segment of 4.6 × 10⁻⁴ of the span, so the self-similar band runs from about 1.8 × 10⁻³ to 2.6 × 10⁻¹ — two and a half decades. Below the bottom the curve is a collection of straight lines and its measured length stops growing; above the top there are too few steps for the count to be a count of anything. Two and a half decades is what is available, and a slope fitted over two and a half decades is worth about two decimal places.

The control matters as much as the recovery.

A smooth curve has a length. The same divider walk on a circle and on a Koch curve, each measured against its own true length and plotted against stride as a fraction of the curve's diameter. The circle is flat to 2.1 per cent across the whole band: it has a length, and every ruler finds it. The Koch curve spans 36 per cent over the same range. The question "how long is it" has an answer for one of them.
Fig. 5 The same divider walk on a circle and on the Koch curve, each measured against its own true length, plotted against stride as a fraction of the curve’s diameter. The circle is flat to 2.1 per cent across the whole band — it has a length, and every ruler finds it, the departure being the polygon-versus-arc error and nothing else. The Koch curve spans 35.6 per cent over the same range and shows no sign of settling.

The wobble, which is not noise

A fitted exponent suggests that the length at any particular ruler can be predicted from the fit. It cannot, and the way it fails is structured.

The exponent is exact and the length is not. The residuals from the fitted power law, in per cent. They do not scatter: they oscillate, with a period equal to the construction's own length ratio, because a divider of stride r and one of stride r/3.000 see geometrically similar pictures. The amplitude here is 17.54 per cent, which is the accuracy any single ruler measurement of this curve can have however carefully it is made.
Fig. 6 The residuals from the fitted power law, in per cent. They do not scatter — they oscillate, with a period equal to the construction’s own length ratio, because a divider of stride r and one of stride r/3 are looking at geometrically similar pictures. The amplitude here is the accuracy any single ruler measurement of this curve can have, however carefully it is made.

This is lacunarity, and it is a property of the curve rather than of the measurement. A self-similar object built by repeated subdivision looks exactly the same at scales separated by its ratio and not quite the same in between, so the measured length is a power law multiplied by a periodic function of log r. Fitting through the oscillation recovers the exponent; it does not make any single measurement more accurate than the oscillation’s own amplitude.

The consequence for a map is direct. Two organisations measuring the same coast with rulers a factor of two apart will disagree by more than the exponent predicts, in a direction that depends on where their rulers sit relative to the coast’s own scales — and neither will be able to reconcile the numbers by scaling.

What one exponent costs, in the arithmetic a map does

An exponent is abstract until it is turned into the ratio between two published numbers, so here is that arithmetic done once.

A curve with dimension D, measured at ruler r and again at ruler r/k, returns lengths in the ratio k^(D−1). For the curve drawn above, D = 1.2619, so:

ruler finer by length longer by
1.20
10× 1.83
100× 3.34
1,000× 6.10

Two decades of ruler — the difference between a wall map and a street plan — is a factor of 3.3 on the same feature. For a gentler curve at D = 1.15 the same two decades give 1.99, and for a rough one at D = 1.4 they give 6.3. So the ratio between two organisations’ published lengths is itself a measurement of the roughness, and it is often the only measurement of it that anybody has.

That is the useful reading of the exponent for a map, and it is the reading that survives the fact that no real coast has a single D. Nobody needs to believe a coastline is a fractal to accept that a length quoted without a scale cannot be compared with another length quoted without a scale, and that the disagreement between them is not an error either party made.

The wobble decides how wide the band has to be

The oscillation is described above as a limit on any single ruler measurement, and it is also the thing that decides how accurately a fitted exponent can be known — which is the number everybody quotes.

The residual is periodic in log r with the construction’s own ratio as its period. For these curves that ratio is one third, so the period is log₁₀ 3 = 0.477 decades. Fitting a straight line through data that carries a periodic residual gives a slope error that depends on how the band’s endpoints fall relative to that period: a band spanning a whole number of periods has the oscillation contributing nothing to the slope, because a full cycle is symmetric about its own mean, and a band ending on a quarter-period contributes the most.

The band available here is about 2.5 decades, which is 5.24 periods — a quarter of a cycle of overhang, and therefore close to the worst case. A band of 2.39 decades, five periods exactly, or 2.86, six periods, would give a better slope from strictly less data.

That is worth knowing because it is a free improvement and because it explains the shape of the disagreement. The fit returns 1.234 against a constructed 1.2619, and the five-curve figure’s worst departure is 0.052 at the roughest curve — where the construction’s length ratio is closest to a half, so the period is shortest, so a fixed band contains more cycles and a less favourable fraction of one. The errors are not random and they are not a defect in the estimator; they are the interaction between a band chosen for convenience and a period fixed by the curve.

A real coast has no single ratio, so its residual is not periodic and this particular cancellation is unavailable. It also cannot conspire: an aperiodic wobble contributes an error that behaves like noise rather than like a bias, which is one of the few respects in which measuring a real coast is easier than measuring a standard.

Reading the exponent off two published numbers

The ruler-ratio table runs one way and it is more useful run the other. If two organisations publish lengths L₁ and L₂ for the same feature at rulers differing by a factor k, then

D  =  1+log(L2/L1)logk,D \;=\; 1 + \frac{\log(L_2/L_1)}{\log k},

which needs no access to the geometry, no divider walk and no agreement about anything except which two scales were used.

Applied to the classic disagreements it recovers the classic numbers. A pair of neighbours quoting lengths a fifth apart for a shared border, at scales a factor of ten apart, gives D = 1 + log 1.2 / log 10 = 1.08 — a nearly smooth political boundary, which is what a border surveyed as a chain of straight runs should be. The same twenty per cent at a factor of two apart gives 1.26, which is a coastline.

So the ratio between two published lengths is a measurement of roughness, and the scales it was taken at decide what the ratio means. That is the practical content of the whole rung: a length quoted without a scale carries no information, and two lengths quoted without their scales carry not merely less information than one but a positively misleading amount, since the same ratio is consistent with anything from a straight line to a fjord depending on a number neither party wrote down.

The cell, and why the exponent is the wrong question for a map

There is a temptation, once the exponent is in hand, to treat it as the answer: quote a dimension for a coastline and the length at any scale follows. For a map it does not, for two reasons that arrive from different directions.

What the 5th decimal place of a coordinate is worth on the ground. A latitude written to 5 decimal places steps 1.112 m north for one unit in its last digit, at every latitude, because the meridian does not care where it is measured. A longitude written to the same 5 places steps 1.112 m east on the equator and 0.097 m at 85°, because a degree of longitude is a degree of a circle whose radius is R cos φ. The same written precision means two different distances at the same point, and a different pair at every other.
Fig. 7 What one unit in the fifth decimal place of a coordinate is worth on the ground. Every vertex a map stores is written down, and the writing has a resolution of its own — 1.112 m of latitude everywhere and 1.112 cos φ metres of longitude. Below that resolution the stored curve is a lattice walk rather than a curve, and any exponent measured there is a measurement of the lattice.

The first is the resolution the geometry was captured at, and the second is the resolution it was written at. A coordinate to five decimal places quantises the ground into a cell about a metre across, and the cell is not square, because a degree is not a unit of length; a divider set below that is walking a staircase and will report a dimension approaching 1 for a smooth staircase or 2 for a dense one, depending on the direction of travel. Neither is about the coast.

One row across the edge, after a round trip. A single row of a raster whose values are 0 on one side of a line and 1 on the other — a land-cover map with two classes — warped into another projection and back. Nearest-neighbour returns a step in the wrong place by up to half a cell and no other value; bilinear returns a ramp; the cubic kernel overshoots to 1.082 and undershoots to -0.004, which are values no input cell held. On a class raster those are classes that do not exist, and no refinement removes them: they are what a kernel with negative weights does at a step.
Fig. 8 The same failure seen in the raster half of the collection, where an edge has no order of convergence until it has a width: a resampling kernel’s order of convergence is recovered only once the edge it is measuring has a width. At a mathematical discontinuity the fitted orders are meaningless. A curve below its own capture resolution is the same situation for a vector geometry.

The consequence runs into every derived quantity a geometry is asked for — the perimeter of a parcel, whether a point is inside it, and which of two features is nearer. So a length quoted for a mapped feature is a statement about three things — the feature, the ruler, and the resolution the feature was stored at — and only the first is usually mentioned.

Where the model stops

Three limits, all of them chosen rather than incidental.

These curves are exactly self-similar and no coast is. A real coastline is statistically self-similar at best, over a limited range, with the range and the exponent both varying along its length: a fjord coast and a barrier-island coast are different objects with different exponents, and a single number for a country’s coast is an average of things that are not alike. The exponents measured here are exact by construction because the point was to test the instrument.

The divider walk is one estimator of several and they do not agree. Box counting, the yardstick used here, and the variance of chord lengths give exponents that differ in the second decimal on the same curve, because they weight the curve’s scales differently. Nothing here compares them; the recovery of the construction is evidence that this one works, not that it is the best one.

And the band is narrow. Two and a half decades is what a depth-7 construction affords at a reasonable cost. Published coastline exponents rest on ranges no wider and often narrower, which is worth remembering when they are quoted to three figures.

Nothing here has been projected. The curves live in a plane and were measured in that plane, so no part of the disagreement between rulers is the map’s fault. That is deliberate: putting a projection under the measurement would add the point scale factor’s own variation to the ruler’s, and the two are separable only if one of them is understood first. The projection arrives in the next rung, where it is the whole subject.

The generalisation

The result that survives leaving cartography is one sentence, and it is not the famous one.

A quantity that has no limit as the resolution improves is not a property of the object; it is a property of the pair. The famous version — how long is the coast of Britain — is usually told as a curiosity about fractals. The useful version is that “length” is a measurement protocol, and that the protocol has to be quoted because two protocols do not merely disagree by a scale factor, they disagree by an amount that depends on the object.

Every field that measures a rough thing meets this. A surface’s area, a signal’s total variation, a network’s path length: each is finite for a smooth idealisation and each grows without bound for the real object as the instrument improves. The disciplines that handle it well are the ones that stopped quoting the quantity and started quoting the quantity together with the scale — which is what a map’s scale bar has always been for, and is not what a coastline’s length in a gazetteer is.

Who found it, and when

Lewis Fry Richardson measured the borders of Spain and Portugal, of the Netherlands and Belgium, and of several coastlines, and found each pair of neighbours quoting lengths that differed by a fifth. He was looking for a relation between the length of a border and the likelihood of war between the countries it separated, found the lengths would not sit still, and published the ruler relation in 1961 as a note in an appendix. It is one of the few results in this collection that arrived as a nuisance in somebody else’s investigation.

Benoit Mandelbrot took the exponent seriously in a 1967 paper in Science titled with the question, and the answer — that the exponent is a dimension — became the opening example of the subject he named. The Koch curve is older than either: Helge von Koch described it in 1904 as an example of a continuous curve with no tangent anywhere, constructed to be more elementary than Weierstrass’s function. It was built to be a counterexample, and it has spent the century since being used as a standard.

The generalised-angle version used here, which lets the dimension be chosen rather than accepted, is the standard variant sometimes credited to Ernesto Cesàro. It is what makes the check in this essay possible: without a family, there would be one curve, one exponent, and no way to tell a working measurement from a lucky one.

Where the ladder goes next

This rung establishes that a mapped line’s length depends on the ruler. The next asks what happens when the geometry is deliberately reduced — when an algorithm with a tolerance in metres is asked to throw vertices away — and finds that the answer depends on something nobody records: whether the tolerance was applied before the projection or after it.

Named alongside this one

Essays reaching for the same objects. Nobody chose these; they are what the concept index makes visible.

What links here

The 8 essays that link to this one and share the most of its objects, of 14 that link here.

The objects this essay names

Each one links to every other essay that touches it.

ConvergenceDivider walkFractal dimensionGeneralisationGround resolutionMeasurementPolylineResolutionRulerScaleSelf similaritySimplification