What a machine does with it

The attribute is a claim about the geometry

Fourteen essays price what a stored coordinate means and not one asks what the number stored beside it means. A rate is a quantity divided by an area, the area belongs to the geometry, and no format records which area — so a simplification that moves the outline by nothing visible moves the implied total by 1.55 per cent, an unweighted average of densities is 4.09 per cent out, and a choropleth gives a polar square kilometre fifteen times the ink of an equatorial one.

This ladder has spent fourteen essays on what a stored coordinate means. Without its system it is not a location; a straight segment is a claim about a plane; inside is a claim about the edges; a polygon on a sphere has no outside.

Every one of those is about geometry. Almost every polygon in every real dataset carries something else: attributes, and a large share of them are rates. Population per square kilometre. Yield per hectare. Cases per hundred thousand. A rate is a quantity divided by an area, the area is the geometry’s, and no format anywhere records which area it was divided by.

What simplifying a boundary does to the number stored beside it. One region, simplified at five tolerances, with the error in the two quantities a consumer computes from the pair. If the density was stored, the total it implies moves by exactly the area's error — -1.55 per cent at the loosest tolerance. If the total was stored, the density it implies moves the other way by the same amount. Nothing in the file says which of the two was measured and which is being derived, and the simplification is normally done by a tool that never opens the attribute table.
Fig. 1 One region, simplified at five tolerances, with the error in each of the two quantities a consumer computes from the stored pair. If the rate was stored, the total moves; if the total was stored, the rate moves; and the file does not say which was measured.

Three kinds of number, and only one of them is safe

The distinction is old and is worth restating in this ladder’s terms.

An extensive quantity is a property of the region as a whole: a count, a total, a sum. It survives any operation that does not change which ground the region covers, because nothing about it refers to the geometry’s size.

An intensive quantity is a ratio whose denominator is the geometry: a density, a rate, a per-unit-area mean. It stops being true the moment the area moves.

A derived quantity is computed from both and inherits the worse of the two.

The three are stored in the same column of the same table with the same type, and nothing in any common format distinguishes them. GeoJSON has no notion; a shapefile’s DBF has no notion; a database column of type real has no notion. The distinction lives entirely in a field name and in whoever reads it.

Where the area came from in the first place

Before an operation can move a denominator there has to be one, and the ladder has already measured how badly that goes.

The area a rate was divided by is a number somebody computed, and computing an area needs a surface found that a shoelace over a ring of coordinates returns 1.75 times the true area if the coordinates are read as degrees, 3.06 in a conformal plane, and the closed form only in an equal-area one — while the closed form itself is 0.45 per cent out for treating the Earth as a sphere.

So a published density is a quantity divided by one of at least four different numbers, chosen by whoever produced it, and differing by up to a factor of three. That is a larger error than anything measured in this essay, and it is a different failure: this rung is about a rate that was correct when written and stops being correct when the file is processed. Both can be present at once, and neither is recorded.

The two are worth keeping apart because their fixes differ. A wrong denominator is fixed by computing the area on the right surface, once, at the source. A moved denominator cannot be fixed at the source at all — it is created downstream, by a tool that had no reason to look.

Simplification, which moves the denominator

The same region at four levels of detail, drawn in an equal-area projection. The boundary as stored and simplified at three tolerances, drawn in Albers so the areas on the page are the areas on the ground. The outlines are hard to tell apart, which is what a simplification tolerance is chosen to achieve — and the enclosed area moves by -1.55 per cent, from 96 vertices to 20. A picture that looks unchanged and an attribute that is no longer true is the whole of the problem.
Fig. 2 The same region as stored and simplified at three tolerances, drawn in an equal-area projection so page areas are ground areas. The outlines are almost indistinguishable, which is what a tolerance is chosen to achieve.

Take one region of 96 vertices carrying a density of 120 per square kilometre, and simplify it:

tolerance vertices area moves by so a stored rate implies a total out by and a stored total implies a rate out by
0.02° 80 +0.031% +0.031% −0.031%
0.05° 64 −0.055% −0.055% +0.055%
0.1° 46 −0.145% −0.145% +0.145%
0.2° 29 −1.380% −1.380% +1.399%
0.4° 20 −1.548% −1.548% +1.572%

The last row removes three-quarters of the vertices and changes the outline by nothing a reader would notice — which is the entire purpose of a simplification tolerance, and is what a tolerance is a promise about: the picture, not the area.

It changes the enclosed area by 1.55 per cent. So a consumer computing a population from the stored density gets a number 1.55 per cent wrong, and one computing a density from a stored population gets a number 1.57 per cent wrong in the other direction — from a file whose geometry and whose attribute table are both, individually, exactly as they were written.

And the operation is normally performed by a tool that never opens the attribute table. Simplification is a geometry operation. It has no reason to look at the columns, no way to know which of them are intensive, and no vocabulary in which to record that it has invalidated one.

Reprojection, which changes nothing and looks like it should

The area of one 20° × 10° cell at 50–60° north, seven ways. The cell has an exact area — R²Δλ(sin φ₂ − sin φ₁), 1,416,580 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.45 per cent away from all three, because the sphere is a model. Taking the shoelace in Mercator gives 3.06 times too much, and treating degrees as a length gives 1.75 times — about sec φ at the cell's middle, which is where that error comes from.
Fig. 3 The three answers a shoelace gives for one cell, depending on which plane its coordinates are read in. Reprojection moves the coordinates between those planes and moves no ground at all.

One operation belongs in this list and turns out not to: reprojection.

Moving a dataset from one projection to another moves every coordinate and changes no ground area whatever, because both projections describe the same places. So a density stored beside a polygon is exactly as true after a reprojection as before, and the operation that looks like it should invalidate an area-based attribute is the one that does not.

What reprojection does change is the area a naive tool will compute. A shoelace over the new coordinates returns the area of the new plane’s polygon, which is the ground area times the projection’s areal factor — and that number is what a great many pipelines then divide by. The failure is real and it is a different one: not the attribute going stale, but the recomputation being done in the wrong plane, which is the operation deciding the coordinate system with the decision made by accident.

The distinction matters because the two have opposite fixes. Against a stale attribute, recompute. Against a wrong-plane recomputation, do not recompute — use the number that was written down, which was right.

Aggregation, which weights the numerator

Why the mean of a set of densities is not the density of their union. The area of one cell of a latitude–longitude grid, band by band: it falls as cos φ, so the polar cells are a fraction of the equatorial ones. An unweighted mean of the densities in those cells gives every cell the same vote, which gives every square kilometre in a polar cell more vote than one in an equatorial cell. Over a 30° to 70° band with a density rising towards the pole, the unweighted mean is 210.0 and the true density of the union is 201.7 — 4.09 per cent apart, in a direction the grid decides.
Fig. 4 The area of one cell of a latitude–longitude grid, band by band. An unweighted mean of densities over such a grid gives every cell one vote, and the cells are not the same size.

The second operation is combining regions, and the arithmetic error here is so common that it is nearly the default.

The density of a union is the sum of the quantities divided by the sum of the areas. The unweighted mean of the densities is not that, and the two agree only when the areas are equal.

On a latitude–longitude grid they are never equal. Over a band from 30° to 70° north with a density rising towards the pole:

  • the unweighted mean of the cell densities is 210.0
  • the true density of the union is 201.7
  • a gap of 4.09 per cent

and the direction is decided by the grid rather than by the data: the polar cells are the small ones, an unweighted mean over-weights them, so any quantity correlated with latitude is biased. On cells of equal area the two agree to nine decimal places, which is the check that the error is the cells and not the arithmetic.

Computing an area needs a surface is the same finding one level down: the closed-form cell area R²Δλ(sin φ₂ − sin φ₁) is what makes the weighted answer available at all, and it is exactly the quantity a naive mean throws away.

Being drawn, which multiplies the ink

Ink per unit of ground, between the equator and 75° north. A choropleth colours a region and a reader integrates the colour over the page, so what a quantity receives is its true share times the projection's areal factor. The ratio of that factor at 75° north to its value at the equator: exactly one for the equal-area members, 14.9 for Mercator. A density map on that projection gives a polar square kilometre fifteen times the ink of an equatorial one, before any colour is chosen.
Fig. 5 The ratio of a projection’s areal factor at 75° north to its value at the equator. Exactly one for the equal-area members; 14.93 for Mercator.

The third operation is display, and it is the one this collection is best placed to price.

A choropleth colours a region by its attribute, and a reader does not measure the colour at a point — they integrate it over the page. What a quantity receives, in the only currency a reader has, is its true share multiplied by the projection’s areal factor.

projection ink at 75° ÷ ink at the equator
Mollweide 1.000000
Lambert cylindrical 1.000000
Robinson 2.01
plate carrée 3.86
Web Mercator 14.74
Mercator 14.93

A density map on Web Mercator gives a polar square kilometre nearly fifteen times the visual weight of an equatorial one before any colour is chosen. That is the mechanism behind every argument about what a world map exaggerates, applied to an attribute rather than to a country — and it is the one of the three failures that is entirely fixed by a choice this site can name: use an equal-area projection, and the factor is exactly one.

Equal ground, unequal ink, in Mercator. Cells of equal ground area — ten degrees of latitude by twenty of longitude is not equal area, so each cell here is shaded by its own areal factor rather than drawn as a fixed quantity. The point of the picture is the page: whatever is put in these cells, the reader's eye receives it in proportion to the space it occupies here, and the space is the ground times the areal factor. This is the mechanism behind every argument about what a world map exaggerates, applied to an attribute rather than to a country.
Fig. 6 Cells of ten degrees by twenty, shaded by their own areal factor in Mercator. Whatever is put in a cell reaches the reader in proportion to the space it occupies here.

The three compared

The three failures are the same failure — an area moved and a number did not — and they are very different sizes.

operation what moves size, in this measurement
simplification the denominator 1.55%
aggregation the weighting 4.09%
drawing the reader’s integral up to 1,393%

Drawing is worse than the other two put together by three orders of magnitude, and it is the only one anybody argues about. Simplification and aggregation are silent: no picture changes, no test fails, and the number is out by a per cent or two in a direction correlated with latitude — which is exactly the size and shape of error that survives review.

What would fix each

For drawing, an equal-area projection, and the fix is complete. The areal factor is exactly one, so ink is quantity. That is the whole of it, and it is the argument the projection that shows true size had to disentangle from a slogan.

For aggregation, weight by area — and get the area right. A weighted mean needs a cell area, the cell area needs a surface, and using a planar area computed from stored longitudes and latitudes reintroduces the error it was meant to remove.

For simplification, store the extensive quantity. A total is a measurement of a region and a rate is an inference about one; A population survives any geometric operation because nothing about it refers to the geometry; a density does not. Where both are wanted, store the total and compute the rate on demand — which costs one division and removes the whole class of failure.

That third recommendation is the useful one, because it is a change to a data model rather than to a pipeline. It is also nearly the reverse of what is usually done: rates are stored because they are what gets displayed, and totals are recomputed when needed, which is the direction that loses. The reason it is done that way is worth naming rather than deploring: a rate is what a cartographer wants at the moment of drawing, and a format that stores what is drawn is easier to use for the one job it was made for. Every one of the failures above is the price of that convenience, paid downstream by somebody who did not choose it.

What a consumer can check

Nothing above is detectable from a single file, and that is the practical difficulty. Three checks that are available anyway.

Recompute the area and compare it with the one implied. If a file carries both a total and a rate, dividing one by the other gives the area whoever wrote it used. Comparing that with the area computed on the ellipsoid says immediately which surface they were on and whether the geometry has moved since. Files carrying both are the minority and are the only ones where this works.

Check whether the totals add up. An extensive quantity over a set of regions should sum to the quantity over their union. If a dataset carries a national total as well as regional ones, the sum is a test — and a failure says a geometry moved, an aggregation was unweighted, or a region is missing, without saying which.

And look at the vertex counts. A dataset whose polygons have suspiciously round vertex counts, or whose outlines are visibly polygonal at the scale they are drawn, has been simplified, and any rate in it was computed before or after that step. Which of the two is not recorded and changes the answer by the amounts in the table above.

What a format would have to say

None of this can be fixed by a checker, and it is worth saying why.

A validator can look at a geometry and say whether it is closed, whether it self-intersects, whether its winding is consistent. It cannot look at a column of numbers and say whether they are intensive. pop_dens and pop_total are strings in a header, chosen by whoever wrote the file, and the arithmetic that would have to be different depends entirely on which one is meant.

What would fix it is a declared unit, which is a field almost no spatial format has. A column declared as people is extensive; a column declared as people / km² is intensive; and from those two declarations every operation above can decide what to do without being told. A projected coordinate declares five things and hides four of them is the same complaint about the geometry side, and the same fix — put the metadata where the number is — applies unchanged.

Until then the rule is the one a reader can apply: an attribute with a division in it is a claim about the geometry it arrived with, and any operation that changes that geometry’s area has silently changed the claim. The ladder’s first rung said a coordinate without its system is not a location; the same sentence is true one column to the right, and there is even less metadata to hang it on.

The fourth way the denominator moves, which is nobody’s operation

Three operations move the geometry and each has somebody performing it. There is a fourth mechanism with no operator at all, and it is the one that makes the storage recommendation more than a tidiness argument.

The geometry is revised between editions. A national boundary dataset is re-surveyed, a coastline is recaptured from better imagery, a municipal amalgamation redraws a line, a sliver is corrected. None of that is a transformation applied to the data by a consumer — it is the producer publishing a better version of the same region — and every one of them changes the area.

A stored rate does not know. The attribute was computed against last edition’s polygon and is shipped beside this edition’s, and nothing in the file records which geometry the division was performed against. There is no operation to audit, no pipeline step to fix, and no version of the number that was ever wrong at the moment it was written.

The size is not negligible. Coastline recapture at a better resolution routinely moves a coastal region’s area by a fraction of a per cent to several per cent — the same range as the simplification and aggregation effects measured above — and it moves it systematically, since a finer capture of a fractal boundary tends to move area in a consistent direction for a given region’s shape.

It is also the mechanism with the longest reach, because a geometry revision is published deliberately and widely. Every consumer who updates their boundary layer — which is the responsible thing to do — silently repoints every stored rate they hold at a denominator it was not computed against, and the more diligent they are about staying current the more of their attributes go stale.

An extensive quantity is immune to this one as well, and that is the argument that should settle the storage question. Storing a total rather than a rate does not merely remove the three operations; it removes the whole class of ways the denominator can change, including the ones nobody in the pipeline performed. A count of people is true of a region however that region’s outline is later revised. A count of people per square kilometre is true of one particular polygon, and the polygon is not shipped with it.

What this rung establishes

A rate stored beside a shape is not a property of the region. It is a ratio whose denominator is the geometry, and three ordinary operations move that denominator: simplification by 1.55 per cent at a tolerance chosen to be invisible, aggregation by 4.09 per cent through unweighted averaging on a latitude–longitude grid, and drawing by up to a factor of 14.93 through the areal factor.

Only the third is visible and only the third is argued about. The first two produce no picture and fail no test, and both are biased with latitude rather than scattered.

Reprojection, which looks like the dangerous one, is safe. It moves every coordinate and no ground, so the attribute stays true — and the failure that follows a reprojection is a recomputation done in the new plane rather than the attribute going stale, which has the opposite remedy.

And an extensive quantity survives all three. Storing the total rather than the rate removes the whole class, costs one division at read time, and is the reverse of what is normally done.

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

Every essay whose body links to this one.

The objects this essay names

Each one links to every other essay that touches it.

AggregationAreaAreal factorConventionCoordinate semanticsEqual-areaGeneralisationRateResolutionSimplificationThematic mappingValidation