The antimeridian is a cut in the numbers
Longitude runs from −180 to 180 and then starts again. That is not a fact about the Earth; it is a fact about how the numbers were laid out, and it is unavoidable in a way that almost nothing else in this field is.
Three failures, measured
The rectangle spans 170° east to 170° west, twenty degrees of longitude and twenty of latitude, and its true area from the closed form is 4,920,667 square kilometres.
The bounding box. Taking the minimum and maximum of the raw longitudes gives −180 to 179.375, a box 359.4 degrees wide against the shape’s twenty — a factor of 18. Every operation built on bounding boxes inherits it: a spatial index says the feature is everywhere, an intersection test says it touches everything, and a viewport test says it is always on screen.
The planar area. The shoelace over the raw numbers gives 6,800 square degrees against the true 400 — seventeen times too large — because the ring, traced in the numbering, encloses the complement: everything except the shape. The number is not noise; it is the area of the rest of the world at that latitude band.
The interpolation. The midpoint of a segment from 170°E to 170°W, computed by averaging, is 0° — which is 20,015 kilometres from the true midpoint at 180°. That distance is half the Earth’s circumference, and it is exact rather than approximate: the computed midpoint is the antipode of the correct one, always, for any segment across the seam whose endpoints are symmetric about it.
Why the exactness is worth noticing
Most failures in this field are matters of degree — a factor of three here, a few thousand parts per million there. This one produces the maximally wrong answer, and it does so cleanly.
That is a property of a branch cut rather than of an approximation. Crossing it does not degrade the result; it replaces the short way round with the long way round, which for a midpoint is the antipode and for an area is the complement. There is no small version of the mistake and no tolerance below which it is safe.
The practical consequence is the opposite of what a large error usually implies. Because the failure is total, it is easy to detect — a bounding box 359 degrees wide is unmistakable — and every serious pipeline checks for it. The failures that survive are the plausible ones, as a coordinate without its system is not a location sets out: a hundred-metre datum offset lives for years, and a shape that claims to span the planet does not last the afternoon.
Moving the cut moves the failure
The obvious repair is to number longitude differently — 0 to 360, say, which puts the cut at Greenwich instead of at the antimeridian. The site’s machinery tests exactly that, over two rings and two cuts:
| cut at | ring across 180° | ring across 0° |
|---|---|---|
| 180° | crosses | does not |
| 0° | does not | crosses |
Exactly one of the two rings crosses each cut, whichever cut is chosen, and the assertion demands precisely that count. Renumbering does not remove the problem, it relocates it: the Pacific convention breaks Greenwich and the Greenwich convention breaks the Pacific.
This is not an argument that the conventions are equally good in practice. A cut through the Pacific crosses less land and fewer datasets than one through western Europe and Africa, which is why the antimeridian was chosen and why Pacific-centred maps renumber deliberately. It is an argument that the choice is about where to put an unavoidable seam, not about whether to have one.
The reason it cannot be removed
Longitude is a coordinate on a circle and the numbers are a coordinate on an interval, and a circle is not an interval. Any continuous numbering of the circle by real numbers either repeats — the same ground getting two numbers, which is what unwrapped longitudes do — or jumps somewhere, which is a cut.
That is a topological statement rather than a numerical one, and it belongs with the site’s other one. No map is faithful proves that no plane chart of a sphere preserves the metric, by computing the curvature two ways. This proves that no single chart of a circle is continuous, by a much simpler argument, and the two together are the shape of the whole subject: the failures that cannot be engineered away are the ones with a theorem behind them.
What the repairs actually do
Three are in use and each gives something up.
Split the geometry. Cut the feature at the seam and store it as two pieces. Every operation then works, and the object has changed: a single island is now two, its perimeter has gained two edges that are not coastline, and any count of features is wrong by one. The repair is exact for area and lies about topology.
Unwrap the longitudes. Store 170 and 190 rather than 170 and −170. Every planar operation works, the area comes out right, and the coordinates are outside the range every specification declares — so a consumer that normalises on read undoes the repair silently.
Compute on the sphere. Use formulae that wrap the longitude difference into and never form a planar coordinate at all. That is what this site’s own area routine does, and the wrapping is load-bearing: without it a ring encircling the globe accumulates one step on its closing segment, which cancels the sum and reports the area of a hemisphere as exactly zero — plausible-looking until it is compared against a closed form, which is why the closed-form comparison exists.
The third is the only one that changes neither the object nor the file, and it is available only to operations written to be aware of the seam. Which is the recurring shape of this field: the repair is not to fix the data but to stop performing a planar operation on a curved thing.
What it does to a query, which is where the cost actually lands
A bounding box is not a picture; it is the key an index is built on. A feature whose box is 359 degrees wide is, as far as any index is concerned, a feature that covers the world.
Two consequences follow and they pull in opposite directions. Correctness: every query returns it, so a search for something in the Atlantic finds an island in the Pacific and the caller has to test the geometry properly to reject it. Cost: the index has stopped filtering, which is the only thing an index does — a structure whose whole purpose is to avoid testing most features against most queries now tests one feature against every query.
The reverse case is worse and quieter. A query box that crosses the seam has the same 359-degree extent, so it matches everything and filters nothing; and a query box written the natural way — from 170 to −170 — has a minimum larger than its maximum, which most implementations treat as empty. The same crossing gives everything and nothing depending on which side of the comparison it is on.
The repair is the split again: a crossing query becomes two queries, one to 180 and one from −180, and the results are merged. That is exactly what a renderer does with a crossing tile, and the tile scheme meets the same seam one layer up.
The tiling meets it too, and solves it by repeating
The screen half of this field has the same seam and handles it in a way the data half cannot.
The projected world’s left and right edges are the antimeridian, so tile and tile are neighbours on the ground and are the two extremes of the index. A map panned west across the seam therefore needs the tile at the other end of the row — and every slippy map does this by simply repeating the world horizontally, drawing the same tile column again and again as the reader pans, so the picture is continuous and the coordinates wrap.
That is available to a renderer because a picture has no identity: the same tile drawn twice is two copies of an image and nothing is claimed. It is not available to a dataset, because a feature drawn twice is two features, and asking whether they are the same object is the question the whole seam problem is about.
So the same topological fact produces a trivial fix on one side and an unavoidable choice on the other, and the difference is that one of them is only about pixels. A screen map is a pyramid of tiles has the scheme; the wrap is the one place where the map’s own coordinate system is more forgiving than the file’s.
The date line is a different line
Two seams near 180° get conflated and only one of them is in this essay.
The antimeridian is exactly 180°, everywhere, by definition: it is where the numbering wraps and it is a mathematical object.
The international date line is a political boundary that follows 180° loosely and deviates by up to thirty degrees to keep territories on one date — around the Aleutians, around Kiribati, around Samoa. It is a line on the ground that somebody drew and can redraw, and countries have moved themselves across it.
They are near each other and they are not the same kind of thing, and a dataset that treats the date line’s deviations as a coordinate seam, or the antimeridian as a calendar boundary, has confused a convention that can be renegotiated with one that cannot. This site’s business is the second; the first is a fact about jurisdictions and belongs to whoever writes about those.
The other seam, which is a point
Latitude has a singularity too and it behaves differently enough to be worth the contrast.
At the pole, every longitude names the same place. A polygon containing the pole has a ring which, traced in the numbering, does not enclose it: the shoelace gives the area of a shape that runs around the pole rather than over it, and the standard repair is to insert an artificial vertex at 90° and stitch the ring across the top.
So one singularity is a cut — a line where the numbers jump — and the other is a collapse — a point where a whole coordinate loses meaning. Both come from putting a rectangular grid of numbers on a sphere, which is the plate carrée’s own geometry, and both are why the graticule is a coordinate system rather than a map.
Where a pseudocylindrical puts its error measures the projection-side consequence of the same thing: a pole drawn as a point or as a line, and the distortion each choice buys.
The seam a projection chooses
There is a third kind of seam on this site and it is the only one anybody places deliberately.
An interrupted projection cuts the map where the tearing costs least — through oceans, for a land map — and the size of the tear is a computed quantity rather than a drafting decision. Giving up continuity is that essay, and the comparison is instructive: an interruption is a seam chosen to reduce distortion, the antimeridian is a seam forced by numbering, and a tile boundary is a seam chosen for delivery.
Three seams, three reasons, and only one of them is optional.
The seam and the area machinery, one layer down
The site’s own area routine has the seam handled inside it, and the way it is handled is worth reading as an example rather than as an implementation note.
sphericalArea sums a term over the ring’s edges and wraps each longitude difference into before using it. Without the wrap, a ring encircling the globe accumulates a single step on its closing segment, that step cancels the entire accumulated sum, and the area of a hemisphere comes out as exactly zero.
Zero is the interesting part. It is not a large wrong number that would be noticed; it is a small one, and it is the answer a degenerate ring would give, so it looks like a different bug entirely. The only way it was caught is the way everything on this site is caught: the routine is required to reproduce a closed form — a hemisphere is and a cap is — and the check is run on every build.
That is the seam appearing three levels below where an essay would look for it, in the interior of a function that has no idea it is near the antimeridian. Computing an area needs a surface is the essay on what that routine is for; this is the one line of it that exists because longitude is a circle.
What a check would be
The failures are large, so the checks are cheap, and it is worth writing them down in the site’s own idiom — each one able to fail.
A bounding box wider than 180° is a crossing, not a feature. Nothing on Earth spans more than half the globe in longitude without spanning all of it, so a box between those is a seam artefact.
An area larger than the hemisphere’s is the complement. The closed form gives the hemisphere’s area exactly, so the comparison needs no dataset.
And a segment longer than half the circumference has been interpolated the wrong way round, since the short way is always at most 20,015 kilometres — which is the number the midpoint failure produces, arriving as a bound rather than as a symptom.
Each of those is a statement about the sphere rather than about the data, which is what makes them checks rather than heuristics. The site’s own gate runs the first two, on a ring built to fail them, and requires the failure — because a seam check that had stopped detecting anything would leave every area on the site quietly wrong at exactly one longitude.
The checks belong at the door
The three tests above are cheap enough to run anywhere, so the interesting question is where in a system they should sit, and there is a clear answer.
At ingest, on every feature, once. Each check is a comparison against a constant the sphere supplies — half the circumference, the hemisphere’s area, 180° of longitude — so the cost is a few arithmetic operations per feature and no dataset, no index and no neighbourhood. A million features is a fraction of a second, which is nothing beside the parse that produced them.
The argument for putting them there rather than at the point of use is the shape of the failure.
A seam artefact is shape-preserving downstream. The wrong-way segment, the inverted polygon and the world-spanning bounding box are all valid geometries: they parse, they render, they intersect, they are stored and reprojected and served without complaint. Nothing later in the pipeline has a reason to look, because nothing later is broken — the data is merely wrong, and it is wrong in a way that produces a picture rather than an error.
And it propagates into everything derived from it. An area computed on the inverted polygon enters a total; a length enters a summary; a bounding box enters an index and quietly matches every query in the world. By the time somebody notices a number that looks odd, the feature that caused it is several products upstream and the audit is archaeology.
So the checks are a boundary condition on a system rather than an analysis step. A dataset that has passed them once cannot develop the defect later, because nothing downstream creates it — the failure is made at the moment coordinates are interpolated, joined or built, which is exactly the moment the data arrives.
Where this ladder goes
The failures so far have been about quantities: an area, a length, a position. The next two are about answers — which site is nearest, and what a picture becomes when it is warped into another projection — where the operation returns something that is not a number and the error is a different kind of object.
Named alongside this one
Essays reaching for the same objects. Nobody chose these; they are what the concept index makes visible.
- The line a commission can actually run boundary · closed form · convention · verification
- The square costs the poles closed form · convention · graticule · verification
- Two charts are enough, and one is not closed form · convention · topology · verification
- A boundary that two features share convention · topology · verification
- A degree is not a unit of length convention · graticule · verification
- A meridian boundary moves when its datum does boundary · convention · verification
What links here
The 8 essays that link to this one and share the most of its objects, of 13 that link here.
The objects this essay names
Each one links to every other essay that touches it.
AntimeridianBoundaryBounding boxBranch cutClosed formConventionGraticuleInterruptionShoelaceTopologyVerification