What a machine does with it

A tolerance is a promise about the picture

Douglas–Peucker guarantees exactly one thing: no vertex it discarded is further than ε from the line drawn in its place. It says nothing about the enclosed area, nothing about which side of the boundary a point ends up on, and nothing about whether the curve still fails to cross itself — and all three are what the geometry is usually being asked.

Douglas–Peucker makes a promise, and it keeps it. Take the first and last vertex of a run, find the vertex furthest from the chord between them, split there if that distance exceeds ε and recurse; every vertex that survives to be discarded is therefore within ε of the segment that replaced it. That is a theorem about the algorithm and it holds in every measurement below, to the last decimal place.

The trouble is what the promise is about. It is about vertices and a line — a statement in the units the coordinates happened to be in, concerning how far the drawn shape moved. Almost nothing a stored geometry is asked for is that, and the collection has already found the same gap in a centroid that belongs to a plane rather than to a region.

The picture is kept, at four tolerances. One closed curve of 3001 vertices, simplified at four tolerances. Douglas–Peucker's promise holds in every panel: no discarded vertex is further than ε from the line drawn in its place, measured at 0.1158 against 0.128 in the last. The picture survives. The enclosed area does not: it falls by 5.43 per cent, and it falls rather than wandering, because cutting a corner takes area off and never puts it back.
Fig. 1 One closed outline of 3,001 vertices, simplified at four tolerances. The promise holds in every panel: the worst discarded vertex is 0.0019, 0.0152, 0.0400 and 0.1158 against tolerances of 0.004, 0.016, 0.048 and 0.128. The picture survives. Underneath each panel is the enclosed area, which does not.

The one thing that does follow

Before the failures, the one derived quantity that inherits a guarantee, because it is the exception that makes the rest surprising.

The perimeter can only fall. A simplified polyline is a subsequence of the original’s vertices, and by the triangle inequality the path through fewer of them is no longer than the path through all of them. This is not a measurement, it is a two-line proof, and it holds for any algorithm that only ever discards vertices — Douglas–Peucker, Visvalingam, a fixed-stride decimation, anything.

So a generalised coastline is shorter than the one it came from, always, and by an amount that grows monotonically with the tolerance. That is exactly the relation the ruler measurement of the previous rung is about, arriving from the algorithmic side rather than the geometric one: generalisation is a coarse ruler, and a coarse ruler measures less. The tolerance is the stride, and it is not the same ground distance everywhere.

The perimeter can only fall; the area does as it likes. Three curves against tolerance. The perimeter is the easy one: a simplified outline is a subsequence of the original's vertices, so the triangle inequality forbids it from being longer, and it falls monotonically to 11.1 per cent below. A convex outline can only lose area, for the same reason. An outline with a bay in it can lose area at one tolerance and gain it at the next — 5.43 per cent up at the widest here — because a cut corner removes area and a bridged bay adds it. So there is no correction: the sign is not known in advance.
Fig. 2 Three curves against tolerance. The perimeter of the wavy outline falls monotonically to 11 per cent below its original — that one is a theorem. A circle’s enclosed area also falls monotonically, to 10 per cent below, because a chord of a convex boundary always cuts inwards. The wavy outline’s area does neither: it is −0.04 per cent at the finest tolerance, +0.11 at the next, −1.92 further on and +5.43 at the coarsest.

The area drains, or fills, and there is no telling which

The intuition about area is that a simplification cuts corners, so it loses a bit. For a convex outline that is right and it is a theorem for the same reason as the perimeter: every chord of a convex boundary lies inside it, so every replacement removes area and never adds any. The circle in the figure loses 0.16, 0.64, 2.55 and 9.97 per cent as the tolerance rises through four steps.

For any other outline it is wrong. A boundary with a bay in it has chords that bridge the bay and add area, and chords that cut a headland and remove it, and which of the two dominates at a given tolerance depends on which features happen to fall below it. The measured sequence on the wavy outline is −0.04, +0.11, −0.12, −0.26, +0.38, −1.92, +5.43 per cent. It changes sign four times.

That means there is no correction. A bias with a known sign can be compensated; a national land-cover total generalised at a known tolerance could be scaled back up. A quantity whose sign is not known in advance cannot be, and the only honest handling is to compute areas from the ungeneralised geometry and carry them alongside — which is what a well-built dataset does and what a re-generalised copy of one loses. It is the same discipline that keeps a published coordinate beside the observations it came out of.

The area of one 8° × 8° cell at 50–58° north, seven ways. The cell has an exact area — R²Δλ(sin φ₂ − sin φ₁), 464,747 square kilometres — so every other row is a measurement of the method rather than of the ground. The equal-area projection returns it to 1.000000 and the spherical polygon formula to 1.000000, which is three routes agreeing — and the same cell integrated on the ELLIPSOID comes out 0.43 per cent away from all three, because the sphere is a model. Taking the shoelace in Mercator gives 2.91 times too much, and treating degrees as a length gives 1.70 times — about sec φ at the cell's middle, which is where that error comes from.
Fig. 3 The collection’s earlier finding, which this one sits on top of: an area is not a property of a ring of coordinates until a surface is named. Generalisation adds a second ambiguity underneath the first, and the two do not commute either — the area of the simplified ring on the ellipsoid is not the ellipsoidal area simplified.

Which side of the line a point is on

Containment is the query a boundary file most often exists to answer. Is this address in this district; is this reading inside this reserve; which of these polygons does this point belong to. Each of those is a claim about the edges before it is a claim about the point.

Which side of the line a point is on. A grid of 4900 probe points asked, of the original outline and of the outline simplified at ε = 0.032, whether they are inside. 60 of them changed their answer, marked. They sit in a band along the boundary whose width is the tolerance, so the count is proportional to perimeter × ε and is entirely predictable — the furthest of them was 0.0247 from the original outline. What is not predictable from the tolerance alone is which way each one went, and for a point in that band the stored geometry no longer answers the question it was kept to answer.
Fig. 4 A grid of 3,600 probe points asked, of the original outline and of the outline simplified at ε = 0.032, whether they are inside. Fifty-one of them changed their answer, marked. They lie in a band along the boundary whose width is the tolerance, so the count is proportional to perimeter × ε and is entirely predictable in aggregate. Which way any particular one went is not.

The counts across the ladder are 6, 7, 13, 17, 51, 63 and 193 of 3,600 — up to 5.4 per cent of the probed area at the coarsest tolerance. The furthest a flipped point sat from the original boundary was 0.075, against a tolerance of 0.128: inside the promise, as it must be, since the boundary cannot move further than ε.

That is the honest statement and it is worth being precise about, because the dramatic version — a point far from the boundary changes district — is false for this algorithm. The true statement is duller and worse:

Every point within ε of a boundary has an answer that the simplification may have decided for it, and ε is chosen to be invisible at the display scale. At 1:1,000,000 a tolerance of a fifth of a millimetre on the page is 200 m on the ground — and the scale on a screen map is not one number, so on a tiled map it is 200 m in one place and rather less in another. The number of addresses within 200 m of a district boundary is not small, and nothing in the file marks them.

Two readings of the same triangle, and the band between them. The same three vertices, joined two ways: with straight lines in the plane the coordinates are stored in, and along the ground. Every dot is a point the two readings disagree about — inside on one and outside on the other. The band covers 20.4 per cent of the polygon, which is 2934 thousand square kilometres, and it is not an error in either reading: the file does not say which one it means. Densifying the stored boundary removes it, which is the only fix there is. Drawn in Mercator.
Fig. 5 The same question asked of the projection rather than of the generalisation: a point’s containment depends on what the edges of the polygon are taken to be. Two ambiguities, stacked, and a validation suite that checks neither.

One in seven of the band actually flips

The flip counts are described as entirely predictable in aggregate, and the prediction can be made and checked, which turns a reassurance into a constant worth carrying.

Every flipped point lies within ε of the original boundary, so the affected region is a band of width 2ε along a perimeter P. On a probe grid over a box of area A the expected number of probes in the band is 3,600 × 2/A, which for this outline — perimeter about 6.3 in a box of area 4 — gives 91 probes at ε = 0.008, 363 at 0.032 and 1,451 at 0.128.

Against measured flips of 13, 51 and 193, the realised rate inside the band is 14.3, 14.0 and 13.3 per cent — one in seven, constant to within a point across a sixteenfold range of tolerance.

That constant is the interesting quantity and it has a mechanism. A point flips only if it lies between the two curves, and the simplified boundary crosses the original repeatedly — inside on the chords that cut a headland, outside on those that bridge a bay. Most of the band is therefore on the same side of both curves and only the lens-shaped regions between successive crossings contain flippable points. The one-in-seven figure is the area of those lenses as a fraction of the band, and it is stable because the crossing frequency is set by the outline’s own detail rather than by the tolerance.

So the practical estimate is a seventh of the naive one. A pipeline owner wanting to know how many address queries a generalisation put at risk should compute P × 2ε × the query density and divide by seven — and the naive figure, which is what a cautious estimate would use, over-states the exposure by that factor.

Two cautions go with the constant. It belongs to this outline: a boundary with more detail crosses its own simplification more often and would give a smaller fraction, and a nearly convex one would give a much larger one, up towards the whole band. And it is a fraction of area, not of queries — real query points cluster near boundaries, which is the essay’s own last limit, so the fraction of affected queries is higher than one in seven by an amount nothing here measures.

What survives both cautions is the shape of the estimate: the exposure is proportional to perimeter times tolerance, with a coefficient below one that is a property of the boundary’s own roughness. That coefficient is measurable on any real layer in one pass, at the moment the simplification is run, and it is the number a metadata field ought to carry beside the tolerance.

The curve crosses itself

The failure with the sharpest edge is topological, and it is the one that turns a data problem into a crash.

A curve that crosses itself, and did not before. A spiral whose turns are 0.08 apart, simplified at four tolerances. Douglas–Peucker replaces an arc with its chord as soon as the arc's own sagitta drops below ε, and the chord cuts inwards by about ε — so once ε is a small multiple of the gap, the chord reaches the next turn. The threshold is between 1.5 and 2.2 times the gap on every spiral tried. The algorithm has not broken its promise: the neighbouring turn is not one of the vertices it discarded, so its distance was never part of the test.
Fig. 6 A spiral whose turns are 0.08 apart, simplified at four tolerances. At 0.3 and 1.0 times the gap it is still a simple curve. At twice the gap it has two crossings, and at three times it has eight. Douglas–Peucker has not broken its promise: the neighbouring turn is not one of the vertices it discarded, so its distance was never part of the test.

The mechanism is a one-liner. The algorithm replaces an arc with its chord as soon as the arc’s own sagitta drops below ε, and the chord cuts inwards by about ε. If another part of the curve is nearer than that, the chord crosses it. The threshold was between 1.5 and 2.2 times the gap on every spiral tried, across three separations and three lengths.

A self-intersecting ring is not merely inaccurate. It has no well-defined interior, so the shoelace formula returns a difference of two areas rather than an area; point-in-polygon returns a parity rather than a membership; and most geometry libraries raise an error or, worse, do not. A river that crosses its own bank and an administrative boundary that ties itself in a knot are the same event, and both break the nearest-feature query that reads them, and both arrive from a tolerance chosen for how the map looks.

What the promise would have to say instead

It is worth writing down what a useful guarantee would look like, because the gap between it and the real one is the whole essay.

A tolerance that meant something for a stored geometry would bound the Hausdorff distance between the two curves, in both directions, in ground units. That is a stronger statement than Douglas–Peucker’s, and it is stronger in exactly the direction that matters: it constrains where the new line goes as well as where the old vertices were, so it excludes the chord that bridges a bay and the chord that cuts across a neighbouring turn.

Even that bound would not deliver the area or the containment answers. It would deliver a bound on the symmetric difference of the two regions — at most perimeter × ε — which is the aggregate statement the flip counts above obey, and which is genuinely useful for a total. It would still say nothing about any individual point.

And it would still not deliver simplicity. A curve within ε of a simple curve can cross itself: simplicity is not a continuous property of a curve, so no metric bound implies it. Preserving it takes a check, run against the rest of the geometry, at a cost that is why the plain algorithm does not include one.

what is promised what it bounds what it does not
discarded vertex to new segment the drawn displacement anything else on this row
symmetric Hausdorff the region’s symmetric difference any individual containment
topological check simplicity, self-intersection area, containment, length

Three different guarantees, three different costs, and one word — tolerance — used for all of them in the interfaces that offer them.

What was computed, and how

The outline is a closed curve with detail on it — a circle modulated by two harmonics — at 3,001 vertices, so that a tolerance a hundredth of its radius still has thousands of decisions to make. The probes are a 60 × 60 grid over its bounding box. The spiral is Archimedean with a stated turn separation, so the crossing threshold can be predicted before it is counted rather than discovered.

Every deviation reported is measured back from the original vertices to the simplified polyline, segment by segment with the projection clamped to each segment’s ends. Measuring to the infinite line through a segment instead is the classical statement of the algorithm and is not the bound it promises: the two differ exactly when a vertex projects past an endpoint, which is what a curve that runs out along its own chord and comes back does.

Two algorithms, the same number of vertices. The same curve reduced to 33 vertices two ways: Douglas–Peucker at ε = 0.02, whose tolerance is a distance, and Visvalingam–Whyatt with its area threshold tuned to keep the same count. The worst displacement is 0.0185 for the first and 0.0321 for the second, a factor of 1.73. Neither is better. They answer different questions, and only one of them is answering the question a tolerance in metres was asking.
Fig. 7 Two algorithms reduced to the same vertex count. Douglas–Peucker’s tolerance is a distance and Visvalingam–Whyatt’s is an area, so they cannot be given the same instruction; tuning the second until it keeps 33 vertices, as the first does at ε = 0.02, the worst displacement is 0.0185 for one and 0.0321 for the other. Neither is better. They answer different questions, and only one of them is answering the question a tolerance in metres was asking.

Where the model stops

Douglas–Peucker and Visvalingam only. Real cartographic generalisation is much more than vertex reduction: it displaces features so they do not collide, merges them, exaggerates them so they stay visible, and selects among them. Every one of those operations breaks more guarantees than these two do, and none of them is measured here.

No topological repair. Production pipelines run a validity check after simplifying and fix what it finds, and a good one uses a topology-preserving variant that never introduces a crossing in the first place. The point of the spiral is not that crossings are unavoidable; it is that the plain algorithm’s guarantee does not exclude them, so anyone relying on the guarantee alone is relying on something it does not say.

One shape and one spiral. The flip counts scale with perimeter × ε and the crossing threshold with the separation between the parts of the curve, and both of those are statements about any curve. The specific numbers — fifty-one flips at ε = 0.032, a crossing at twice the gap — belong to these two objects. What transfers is the shape of the dependence, not the constants.

And the containment probes are uniform. Real query points are not spread evenly over a bounding box — they cluster where people are, which is often near boundaries because boundaries follow rivers and roads. The fraction of real queries affected is therefore higher than the fraction of area affected, by an amount nothing here measures.

The generalisation

An approximation’s error bound is stated in one quantity, and every other quantity derived from the approximation has its own error, which does not follow. That is a general fact about bounds and it is why numerical analysis distinguishes forward error from backward error at all.

What makes the cartographic case instructive is how reasonable the substitution feels. A boundary moved by less than a fifth of a millimetre on the page is, in the ordinary sense, the same boundary. The area is a fifth of a millimetre different, the containment answers are a fifth of a millimetre different, and the curve is a fifth of a millimetre from being simple — but “a fifth of a millimetre from being simple” is not a thing. Some properties degrade continuously with the perturbation and some are binary, and a bound on the perturbation says nothing about the second kind.

There is a second habit underneath it, and this collection has now met it three times. A check that measures the approximation with the approximation’s own metric cannot fail for the one reason the promise could. The bound above is measured to the segment, not to the infinite line through the segment, and the difference between those two measurements is invisible on every ordinary curve and unbounded on a curve that doubles back. A validation suite written by whoever wrote the algorithm, on the same afternoon, tends to reach for the same expression — and then it agrees with itself.

The transferable habit: when an approximation is introduced, list the quantities that will be read off it afterwards, and check each one separately, with a measurement that does not share the approximation’s arithmetic. The list is usually longer than the person choosing the tolerance expects, and it usually includes at least one property that has no continuous version.

Who found it, and when

The area and topology failures were noticed within a decade of the algorithm’s publication. The topology-preserving literature begins in earnest with Alan Saalfeld’s 1999 paper on making Douglas–Peucker preserve simplicity, which adds a check against the neighbouring geometry that the original had no reason to include — the original was written for a single line, and the failure only exists between lines or between a line and itself.

Visvalingam and Whyatt published their area-based rule in 1993 in The Cartographic Journal, arguing explicitly that the distance criterion keeps the wrong things: it preserves spikes because a spike is far from a chord, while an eye reading a coastline is following the large shapes. That argument is about what a map is for, and it is why the two algorithms coexist rather than one having replaced the other.

The containment consequence has no single citation, which is itself informative. It surfaces in land-administration practice as the rule that boundaries of legal effect are not generalised, and in statistical geography as the practice of publishing a high-resolution boundary set for analysis and a low-resolution one for display, with the two carrying different identifiers so nobody joins across them.

Where the ladder goes next

This anchor now has its three rungs: a length that depends on the ruler, an operation that does not commute with the projection, and a tolerance that promises less than it appears to. What it has not done is put a number on the benefit — the bytes saved, the drawing time bought — against which every one of these costs is traded. That comparison needs the display side of the collection, where the tile pyramid already measures what a level of detail costs to serve.

What this makes readable

Essays that name this one as a prerequisite.

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 11 that link here.

The objects this essay names

Each one links to every other essay that touches it.

AreaContainmentConvexityGeneralisationMeasurementPolygonPolylineSelf intersectionSimplificationToleranceTopologyValidation