Embracing Serverless Geospatial

Sam Brown, Senior Geospatial Consultant

“Serverless” has been a buzzword ever since it hit the web scene several years ago. It refers to the utilisation of managed computing services from a cloud service provider (Amazon Web Services, Microsoft Azure, etc.).  It allows developers to pass off infrastructure tasks and focus their expertise on their unique business needs.

Custom code can be executed, and data hosted in an environment where it can be utilised on demand, without having to deal with the server management and costs when not being used.

One example of this is for static hosting of files, databases or static websites removing the need to provision compute and account for changing traffic loads. This approach is suited to the task of retrieving and serving map tiles for rapid search, navigation or visualisation in high and variable consumption websites such as real estate or trading portals .

Homes.co.nz in partnership with Lynker Analytics have implemented serverless technology in a new AWS hosted tiled map service for their new imagery basemap. To build this, we used the freely available aerial photography and satellite imagery provided under open data license by Land Information New Zealand.

A tiled web map is a map displayed in a browser by seamlessly joining dozens of individually requested image or vector data files over the Internet. Google Maps initially popularised this method and it has now superseded most other methods such as WMS typically displaying a single large image, with navigation buttons to pan to nearby areas. The image below is an example of the service within the application over Onehunga, Auckland.

onehunga_akl.png

There are several advantages to tiled map services. Every time the user pans, most tiles are still relevant, and can be kept displayed, while new tiles are fetched. This “slippy map” experience improves the user interface, compared to a fetch and wait approach to redraw a new image for the whole map extent. It also allows individual tiles to be pre-computed, a task easy to run in parallel.

Also, displaying rendered images served from a web server is less computationally demanding than rendering images as required - a benefit over technologies such as WFS.

severless-tiled-mapping-service.png

Homes.co.nz utilise a relatively lightweight geospatial web stack. With this in mind, we designed a serverless map service to be consumed directly from Amazon S3 into their web front end using LeafletJS web mapping JavaScript API with some custom plugins to help the user experience.

This removed the need for a complex web mapping application server removing a failure point, server management/maintenance and planning/provisioning while bringing greater redundancy and performance to handle maximum load periods as well as failover.

This new aerial basemap service has been built for homes.co.nz to serve the best imagery data available for every town and city in New Zealand while blending cloud free satellite imagery at the smaller scales (for example an entire region or island).

Using this approach we can enable ongoing continuous imagery updates seamlessly providing a high value service to end users as well as making ongoing aesthetic improvements.