- Project Started: June 18th 2015
- Last Worked on Version: 1.0
- Releases: 1 Major release
- Node.js & Express.js
- PG & PG Native
- PostgreSQL & Elastic Search
- Redis & PostGIS
To help improve visualisation and analysis of geospatial data, I developed a new map infrastructure for use by the HSE and other OpenApp Clients. I aimed for the system to be as modular as possible and allow developers using it to create interactive maps with the minimum of effort and code.
To help consolidate data and resources, I also created a number of backend API's to provide common map layers & tiles, full text search as well as the provision of custom data requests. Each module and API is outlined in the following sections.
Named Area Module
The Named Area Module returns a SQL query based on a user request for a given set of areas by name. For example, someone could request the Irish counties "Kildare", "Meath" and "Dublin" and receive the query needed to select those features. The module supports multiple area types such as Counties, Electoral Districts, Small Areas and can be extended to virtually any layer once a mapping between name and feature is available.
Layer Cache Module
To help improve performance, the LayerCache module allows frequently accessed data to be stored and recalled from a Redis cache. This can help save roughly 100ms or more per request as it avoids a more costly PostgreSQL look up in favour of in memory cache.
Layer Mapper Module
The Layer Mapper module takes a given layer name and returns the required SQL and attributes for that layer. It can preform SQL queries by itself and return GeoJSON features or help with more complex queries as part of the Named Area module.
JMap Feature Server
JMap Search Server
Map layers that provide text attributes are fully searchable via the JMap Search Server API. Features in PostgreSQL are also partially stored and referenced by Elastic Search, allowing natural language and full text search ability to be used along with the spatial abilities of PostGIS.
JMap Tile Server
While the majority of data used is in vector format, some datasets are too large to be displayed by mobile devices and low end computers. To overcome this challenge, vector data can be rendered as PNG tiles and served using the Z/X/Y tile scheme. Elements of this server were derived from Open Source technology released my Mapbox, specifically their MBTiles format and SQLITE module.
As the OpenLayers project release new versions of their library, breaking changes are resolved by the JMap Client instead of end our user applications. This allows OpenApp to remain up to date with the minimum of per project maintenance.
These modules, APIs and Client are used in production by several HSE projects and by OpenApp's Rare Disease Registry product.