Independent build, Barcelona, 2026

Road data edited by many people, one district each

A multi-user road-network editor on PostGIS and MapLibre: area-based permissions, issue tracking, and changes published as all-or-nothing changesets.

Open the live app
One city, one district per editor
road segments
127,744
editable in one district
12,066
Project
Clearway: road editor with district permissions
Where
Barcelona
Year
2026
Stack
PostgreSQL + PostGIS, FastAPI, React, TypeScript, MapLibre GL, Docker Compose, Caddy, Nginx, AWS EC2

The question

How do you let several people maintain one road network at the same time, without anyone changing roads outside their own area, and without half-saved edits?

What we did

  1. Put permissions in the database. Each editor has a district polygon. PostGIS decides what is editable with ST_CoveredBy, and the API applies the same rule again when changes are published.
  2. Served the network as vector tiles. Tiles are built per user straight from PostGIS, so editable roads are marked in the tile itself. The live workspace holds 127,744 OpenStreetMap street and path segments for Barcelona.
  3. Made editing safe. Edits, new streets and deletions wait in a pending change set. The editor reviews them, then publishes everything as one transaction; if one item is invalid, nothing is written, and every publish is kept as an audit record.
  4. Added a satellite check. Roads can be shown above satellite imagery, with halos, to compare the data with what is on the ground.
  5. Connected issues to the map. Road problems are listed per district with priority, status, assignment and comments; opening one zooms to its roads.
  6. Built it to move. The same engine was first loaded with Oman's road network from the Humanitarian Data Exchange (197,338 roads, Muscat editing areas) and now runs on Barcelona's OpenStreetMap streets.
Edits stop at the district boundary
From a reported issue to a pending fix
Review, then publish as one changeset
Sign in to your district, work its issues
Browser, API and PostGIS

Numbers

  • 127,744 road segments in the live workspace
  • 12,066 editable for the Eixample editor
  • 3 district editors + a read-only viewer
  • 197,338 roads imported in the first build
  • one transaction per published changeset

Known limits

Our own build, not a commissioned delivery. Built for desktop screens; on phones the editor asks for a wider window. Single server, no automated backups or CI. The people shown are fictional team profiles; the data is open OpenStreetMap data.

Need something like this?

Tell us what the work should support. A 30-minute call is enough to say what we would do first, how long it takes and what it costs.