German postal code boundaries with population-weighted centroids.
Postal code polygons from OpenStreetMap are easy to find. Knowing where people actually live inside them is not. Umriss dissolves OSM boundary data, merges it with address-derived centroids from the WZB Social Science Center, and serves the result as a map you can explore.
Generate the data files:
uv run generate_data.pyOutput:
| File | Size | Content |
|---|---|---|
plz-centroids.json |
430 KB | Population-weighted + geometric centroids per PLZ |
plz-boundaries.geojson |
5.2 MB | 5-digit postal code polygons |
plz-boundaries-1d.geojson |
684 KB | Dissolved 1-digit region outlines |
plz-boundaries-2d.geojson |
833 KB | Dissolved 2-digit region outlines |
Open index.html over HTTP — or visit the live deployment: https://kibotu.github.io/umriss/
| Zoom levels | 1-digit (0–9) and 2-digit (01–99) dissolved boundaries as green outlines; 5-digit boundaries as red polygons |
| Centroids | Gold dots at population-weighted (address-derived) centers; cyan dots at polygon geometric centers — toggle either |
| Labels | Large 1-digit labels at low zoom, medium 2-digit labels at high zoom, positioned at each group's population-weighted center |
| Inspect | Click any region to see postal code, population, and both centroid coordinates |
| Neighbor search | Click a PLZ, then toggle Neighbors to find all postal codes whose boundaries intersect a configurable radius — with progressive step bands (local → regional → national), radius rings, and a distance-sorted info panel |
| Performance | Canvas-rendered, < 7 MB total across all boundary files; Turf.js lazy-loaded on first neighbor query; bounding-box pre-filter before geometry tests |
+ uv (or pip + virtualenv)
- Runtime dependency: shapely (polygon dissolving). Everything else is stdlib.
- Boundaries: OpenStreetMap via tdudek/de-plz-geojson (ODbL). Original source: postleitzahl.net.
- Population-weighted centroids: WZB Social Science Center — address-derived centroids computed via the Google Cloud Geocoding API.
If umriss saved you an afternoon of wrangling boundary files or explaining to your PM why the centroid is in a field, consider buying me a coffee.