Paths and directions

Nearest of many is a partition

One reach question with one source is a disc. With several sources it is a division of the whole surface, every place belonging to whichever source is nearest — and computing that division in the plane the data is stored in hands away between 0.75 and 22.16 per cent of the ground, in unbroken strips up to 1,591 kilometres across.

The previous rung drew the simplest reach set there is: everywhere within a distance of one place. Real reach questions almost never have one source. They have a hospital and eleven other hospitals, a depot and forty other depots, a transmitter and the rest of the network — and the question is not what is within but which one is nearest.

That is a different object. With one source the answer is a disc and its edge is a range ring. With several the answer is a partition: every place on the surface belongs to exactly one source, the boundaries are the places that tie, and there is no ring anywhere. The whole sphere is divided, with nothing left over.

Which of eight places is nearest, decided on the ground and decided on the page. Every cell of the window shaded by which of eight places across Europe is nearest on the ground, with the cells the page's own answer would hand to a different site drawn in the failure colour. Plate carrée misassigns 13.67 per cent of the window's ground area — 3,058 thousand square kilometres. The misassigned cells are not scattered: they lie in bands along the boundaries, which is what a systematic error looks like and what a sampled test of a few query points is least likely to find.
Fig. 1 Which of eight European places is nearest, computed on the ground and shaded by site, with every cell the page’s own answer would hand to a different site drawn in the failure colour. The plate carrée gives away 13.70 per cent of the window’s ground area — three million square kilometres.

What the page does to it

The ground partition is a well-defined thing with no projection in it. Distance is geodesic distance, the set equidistant from two places is the great circle whose plane bisects the chord between them, and the region belonging to one site is the intersection of the half-spaces it wins.

The partition a computer produces is usually not that. It is computed in the plane the coordinates happen to be stored in — longitude and latitude read as x and y, or Web Mercator metres, or whatever the file’s projection is — because every spatial library has a fast planar nearest-neighbour routine and none of them asks what surface the numbers came off. Whether a nearest-neighbour query returns the right answer depends on the metric is the version of this the dataset ladder measured, and it asks about one query point at a time.

A partition is not a query. It is the whole surface at once, and the failures it can have are failures a set of test queries is least likely to find.

The boundary between two places, twice

The places equidistant from London and Madrid, and the line a page draws instead. On the ground, the set equidistant from two places is a great circle — the one whose plane bisects the chord between them — drawn here solid. In the plane the map is stored in, the same set is the perpendicular bisector of the two page points, drawn dashed. They agree at the midpoint and part everywhere else, and every point between them is a place the page assigns to the further of the two.
Fig. 2 The places equidistant from London and Madrid on the ground — a great circle, drawn solid — against the perpendicular bisector of the same two places on the page, drawn dashed. They agree at the midpoint and part everywhere else.

Everything follows from one picture. On the ground, the set equidistant from two places is a great circle: it is the intersection of the sphere with the plane that perpendicularly bisects the chord, so it is as large as a circle on the sphere can be, and it passes over the pole for two places on the same parallel.

On the page, the set equidistant from the two projected points is a straight line: the perpendicular bisector, which is what a planar algorithm computes.

The two agree at exactly one place — the midpoint — and diverge in both directions from it. Every point in the gap between them is a place the page assigns to the site that is genuinely further away.

There is no projection on which the two coincide in general, and the reason is worth stating precisely. To draw the ground bisector as the page bisector, the map would have to send great circles to straight lines and preserve the ratio of distances along them. The first is the gnomonic’s own property and no other projection’s; the second the gnomonic emphatically does not have, and what the gnomonic buys and what it costs is the whole subject of that essay.

Twelve projections, scored in ground area

The ground a nearest-site partition gives away, projection by projection. A nearest-site partition of eight places across Europe computed in each projection's plane, scored against the partition computed on the ground, and weighted by exact cell area so the answer is square kilometres rather than a count of samples. Conformal conic gives away 0.77 per cent and Lambert cylindrical 22.14, a factor of 28.8. Nothing returns zero, and the ranking is not the ranking any of this site's distortion measures would give.
Fig. 3 The ground each projection’s own partition hands to the wrong site, weighted by exact cell area rather than counted in samples. Nothing returns zero.

The window is Europe from 25° west to 45° east and 30° to 72° north, sampled at 300 by 240 and weighted by the exact closed-form cell area R²Δλ(sin φ₂ − sin φ₁) — which is the site’s standing rule about areas and matters more here than usual, because a count of samples over a latitude–longitude grid would over-weight the north by a factor of three across this window alone.

projection ground misassigned thousand km²
conformal conic 0.75% 168
Albers 1.63% 365
Mercator 4.85% 1,086
sinusoidal 5.48% 1,226
Winkel tripel 7.02% 1,569
Mollweide 8.62% 1,928
Robinson 10.15% 2,270
Eckert IV 11.20% 2,504
plate carrée 13.70% 3,065
Lambert cylindrical 22.16% 4,956

The spread is a factor of 29.5 between best and worst, and the worst is 4.96 million square kilometres — half the area of Europe, assigned to the wrong site by a step nobody in the pipeline thinks of as a modelling decision.

The two at the top are the two projections fitted to this region rather than to the world: a conic with its standard parallels chosen for the latitudes in question and its equal-area partner. They are not perfect. A conformal conic still misassigns 168,000 square kilometres, because conformality is a statement about angles at a point and a bisector is a statement about two points.

The same eight places, the worst map

Which of eight places is nearest, decided on the ground and decided on the page. Every cell of the window shaded by which of eight places across Europe is nearest on the ground, with the cells the page's own answer would hand to a different site drawn in the failure colour. Lambert cylindrical misassigns 22.14 per cent of the window's ground area — 4,953 thousand square kilometres. The misassigned cells are not scattered: they lie in bands along the boundaries, which is what a systematic error looks like and what a sampled test of a few query points is least likely to find.
Fig. 4 The same eight places on the Lambert cylindrical, which is exactly equal-area. Nearly a quarter of the window is handed to the wrong site, and the failure colour covers whole countries rather than edges.

Drawing the worst case beside the hero makes one thing plain that no percentage does: at 22.16 per cent the misassignment is no longer a fringe along the boundaries. It is a set of wedges wide enough to hold a country, and it is worst in the north, where the projection compresses latitude hardest and the page’s idea of closer has least to do with the ground’s.

The projection responsible is not a bad projection. The Lambert cylindrical is exactly equal-area — the areal factor is 1.000000 everywhere, which this site has checked at several hundred points — and it is the natural choice for anything that sums a quantity over ground. A pipeline that picked it for that reason, and then computed a catchment partition in the same coordinates because they were already there, would have taken the best available decision followed by the worst, with no step in between that looked like a decision at all.

The ranking is not the distortion ranking

Ranked by distortion, and ranked by the ground its partition gives away. The same eleven projections in two orders: the site's own regional distortion score on the left, worst at the bottom, and the ground a nearest-site partition misassigns on the right. Spearman's correlation between them is 0.791, so they agree broadly and not in detail. Mercator moves 6 places, because a conformal map keeps the two bisector directions right at every point and still puts the crossing in the wrong place. A distortion score is an average over a region; a misassignment is a measurement at the boundaries, and a boundary is where neither average is evaluated.
Fig. 5 The same projections in two orders — the site’s own regional distortion score on the left and the ground their partitions give away on the right — joined place to place. Spearman’s correlation is 0.791.

This site already ranks projections over a region, by the Airy and Kavrayskiy criteria that the choosing ladder is built on. Rank these eleven both ways and the orders are related without being the same: Spearman’s ρ is 0.791.

The projection that moves is Mercator, from ninth of eleven on distortion to third on misassignment — six places. That is not noise, and the reason is exact. A conformal projection has zero angular deformation everywhere, so at every point the page’s idea of perpendicular is the ground’s idea of perpendicular. The bisector of two page points is therefore drawn in very nearly the right direction; what is wrong is where it crosses, because the scale at Oslo is 1.6 times the scale at Madrid and the midpoint of the two page positions is not the page position of the midpoint.

Mercator is bad at areas and good at this. The Lambert cylindrical is exact at areas and worst at this by a factor of 4.6 over Mercator. Neither of the two properties this collection spends most of its time measuring predicts which projection divides ground correctly, which is the same lesson the operation decides the coordinate system reached from the other direction: score the projection on the operation, not on its reputation.

The error is a strip, not scatter

How wide the misassigned strip is, in kilometres of ground. The widest unbroken run of misassigned ground in any latitude row of the window, converted to a ground distance. The fraction of a window is the honest headline and it hides this: the error is a strip along each boundary rather than scatter, and the strip is 1591 kilometres across on Mercator. A place inside it is assigned to a site that is genuinely further away, by a margin that grows with the width.
Fig. 6 The widest unbroken run of misassigned ground in any latitude row, converted to kilometres. On Mercator it is 1,591 km across; on a conformal conic fitted to the region, 267.

A percentage of a window says how much and not where, and where is what decides whether the number matters. Measured as the widest unbroken run of misassigned cells in a latitude row:

projection widest strip at
conformal conic 267 km 62.7°
Albers 487 km 45.6°
Mollweide 1,494 km 45.8°
plate carrée 1,494 km 45.8°
Lambert cylindrical 1,532 km 45.8°
Mercator 1,591 km 45.8°

Every one of those is a contiguous band of ground on which the answer is wrong, and a band is the worst possible shape for the error to take when the check is a set of test points. Scatter is caught by any sample; a band is caught only by a sample that happens to fall in it, and a band 1,591 kilometres wide at 45.8° north contains a great many places that all get the same wrong answer.

The conformal conic’s strip is not merely smaller — it is somewhere else, at 62.7° rather than 45.8°, which says the strips are properties of which boundary is worst on this map rather than of the region. Fitting the projection to the region does not shrink one error uniformly; it moves the failure to a different boundary.

Where the ground is lost, band by band

Where Plate carrée gives the ground away. The same partition, scored band by band. The error is not spread evenly and is not largest where the projection's own distortion is largest: it is largest where a boundary happens to run, which is a property of where the places are rather than of the map. The worst band here is 66–72° at 57.27 per cent.
Fig. 7 The same partition scored in six-degree latitude bands. The error is not a smooth function of latitude and is not largest where the projection’s distortion is largest — it is largest where a boundary happens to run.

Broken into latitude bands, the misassignment is spiky rather than smooth:

band Mercator plate carrée Lambert cylindrical
30–36° 0.63% 2.28% 4.05%
36–42° 0.24% 0.68% 4.70%
42–48° 13.57% 14.25% 28.79%
48–54° 0.23% 2.94% 14.41%
54–60° 2.79% 10.93% 16.72%
60–66° 12.66% 40.21% 50.99%
66–72° 9.02% 57.30% 74.67%

Two different things are visible in that table and they should not be conflated.

The peaks are about the places. Mercator’s 13.57 per cent at 42–48° is a boundary running through that band, not a property of Mercator at 45° north. The band above it is 0.23 per cent, and the projection’s distortion did not change between them.

The trend is about the projection. The plate carrée and the Lambert cylindrical both rise steeply toward the pole, reaching 57 and 75 per cent in the top band, because their east–west scale error grows without bound while Mercator’s is isotropic at every point. The projections with a preferred direction fail worse where the direction matters most.

Why the check has to be the whole surface

There is a tempting shortcut, and it is what most implementations do when they check at all: take a sample of query points, ask each one on the ground and on the page, and report the disagreement rate. That is exactly the measurement the dataset ladder made, and it found 5 of 400 queries disagreeing over Europe on Web Mercator against 103 of 400 on the plate carrée.

Those numbers are correct and they answer a different question. A rate of disagreeing queries is a property of the query distribution — scatter the queries differently and the rate changes, with the partition untouched. The ground area misassigned is a property of the partition itself, and it is the quantity that survives being asked about a different set of queries.

The two come apart hardest exactly where it matters. A 1,591-kilometre strip contains a great deal of ground and, if the queries are drawn from population, very few queries: the strip runs through the North Sea and the Alps. Sample by population and the defect is invisible; sample by area and it is a quarter of the map. Neither sample is wrong — they measure different things, and only one of them is a property of the map.

The set of places that costs exactly nothing

The same projection, four sets of places, and one of them costs nothing. Mercator scored against four site sets. Three places on the equator are partitioned exactly right — 0.0e+0 per cent — because every boundary between them is a meridian, and a cylindrical projection puts a meridian at a page position that depends on longitude alone. Three places on one meridian are not: 5.85 per cent, because the set equidistant from two places on a meridian is a great circle that crosses every parallel, and not the parallel between them that the page draws.
Fig. 8 Mercator scored against four sets of places. One of them is partitioned exactly right, and it is not the one that was expected.

An error that is never zero is suspicious, because it might mean the measurement cannot return zero. So the check is a set of places a cylindrical map must divide correctly.

The obvious candidate is three places on one meridian: the boundaries between them ought to be parallels, and a cylindrical projection draws parallels as horizontal lines at positions that depend on latitude alone. That reasoning is wrong, and the machinery said so before this essay was written. The set equidistant from two places on the same meridian is a great circle through the midpoint perpendicular to that meridian, and a great circle crosses every parallel unless the two places are symmetric about the equator. Mercator misassigns 5.76 per cent of that window.

The set that works is three places on the equator. Their boundaries are meridians — the whole great circle through the pole, by reflection symmetry — and every cylindrical projection puts a meridian at a page position that depends on longitude alone, linearly. So the ground boundary and the page boundary are the same line and the misassignment is 0.00 per cent, exactly, to every digit the sampler can produce.

That is the refusal this rung needs. The measurement is capable of returning zero, it returns zero for the case where the page and the ground share a symmetry, and every other number above is therefore a measurement rather than an artefact of the sampler.

What the set of places does to the answer

The same projection scored over four sets:

set Mercator misassigns
three places on the equator 0.000%
six places above 55° north 2.91%
eight places across Europe 4.85%
three places on one meridian 5.76%
seven places across the world 13.89%

The answer is a property of the pair — the projection and the arrangement of places — not of either alone. That is the same shape of finding as whether the average of a region’s indicatrices is more or less deformed than the average deformation, which turns on whether the region’s ellipses point the same way rather than on any single projection’s behaviour.

The Nordic set is the interesting row. It sits at the latitude where Mercator’s distortion is worst in this window and it produces less misassignment than the European set, because the six places are close together and a partition of nearby places has short boundaries. A boundary that is short does not have room to diverge.

What decides whether it matters

Nothing above says a misassigned partition is a serious defect, and often it is not. Three things decide:

How far the wrong answer is. A place in the strip is assigned to a site that is genuinely further away, and the excess is small near the middle of the strip’s length and grows toward its ends. A partition used to colour a map is barely affected; one used to route a vehicle is affected by exactly the excess distance.

Whether the boundaries are where the people are. Half the ground in this window is sea. A partition error over water costs nothing at all, and the same 4.85 per cent could be catastrophic or irrelevant depending on where it falls — which is not a question the geometry can answer.

Whether anything downstream sums over the region. A partition used to aggregate — population per catchment, demand per depot — inherits the error as a systematic transfer between neighbouring cells, and neighbouring cells are the ones most likely to be compared with each other.

Whether anybody will ever check. A partition is produced once, at the start of an analysis, and everything downstream inherits it. Nothing about the output says which plane the bisectors were drawn in, and — as a map does not say what it is puts it for projections generally — the file carries the numbers and not the reasoning that produced them.

What a producer should ship beside the partition

Four questions decide whether the error matters and none of them can be answered by the geometry, which sounds like a dead end and is not. It points at a deliverable.

The strip is computable by whoever makes the partition, and it is the second layer they should publish. Drawing the bisectors in two planes and taking the symmetric difference gives the set of places whose assignment depends on which plane was used. That is not an estimate of the error; it is the error’s footprint, exactly, for those two planes — and it is one extra run of a computation already written.

What it buys is that every one of the four questions becomes answerable downstream by somebody who has the context the producer lacks. Overlay the strip with a population raster and the are the boundaries where the people are question has a number. Overlay it with the catchment being aggregated and the systematic-transfer question has a bound. A routing application can flag a journey that begins inside it.

And it converts a silent error into a declared uncertainty, which is the difference between a file that carries the numbers and a file that carries what the numbers mean. A partition shipped alone asserts a boundary. A partition shipped with its strip asserts a boundary and admits where the assertion is a choice.

The cost is small enough to be worth stating: one more pass of the same bisector construction, and a polygon layer whose area here is 4.85 per cent of the window. The reason it is not done is not expense — it is that the producer never learns the strip exists, because the partition they made looks exactly like the partition they should have made.

What this rung adds, and what is left

The disc rung established that a page distorts the shape of a reach set. This one establishes that with several sources the failure is not a shape at all: the boundaries are in the wrong place, the error is a strip with an area and a width, and the projection that minimises it is not the one that any distortion score nominates.

Both rungs have used a reach set with a sharp edge — inside or outside, this site or that one. The third and last rung of this ladder takes a set defined by a distance from a line rather than from a point, which is the corridor every buffer operation in every spatial database produces, and finds two things: that the page’s version of it has a width that varies along its length, and that the closed form for its area stops being the area at a radius that can be computed exactly.

Named alongside this one

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

What links here

Every essay whose body links to this one.

The objects this essay names

Each one links to every other essay that touches it.

AreaBoundaryConformalityEqual-areaGreat circleMetricNearest-neighbourPartitionProjection selectionRankingReachRegion