The Best Flat Map

Every measured flight, ping, rail line and satellite pass on one plane

Rule. The surface is a plane. Each of the {{N_CITIES}} cities may sit anywhere on it. No latitude, longitude, radius, projection or spherical formula enters the solver.

Measurements. Flight times give lengths: {{N_FLIGHTS}} routes, cruise speed × time in the air, both directions. Pings ({{N_RT}}), rail and road lengths ({{N_RAIL}}) and satellite passes ({{N_SAT}}) give limits: no farther apart than this.

Tolerance. A flight holds between {{LO_PCT}}% and {{HI_PCT}}% of its length. Shorter means a route over a third longer than the straight line; longer means an aircraft above its top speed the whole way.

Solver. The page opens on a starting flat map as drawn. Solve moves the cities to keep as many measurements as it can and marks the rest red (faster than possible) or amber (far off the straight line). Coastlines follow the cities like a rubber sheet.

Start from
Data
Drag to pan · scroll to zoom · click a city

Drag to turn

Result

Best of {{N_STARTS}} starting maps (North-pole and dual-pole AE, the layout of the flight times alone, and AE maps centred on {{N_STARTS_AE}} other points): {{BEST_BROKEN}} measurements broken. The plane keeps almost the whole northern network, but it cannot close the ring of routes around the southern oceans: {{LONG_LIST}}. Each of those needs its aircraft faster than it can fly. To keep the rest, the plane squeezes {{BEST_B80}} flights below 80% of their timed length; on the globe {{GLOBE_B80}} are.

On the globe, by the same rules: {{GLOBE_LONG}} flight longer than its aircraft can fly (San Salvador–San José, a short hop where the 15-minute allowance for climb and descent is too generous), {{GLOBE_LIM}} limits broken, and {{GLOBE_SHORT}} flights below {{LO_PCT}}%: detours around closed airspace, indirect airways, and short hops where climb and approach take most of the time ({{GLOBE_SHORT_LIST}}). Surveyed triangles do not depend on the layout: a plane gives every triangle exactly 180°, and {{TRI_FLAT}} of the {{N_TRI}} measured triangles exceed that by more than four times their survey's angle noise ({{TRI_GLOBE}} on the globe; The Triangle Test).

Released into 3D, the same cities and measurements close into a ball. The cities wrap {{WRAP3}}° round its centre, with {{BROKEN3}} measurements broken. Measured along a sphere instead, with the shape conceded and its size left free (Measure along a sphere, above), the flights fit a sphere of radius {{ARC_R}} km with {{ARC_BROKEN}} measurements broken, and the cities fall a median {{ARC_OFF}} km from their true places. Earth's mean radius is 6,371 km; routes flown run slightly longer than the shortest path.

Wider tolerances

The further short a flight may fall, the more of the network the plane can squeeze to make room for the southern routes. It keeps everything once flights may fall to {{FIT_LO}}% of their timed length, which means routes up to twice as long as its straight lines. That layout has {{FIT_B75}} flights below 75% and {{FIT_B60}} below 60%. The globe has {{GLOBE_B75}} and {{GLOBE_B60}}.

Flights kept betweenPlane: too longPlane: too shortPlane: limitsPlane: below 75%Globe: too longGlobe: too shortGlobe: limits

Pings alone

A ping only caps a distance, and internet routes run well past the straight line, so the caps are loose. With pings alone a flat map can shrink until every cap holds; turn off Flight times to see it. Scale comes from lengths, and the flights supply them.

Method

Flights
From The Measured Sphere ("each flight's own speed"): routes flown both ways, each direction's median time from wheels-off to wheels-on over two weeks (FlightAware), less 15 minutes for climb and descent, times the aircraft type's cruise speed (Mach × 1,062 km/h). Averaging the two directions cancels the wind. Click a city for each route's flights, aircraft and track logs.
Limits
A ping is a round trip: the signal goes out and comes back. A ping of t ms caps a distance at {{KM_PER_MS}} km per ms (light in fibre; the vacuum option multiplies by 1.468), plus 25 km at each end and the distance from each server to its city's airport. Sources: WonderNetwork's 2020 archive and the live RIPE Atlas, Globalping and Vultr measurements on pingstats. {{N_DROPPED}} pings shorter than every surface allows were left out as mislocated servers. Rail and road: the straight line can be no longer than the published route. Satellite passes: two stations can be no farther apart than the two closest ranges plus the satellite's measured flight between them.
Solver
First a least-squares fit of every flight's relative error. Then eight rounds of a reweighted, nearly linear penalty on how far each measurement falls outside its band, which gives up on as few measurements as it can instead of straining many (the layout with the fewest broken is kept). Limits count three times a flight. L-BFGS throughout. The page runs the same steps live. Offline, the same code (fit.py) ran from {{N_STARTS}} starting maps and then refined the 20 best layouts with twelve rounds.
Drawing
Coastlines (Natural Earth 1:110m) are projected on the starting map, then carried along by a thin-plate spline through the cities' starting and current positions. Land near the starting map's rim is outlined only. Land more than 900 km from every city is drawn faint, and beyond 1,500 km fainter still: no measurement fixes its shape. Each city's move from the starting map is drawn as a thin line.
Along a sphere
Optional, and it assumes the shape. The flat layout is laid on a spherical cap whose radius is a third of the layout's width; the cities are then held on a sphere and each distance is measured along its surface (radius × central angle, the haversine distance). The first stage fits the radius with the cities; the later stages hold it. Land is placed by the rotation or reflection that best lines the cities' true positions up with the solved ones (orthogonal Procrustes); the distance of each city from its true place is measured after it.
3D
The same objective with a third coordinate. After the solve, a least-squares sphere is fitted to the points to describe the shape; how far round it reaches is the angle from the cities' mean direction to the farthest city.