Using OS APIs to build a new flood risk map
As climate specialists warn of more extreme and frequent weather events, Natural Resources Wales (NRW) in partnership with Ordnance Survey (OS) has delivered a publicly available service, that empowers the people of Wales to check if their property is at risk of flooding.
Published in October 2020, the Welsh Government’s National Strategy for Flood and Coastal Erosion Risk Management in Wales sets out the long-term policies for managing flooding. It includes the measures which will be taken over the next decade by organisations like NRW, local authorities and water companies to improve how to plan, prepare and adapt to climate change in Wales over the coming century.
As part of that effort, NRW has worked with OS to develop a new web service that provides flood risk information using a postcode. The Check Your flood Risk by Postcode Service provides a report based on an address, making it easier for the people of Wales to find out the level of flood risk from rivers, the sea and surface water at their property or a property they’re looking to move to.
User research suggested nine out of ten people checking flood risk were members of the public, including those who were looking to purchase a new house. For this reason, a postcode search was chosen as the appropriate geography to search.
However, user research suggested that not all users want to see flood risk results on a map. While GIS and spatial analysis are used behind the scenes, users are presented with a simple table of results.
The use of PSGA Data and OS APIs
To help meet these requirements, PSGA support was provided via the Consultancy and Technical Services (CATS) team at OS. They helped develop a new flood product, that is accessible to the public.
"Access to OS data was made possible via the Geospatial Commissions Public Sector Geospatial Agreement (PSGA). The collaboration makes accurate location data more accessible to public sector organisations, businesses, and developers across Scotland, England, and Wales, and provides a better user experience for all web-based mapping applications."Adam Burke, Lead Specialist Advisor for Geospatial, Natural Resources Wales
Through the use of APIs (Application Programming Interface) a property owner queries their address, which then indicates whether the property is located in a flood risk area.
The following OS APIs are used:
- OS Places API, used to search Address base premium and return a postcode
- OS Features API, used to analyse building outlines and buffer them based on flood risk policy
"The use of the OS APIs means that we can deliver the project in a much quicker and easier way."Garin Evans, Principal Developer, Check Your Flood Risk by Postcode
The OS APIs were used to retrieve two sets of data. Once retrieved, the data was cross-referenced against a series of flood risk data, managed by NRW, to calculate the risk of flooding at the selected location.
The OS Places API obtains a geometric point, based on the user selecting an address. A geometric point then queried the OS Features API, to further retrieve the shape of the location associated with it.
The requirement was to identify risks within metres of a given property. The geometric shape returned by the OS Features API is buffered, to represent a shape X metres around the property.
The buffered shape is used to cross-reference several layers of spatial data, representing surface water, river, and tidal flood data. Further layers were used to determine information including historic flooding, and the presence of flood defences.
The data in each of those layers, including flood defences and historical flood data, is intersected with the buffered shape. This will then create a report for the user, as the flood risk data.
"Flooding can devastate homes and businesses and this service is a big milestone for us in terms of the work we do to help warn and inform communities and businesses. . This new online service is a user-friendly system that anyone can use to look into the level of flood risk in their own area, the areas where friends and family live, or an area they’re considering moving to.” "We can't control the weather and we all have to adapt to an ever-changing climate. We cannot prevent all flooding, but by introducing services like this, we can help people be as prepared as possible for when extreme conditions do occur"Mark Pugh, Principal Advisor for Flood Risk Analysis, Natural Resources Wales
Users that want to view the information on a map, are still able to do so via NRW’s the Check your flood risk on a map service.
About Natural Resources Wales
NRW is the largest Welsh government-sponsored body and principal advisor to the Welsh Government on issues relating to the environment and its natural resources. Formed in 2013, it has largely taken over the functions of the Countryside for Wales, Forestry Commission Wales, and the Environment Agency Wales, as well as certain Welsh Government functions.
One of NRW’s primary roles is to reduce and manage flood risk from main rivers and the coast in Wales. NRW is a Category 1 responder under the Civil Contingencies Act 2004, responding to some 9000 reported incidents a year – including flood incidents.