Skip to content

Screening

What screening is for

Reblocking a block for real — tessellating its interior into a parcel graph, peeling out how deep each parcel sits, routing roads through it — is not cheap. A metro has far too many blocks to run that on every one of them. Screening is the cheap first pass that decides which blocks are worth it: one score per block, cheap enough to compute for a whole metro in a single sweep.

The shipped screen

Every screen considered here is a formula over three quantities free on every block: building count n, area A, and perimeter P. The default is depth_density_proxy: √(nA)/P · n/A, the depth proxy times density. A block scores high only if it is both deep — its interior sits many parcels back from a street — and crowded. No Voronoi tessellation, no peel: the whole metro scores in one pass.

Every candidate screen below is scored against the City of Cape Town's own informal-structure survey — AUC across the whole ranking, precision at the top of it — plus each one's shipped absolute floor where it has one; a screen never shipped as a gate carries none:

metric AUC precision in top 1% shipped floor
depth_density proxy √(nA)/P · n/A 0.919 64.5% 0.0128
density n/A 0.921 55.2% —
density_compactness n/P² 0.848 59.0% 0.000355
depth proxy √(nA)/P 0.704 42.6% —
Cape Town screened at the shipped depth_density_proxy floor: red fills the blocks the screen selects, gold the surveyed informal settlements it does not, grey the rest, and a blue ring marks the one block the rest of the site follows
Cape Town at the shipped depth_density_proxy floor. Red fills the 3,169 of 18,309 blocks the screen selects, whatever the survey says; gold, the informal settlements in the City of Cape Town's own survey that it does not; grey, the rest — precision 20.0%, recall 81.9% against that survey. The blue ring marks ZAF.9.3.1_1_5810, the one block the rest of this site follows — a ring rather than an outline because a whole metro fitted into one figure leaves that block far too small for its own boundary to be a shape anyone could pick out. Switch metric, drag the floor, or toggle to Nairobi — 334 of 3,839 blocks at the same absolute floor, with no equivalent informal-structure survey to check them against, so no precision or recall is shown for that city. Colour by score instead, and each block is shaded by its rank among the blocks on its side of the floor: blue below, pale at the floor, red above, on a dark ground. The map opens on the selection because the precision and recall are its red fill's.

Why n/P² was retired

density_compactness (n/P² — density times compactness) was the previous default. At an equal pool size, depth_density_proxy beats it on both precision and recall, so the change costs nothing and settles no trade-off — see the full screen bake-off for the comparison. Its historical selling point — that it needs no Voronoi tessellation and no peel — was never a real differentiator: the metric that replaced it needs no Voronoi tessellation and no peel either.

The gate is absolute, not a percentile

Both screens select on an absolute floor, not a percentile cut. A percentile redefines the population every time the corpus changes: the same percentile can select a very different share of a corpus, or the same share can mean a very different crowding level, depending on what pool it is computed against. An absolute floor applies the same bar however the corpus grows or shrinks — a percentile is only useful as the instrument for calibrating that bar, never as the selection rule itself.

From block to region

A screened block is not reblocked on its own. region_builder grows it into a right-sized, multi-block region first:

  • dense_cluster — add the densest adjacent block, greedily, up to a size budget.
  • convex_hull — fill in every candidate block inside the seed group's convex hull.
  • shape_standardizing — grow while scoring the shape of the union at every step, so the outline is a design choice rather than a side effect of growth order.
  • identity — no growth: the screened block is the region.

The reason is architectural. A road proposed for a single block stops dead at that block's boundary, whether or not the settlement's fabric continues past it; growing a region first lets the roads that follow run continuous across block boundaries instead. This is also the hinge in the pipeline: under the shipped default, everything up to and including the screen is cheap enough to sweep a whole city at once, and everything from region_builder on is per-block and expensive.

the RegionGrow neighbourhood around seed ZAF.9.3.1_1_5810: the region grown from it at the slider's default budget
Every block in the pinned seed's 534-block neighbourhood, outlined; filled is the region dense_cluster grows from seed ZAF.9.3.1_1_5810 at the slider's default budget of 7,500 buildings — 3 blocks, 7,911 buildings. Click any shipped block to reseed, or drag the budget slider down to its floor of 6,500 buildings, and the region collapses to the seed alone (1 block) — 6,619 buildings on the seed against a 6,500-building floor. This is not a miscalibrated default: max_buildings is a block budget under a data source that reports no per-block building count, and a building budget here, where per-block counts run into the hundreds — one constant, two regimes.

The peel-based metrics — depth and depth_density, selectable in place of the default — blur that line deliberately. Neither can score a block without its true access depth, so the screen runs in two stages: rank the whole metro by the cheap proxy, keep the top slice, then tessellate and peel only those survivors. The expensive work still happens, but on a pre-filtered fraction of the metro instead of all of it — which is why those metrics cost minutes where the default costs one pass.