Rendering National Hydrology and LiDAR Terrain at 60fps
Drop raw GeoJSON or multi-gigabyte elevation rasters into an off-the-shelf map component and the browser stalls as soon as someone pans across a county.
Building On the River across Britain, Ireland, France, the Netherlands, and Belgium meant treating the data pipeline and the WebGL renderer as one continuous piece of engineering.
From raw COGs to compact browser binaries
Environment Agency LIDAR composite DTMs and national river networks are too heavy to query naively at runtime. Rather than running fat tile clusters for every pan event, we compile the geometry and elevation ahead of time:
- Elevation without runtime bloat: Environment Agency LIDAR Cloud Optimised GeoTIFFs are reprojected from British National Grid and encoded directly into corridor DEM PMTiles without relying on GDAL at runtime.
- Chained binary river networks: HydroRIVERS and OpenStreetMap ways are stitched into continuous downstream chains, resampled at fixed spacing in Web Mercator metres, and packed into flat binary files (
RLP1) alongside lake and sea spatial indices. - Offline-capable routing packs: Navigable waterway graphs are split into regional packs that run identically in the browser and in the native Swift iOS app.
Governing GPU budgets in real time
Even with tight binary payloads, drawing flowing particles across thousands of rivers, lakes, and coastal waters will swamp a mid-range laptop GPU unless the client adapts.
In Living Waters (ExperimentWaterways), a runtime FPS governor watches frame timings continuously and reallocates particle budgets across visible rivers, lakes, and seas based on camera altitude and viewport demand. Country-scale datasets only feel native in the browser when data packing, spatial indexing, and shader budgets are designed together.