← All work
Personal project

Lines of Relief

An opinionated contour-line map of the whole Earth, traced live in the browser by a Rust kernel compiled to WebAssembly.

Lines of Relief homepage

The idea

Most maps try to show everything. Lines of Relief shows the world one way: contour lines coloured by elevation on a dark page, in a single Rosé Pine palette, at six fixed scales from a whole region down to a single ridge. Search for a peak, a lake, a town or a country and the map takes you there. Reach a summit that matters at your scale, or cross into a new country, and the map tells you.

My role

It's my own project. I designed and built all of it: the browser app, the contour kernel, the server, and the pages generated at build time.

Approach

The visitor's machine does the work. A web worker stitches raw elevation tiles together and traces them into contours with a small Rust kernel compiled to WebAssembly. Water, borders and place names come from vector tiles through a decoder I wrote, and everything is drawn on a canvas in plain TypeScript, with no framework.

The server is one small Rust (axum) binary. It serves the site and proxies elevation tiles, map tiles and place search through a Redis cache shared by every visitor, so each upstream tile is fetched once rather than once per person. It also picks museums out of OpenStreetMap data, so towns that have one get a small badge.

Speed was the point. A cold visit loads about 47 KB of code, styles and fonts, plus a pre-rendered first frame, so the map is on screen before anything else arrives. My favourite places are pre-built into a single file of about 0.5 MB instead of about 85 tiles, which skips decoding and contour tracing entirely.

Static pages are generated at build time: two for each of 56 summits, plus pages for famous landmarks. Each landmark appears as a clay render, modelled from simple shapes at roughly true size and rendered in Blender by a script, and stands on a model of its own neighbourhood. Sitemaps and share images are generated too.

Outcome

The map is live at linesofrelief.ink. It's free, with no ads and no accounts, and it covers the whole Earth.