Back to feed

Superblocker

Yet another thing:

The basic idea behind superblocks is deceptively simple: take a neighborhood, block through-traffic from cutting through it, and suddenly you have quiet streets where kids can play and people can walk without dodging cars. Barcelona did this and it worked beautifully.

The question is: how do you systematically plan this for an entire city?

It turns out the whole problem is really about graph theory.

A city’s street network is a graph:

  • Nodes are intersections
  • Edges are streets
  • Every edge has properties (road type, capacity, speed limit, one-way, etc.)

When you load OpenStreetMap data for a city, you’re essentially getting a massive weighted graph with tens of thousands of nodes and edges.

The goal of superblock planning is to partition this graph into cells where:

  • Through-traffic is impossible within each cell
  • Every address remains reachable from the outside

This is a constrained graph partitioning problem.

Superblocker

First you identify the arterial network. These are your primary, secondary, and tertiary roads — the ones designed to carry traffic. They form a subgraph that should remain fully connected and handle all the through-traffic.

Everything else — residential streets, service roads, living streets — becomes candidates for the interior of superblocks.

The arterial network essentially defines the boundaries of your superblocks. If you think of arterials as the edges you’re not allowed to cut, then superblocks are the faces of the planar graph formed by those arterials.

In graph theory terms, you’re finding the minimal cycles in the arterial subgraph, and each cycle bounds a potential superblock.

But here’s where it gets interesting: you can’t just say “everything inside this arterial boundary is a superblock”.

People still need to reach their homes by car. Deliveries need to happen. Emergency vehicles need access. So you need entry points.

The entry point problem is about finding nodes on the boundary where vehicles can enter the superblock interior. The key constraint is the no through-traffic property:

Once you’re inside, you shouldn’t be able to exit from a different entry point without going back out and around on the arterial network.

Mathematically, this means the interior subgraph of each superblock must be partitioned into sectors, where each sector is only reachable from its designated entry point. If you can drive from a north entry to a south entry through the interior, you’ve failed — that’s through-traffic.

To enforce this, you modify the interior graph:

  • Modal filters: delete edges from the vehicle graph entirely (cyclists and pedestrians can still use them)
  • One-way conversions: change undirected edges to directed edges
  • Turn restrictions: keep the edges but forbid certain transitions at nodes

The algorithm tries to find the minimal set of modifications that achieves the no-through-traffic property while keeping all addresses reachable. This is essentially a min-cut problem with reachability constraints.

For each superblock, you compute which nodes are reachable from which entry points after applying the modifications:

  • If a node becomes unreachable from all entries, the modification set is too aggressive.
  • If a node is reachable from multiple entry points in different sectors, the modification set isn’t aggressive enough (through-traffic is still possible).

The reachability check is just breadth-first search from each entry point, respecting directed edges and modal filters. You mark which nodes each entry can reach, and then verify two things:

  1. Every interior node is reached by at least one entry.
  2. No interior node is reached by entries from different sectors (unless they share a boundary, which gets complicated).

Sector assignment itself uses angular partitioning: compute the centroid of the superblock polygon, then assign each entry point to a sector based on its angle from the centroid.

Four sectors give you north/east/south/west. Eight sectors add the diagonals. The idea is that entries on opposite sides of the superblock should be in different sectors, so traffic between them has to use the arterial network.

Validating the constraint globally is a graph connectivity problem. After all modifications, you build the “can I get from A to B” relation for all pairs of entry points:

  • If entry A and entry B are in different sectors, there should be no path between them through the interior.
  • If they’re in the same sector, there should be a path (so addresses in that sector are reachable).

You’re essentially checking that the interior graph has been decomposed into the right number of connected components.

The routing part is also pure graph theory. Given an origin and destination, find the shortest path that respects superblock constraints:

  • If both points are on the arterial network, it’s standard Dijkstra or A*.
  • If one or both are inside superblocks, you first route to the appropriate entry point, then across arterials, then from the destination’s entry point to the destination.

The cost function penalizes interior travel to encourage using arterials.

Traffic estimation without real data uses graph-theoretic heuristics:

  • Edge betweenness centrality measures how many shortest paths pass through each edge (high betweenness means high traffic).
  • You can also simulate flow by assuming trips are generated proportionally to residential density and attracted proportionally to commercial density, then computing shortest paths between all origin-destination pairs. The fraction of paths using each edge estimates its load.

The whole system is basically a pipeline:

  1. Load the OSM graph.
  2. Extract the arterial subgraph.
  3. Find the faces (superblock candidates).
  4. Compute entry points for each face.
  5. Find minimal modifications to enforce the sector constraint.
  6. Validate reachability.
  7. Provide routing that respects the new structure.

What makes it tractable is that real street networks have useful properties:

  • They’re roughly planar (streets rarely cross without intersections).
  • They have hierarchical structure (arterials form a coarse grid, local streets fill in).
  • Superblocks are spatially local, so you can process them independently.
  • The modification search space is bounded: you’re only considering edges in the interior, and most interiors have maybe 20–50 edges.

The output is a transformed graph where through-traffic is structurally impossible, not just discouraged. You’re not relying on signs or enforcement — the network topology itself prevents it. That’s the mathematical elegance of the superblock concept.

Check it out or try it out here (it’s open-source, so contributions welcomed): Superblocker

// comments