New web-based data currency tool

We’ve built a new currency viewer for the OS MasterMap Imagery Layer

OS Developer
4 min readMay 13, 2022
The OS MasterMap Imagery Layer Currency Map.

The Ordnance Survey MasterMap® Imagery Layer is a digital product and part of the MasterMap product line. It provides high-quality imagery of Great Britain at 25cm ground resolution and is often used for surface identification, examining road markings, and environmental research. It serves as a useful alternative to site visits, which can be costly or require the landowner’s permission.

Imagery is captured using both OS’ own Air Camera Operators (ACOs) and external contractors. Aerial imagery is a much higher resolution than imagery captured from satellites in orbit. Multiple years’ worth of imagery (OS flies Great Britain on a three-year currency programme) is expertly colour balanced, orthorectified, and blended to produce a single continuous layer. Where one year’s worth of data ends and another begins, the imagery is blended along what we refer to as ‘collars’. Imagery is merged along hard topographic features, such as bridges or roads to reduce noticeability between two different sets of data.

The term ‘currency’ refers to the age of the data presented and how current the data is.

This raises a question; if capture dates vary for different regions of GB, how can we determine the age of the product they’ll receive for a given location? The current solution involves a lot of emails and internal diagnosis to find the answer.

Our goal was to make it easy for customers to access currency information themselves, prior to requesting our data. We created a lightweight web-app that could run on both desktop and mobile, and without server-side processing so it could be served from a static file server. Above all, it had to be intuitive, we needed something that looks visually appealing and distils a complex amount of data into something simple to understand and navigate around without the need for resource-intensive desktop GIS software or bulk-downloading data manually.

It was important to make the map simple to update during each product refresh, so prepared internal-use scripts using Feature Manipulation Engine to simplify and extract the relevant currency information from OS’ data repositories. The source dataset is equivalent to ~50Mb, holding over a quarter-of-a-million features. The script outputs a ~900kb GeoJSON currency file consisting of multi-polygon features, suitable for transfer across the web.

The web map utilises open-source libraries; the Leaflet mapping engine (which was chosen for its popularity and documentation), os-transform (for generating the grid references attached to the cursor tooltip), and proj4js (for handling general Coordinate Reference System conversions).

I wrote bespoke CSS, using Bootstrap’s icon library and Google Fonts to reduce load on OS’ infrastructure. The web map pulls the imagery layer currency and grid data from a GeoJSON file located on the server via an asynchronous Fetch request, used to populate the legend with the relevant years’ worth of currency data, which uses the OS’ GeoDataVis colour palette to distinguish between each legend entry. For a discreet Basemap, I used the Light_27700 variant of the OS Maps Raster Tiles API (ZXY) to add location search functionality (geocoding), and the OS Names API was used to geocode GB place names and features (see: leaflet-control-geocoder).

This was my first experience of the OS Data Hub APIs in frontend web development, its design and compatibility with mapping engines such as Leaflet meant APIs were easy to integrate and code around. This is partially a result of the use of open and web-friendly standards such as ZXY Raster Tiles, which makes it much easier to connect OS APIs to both FOSS and proprietary software. We even inverted the colour of the OS Light Basemap tiles using a CSS filter, to create a dark theme which looks fantastic when used as a backdrop to the GeoDataVis legend items.

The app in dark mode and showing the cursor tooltip with the currency information and grid reference.

Feel free to inspect your browser and have a dig around the code, comments have been added to explain what each section is related too. If you are interested in experimenting with the OS Data Hub and our data, OS offers a free account to explore some of our open data and APIs.

The web map is now available for use. It can be accessed here , replacing the existing and non-functional previous currency tool.

By simplifying access to OS datasets, we hope to have made it easier for customers to access our products and encourage the uptake of our data. I look forward to further exploring the Data Hub APIs during future geospatial projects.

Archie Biddiscombe, a graduate at Ordnance Survey, outlines the need for a new currency tool for one of our popular products, and the steps he took alongside colleagues to build a web-based solution with the assistance of the OS APIs.

Archie Biddiscombe: Graduate @ Ordnance Survey / Archie Biddiscombe

Information on the OS Graduate Scheme can be found here.

--

--

OS Developer

Ordnance Survey provides the most authoritative data of Great Britain’s landscape to fuel innovation in geospatial application development.