An interactive web map for exploring GB postcode boundaries derived from open Land Registry and ONS data.
Live map: markmclaren.github.io/inspired-postcodes
This project uses INSPIRE Index Polygon data (HM Land Registry) combined with NSUL point data (ONS) to produce polygon boundaries for GB postcodes at multiple levels of aggregation. The resulting boundaries are served as PMTiles vector tile files and rendered in the browser using MapLibre GL JS.
The approach was inspired by Mark Longair's blog post: Open Data GB Postcode Unit Boundaries
Mark's Voronoi-processed postcode data, derived from Mapit, is also available as PMTiles: github.com/markmclaren/mapit-postcode-pmtiles — live viewer
| Layer | Description |
|---|---|
| Original INSPIRE | All INSPIRE property boundary polygons. Where a parcel spans multiple postcodes, it is split into segments using Voronoi cells derived from UPRN coordinates. |
| Single Postcodes | Property parcels that map cleanly to exactly one postcode. |
| Dissolved Postcodes | Postcode unit boundaries formed by dissolving all single-postcode parcel geometries by postcode (e.g. AB10 1AB). |
| Sector Dissolved | Postcode sector boundaries (e.g. AB10 1), formed by dissolving the unit boundaries. |
| District Dissolved | Postcode district boundaries (e.g. AB10), formed by dissolving the sector boundaries. |
| Area Dissolved | Top-level postcode area boundaries (e.g. AB), formed by dissolving the district boundaries. |
All layers include a colour_index property (0–5) for neighbour-contrast colouring.
-
INSPIRE Index Polygons — HM Land Registry Cadastral Parcel data for England and Wales. Download: use-land-property-data.service.gov.uk/datasets/inspire
-
National Statistics UPRN Lookup (NSUL) — ONS dataset mapping Unique Property Reference Numbers (UPRNs) to postcodes and grid coordinates (December 2025, Epoch 123). Download: geoportal.statistics.gov.uk
The PMTiles files are hosted on Hugging Face: huggingface.co/datasets/markmclaren/inspired-postcodes
The pipeline was run on the Isambard 3 HPC system. Processing steps:
- Download INSPIRE GML zip files (one per local authority, ~318 councils).
- Load each GML into DuckDB via GDAL/
ST_Read. - Spatially join NSUL UPRN points onto polygons to assign postcodes.
- For parcels containing multiple postcodes, split geometry using Voronoi cells seeded by UPRN coordinates.
- Export to newline-delimited GeoJSON per council.
- Convert each GeoJSON to MBTiles with Tippecanoe.
- Merge all per-council MBTiles with
tile-joinand convert to PMTiles. - Dissolve the single-postcode layer progressively by postcode unit, sector, district, and area to produce the four dissolved layers.
Contains HM Land Registry data © Crown copyright and database right 2025.
Contains National Statistics data © Crown copyright and database right 2025.
Licensed under the Open Government Licence v3.0.