From the archive · 2015
Atlas Finder
Shared map infrastructure for the HSE and other OpenApp clients, so developers could build interactive maps with very little code.
To improve how geospatial data was visualised and analysed, I built a new map infrastructure for the HSE and other OpenApp clients. The aim was a modular system that let developers create interactive maps with as little effort and code as possible, backed by shared APIs for map layers and tiles, full-text search and custom data requests.
Named Area module
Turns a request for areas by name into the SQL that selects them. Ask for the counties Kildare, Meath and Dublin and you get the query for those features. It supports counties, electoral districts and small areas, and extends to any layer with a mapping from name to feature.
Layer Cache module
Keeps frequently used data in Redis, saving roughly 100ms or more per request by skipping a PostgreSQL lookup.
Layer Mapper module
Returns the SQL and attributes for a named layer. It can run the query itself and return GeoJSON, or feed more complex queries in the Named Area module.
JMap Feature Server
An Express.js server that hosts the modules above behind one API for map requests. Every data layer can return full or partial results as GeoJSON for OpenLayers, Leaflet and similar libraries.
JMap Search Server
Makes every layer with text attributes searchable. Features in PostgreSQL are partly indexed in Elasticsearch, so natural-language and full-text search work alongside PostGIS spatial queries.
JMap Tile Server
Some datasets were too large for phones and low-end computers to draw as vectors, so the tile server rendered them as PNG tiles on the Z/X/Y scheme, drawing on Mapbox’s open source MBTiles format and SQLite module.
JMap Client
A client-side library wrapping OpenLayers and Proj4.js. It automated the common parts of map applications, such as feature popups and tile providers, and supported Irish projections including Irish Transverse Mercator and Irish National Grid. When OpenLayers shipped breaking changes, they were fixed once in JMap Client and every application picked up the fix.
The modules, APIs and client ran in production on several HSE projects and in OpenApp’s Rare Disease Registry.