The attribute is a claim about the geometry
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.
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
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
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
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
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.
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.
- One number changed and the whole map moved aggregation · areal factor · convention · equal-area
- The class breaks were computed on the page aggregation · areal factor · equal-area · thematic mapping
- The same number of cells, in two shapes aggregation · area · resolution · validation
- A boundary that two features share area · convention · generalisation
- A cartogram keeps the shapes it inflates area · equal-area · thematic mapping
- A choropleth is read by area areal factor · equal-area · thematic mapping
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