Natural resources
United Kingdom

Open source geological mapping with British Geological Survey

About BGS

The British Geological Survey (BGS) is a world-leading geological survey and global geoscience organisation, focused on public-good science for government and research to understand earth and environmental processes.

BGS provides geological information for public and private sector users for use in areas such as construction project planning; finding sites for extracting geothermal energy or for storing carbon dioxide or nuclear waste; reducing the risk from natural hazards such as earthquakes or coastal erosion. 

Dr. John A Stevenson is a Senior Software Developer for BGS with a background in volcanology. John’s speciality is Python-based software development, spatial data and data engineering. He spoke to us about BGS’ new QGIS-based field data capture tool and how they use it with Mergin Maps.

Developing a new survey tool

BGS has been doing digital field data capture since 2005 using a survey tool called the System for Integrated Geoscience Mapping (BGS-SIGMA), which was developed in-house and built on top of ESRI’s ArcGIS platform. The deprecation of ArcGIS by ESRI in favour of ArcPro in March 2024 meant that BGS-SIGMA would need to be replaced. After an internal review, we decided to move to an open-source system based on QGIS. This option was chosen because it gave the most flexibility in terms of customisation for their needs and for sharing with collaborators. QGIS was already widely used within BGS.

After evaluating both Mergin Maps and QField for integration of QGIS to mobile surveying, we decided to use Mergin Maps due to the simplicity of the platform and the ability for projects to run on desktop QGIS on a Windows-based tablet PC. This is similar to the workflow that we had with SIGMA but with the extra ability to synchronise between users via Mergin Maps.

BGS developers wrote a custom plugin to set up a project for geological mapping. The plugin adds layers to any QGIS project, with a GeoPackage to store the data and all the styles and forms configured as needed. It also makes it quicker to add data in a parent-child relationship in QGIS. There is a bulk photo importer tool that lets surveyors link photos to locations with the option to include captions and thumbnails, and which can detect unlinked photos. The plugin also has a tool to generate reports in HTML and PDF formats. 

The plugin configures the project with standard QGIS layers backed by a GeoPackage, so data can be edited via plain QGIS (with or without the BGS plugin) or with the Mergin Maps mobile app. Using QGIS on the Windows tablets gives surveyors access to advanced GIS tools for generating slope or hillshade maps, measuring distances, or using planar surfaces to predict where rock formations are likely to outcrop at the surface. Using the mobile app gives the benefit of a more portable device with longer battery life for surveys in places such as areas, which are better suited for mobile devices. Someone walking around with a large rugged Windows tablet around their neck can draw unwanted attention, while someone tapping on a phone can just blend in.

Geological mapping project open in Mergin Maps mobile application. Photo courtesy: John A Stevenson

Using database constraints to ensure data quality

The data collected in the field are ultimately destined for BGS’ central relational database, which has database-level constraints. These ensure high data quality by enforcing the data types and relationships between features. A survey is set up so that observations, photos, samples and structural measurements all belong to a single “locality” point, with the points belonging to one project. Database foreign key constraints make it impossible to record “orphan” data that doesn’t have a locality or project.  Additional constraints are used, for example to ensure that “dip” angles of rock beds are between 0 and 90 degrees.

The BGS developers wanted to enforce the same constraints on the data at the point of collection. They did this at two levels - firstly in the QGIS forms, which understand foreign key relationships and can set constraints, and secondly, in the underlying GeoPackage.  A GeoPackage is a SQLite database and can be configured with the same database constraints as in relational database management systems such as PostgreSQL or Oracle, guaranteeing that the data will be compatible. Use of SQLite-level constraints in a GeoPackage makes it impossible to record invalid data, but it is not a typical workflow.  BGS and Lutra Consulting have been working together to update the Mergin Maps ecosystem so that database constraints will work smoothly.

Seamless integration from tablet to mobile to desktop

The key benefit of the integration between the BGS tool and Mergin Maps is the ease with which data can be moved between different contexts.

Our geologists appreciate having access to all relevant background mapping when in the field and being able to pinpoint their location via GPS. These maps can include Ordnance Survey mapping, aerial photos, digital elevation models, previous survey data, borehole data and even scans of handwritten “fieldslips” drawn by BGS geologists over our almost 200 year history.

Geologists can set up their QGIS project and collate background data on a laptop or desktop PC, then push it to the Mergin server to share with colleagues. In turn, they can pull it down onto rugged Windows tablets (via QGIS) or a mobile phone (via Mergin Maps), depending on their needs. All the layers and styling transfer across seamlessly and the data look the same in each format. On return to the office, data can be synchronised back via the server for work to continue on the laptop or desktop. A Python script uploads the final data to the central BGS data store.

Next steps

BGS have been using the new QGIS-based system for over a year now and data have been recorded from over 2,000 localities, with plans to flexibly expand the types of data that can be captured at each point. We are now working to release their plugin for wider use, beginning with foreign project partners and eventually submitting it to the QGIS Plugin Repository. Watch this space.

---

Photo credits: All photos by John A Stevenson, licensed under Creative Commons Attribution 4.0 International (CC BY 4.0)

You might also like

Portugal
Water utility

Ensuring regulatory compliance for water distribution in Portugal

October 9, 2025

Portugal
Environmental protection
Environmental

Involving communities in conservation through citizen science

September 23, 2025

United Kingdom
Others

Monitoring historic buildings in Derbyshire

August 4, 2025

Czech Republic
Environmental protection
Environmental

Managing mosquito populations with Mergin Maps

December 17, 2024

Switzerland
Local government and municipalities
Government

Citizen science in Zurich with Camptocamp and Mergin Maps

November 12, 2024

Sweden
Others

Digging into the benefits of Mergin Maps for Archaeological research

August 9, 2024

South Africa
Agriculture

Using Mergin Maps as part of an end-to-end solution for farm management

May 20, 2024

Belgium
Construction and engineering
Engineering

Innovating road research and construction

March 13, 2024

Belgium
Telecommunication
Telecommunication

Designing surveys for fibre optics rollout

February 26, 2024

Australia
Public safety

Improving wildfire prevention and firefighting readiness

January 11, 2024

Indonesia
Natural resources

Conducting geological surveys for copper and gold mining

December 6, 2023

Kosovo
Public safety

Monitoring the safety of public spaces in Pristina

August 25, 2023

Latvia
Environmental protection
Environmental

Monitoring Eagle Owl nests

July 27, 2023

Senegal
Others

Mapping ground points in Senegal for imagery stereo-preparation

June 29, 2023

Netherlands
Environmental protection
Environmental

Digital forest mapping to enhance climate-smart forest management

February 28, 2023

Czech Republic
Local government and municipalities
Government

Waste sampling in the digital era

October 31, 2022

Sweden
Local government and municipalities
Government

Surveying the public utilisation of blue-green infrastructure

July 27, 2022

Vietnam
Environmental protection
Environmental

Tracking the Cao Vit Gibbon for conservation

June 8, 2022

United Kingdom
Environmental protection
Environmental

Monitoring bison habitats in the Wilder Blean with low data connectivity

January 31, 2022

Australia
Environmental protection
Environmental

Weeds mapping in Swan Bay

January 25, 2022

United Kingdom
Telecommunication
Telecommunication

Working with clients in the field, from the other side of the globe

January 4, 2022

Netherlands
Others

Making it easy for volunteers to map archaeological discoveries

December 7, 2021

South Africa
Agriculture

Collecting precision farming data on pecan plantations

October 20, 2021

Czech Republic
Others

Organising charitable collection routes with offline Mobile Maps

September 9, 2021

By clicking “Accept All Cookies”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Cookie Policy for more information. Deny cookies here.