> For the complete documentation index, see [llms.txt](https://docs.os.uk/more-than-maps/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.os.uk/more-than-maps/using-buildings/identifying-higher-risk-buildings-in-qgis.md).

# Identifying Higher-Risk Buildings in QGIS

This describes a step-by-step guide using QGIS how you can identify if a building in occupation is classified as Higher-Risk by the Building Safety Act 2022 and the Higher-Risk Buildings (Descriptions and Supplementary Provisions) Regulations 2023 using OS NGD data.

This article follows on from [Identifying higher-risk buildings recipe guide on the OS Docs platform](https://docs.os.uk/osngd/getting-started/downloading-with-os-select+build/getting-started-with-os-recommended-recipes/identifying-higher-risk-buildings-recipe-guide) that will guide you through accessing the data needed for the article below.

Create a new QGIS Project and add your preferred backdrop mapping. In this example, OS Maps API Light is being used.​

Add the 2 feature types you have downloaded from OS Data Hub to a map and order them in table of contents so that `main.add_gb_builtaddress` sits above `main.bld_fts_building`.&#x20;

<figure><img src="/files/U60kFbvuIxTKfpZX75pX" alt=""><figcaption></figcaption></figure>

Change the symbology as desired.​

<figure><img src="/files/1vtjFM1iyltxDsw3iJXF" alt=""><figcaption></figcaption></figure>

Go to the `Processing` toolbox (usually docked on the right side of window) and type `join` into the search box.​

Select and double click the `Joint attributes by location (summary)` tool. The tool dialog box will open. ​

<figure><img src="/files/RTwO92LH3jfZsBb9MosA" alt=""><figcaption></figcaption></figure>

&#x20;

Set Joint to features in as the `main.bld_fts_building` layer and By comparing to as the `main.add_gb_builtaddress` layer.​

Keep the default ‘intersect’ for `Where the features`.​

<figure><img src="/files/TUNmaZNYjjcMOWP7oAS5" alt=""><figcaption></figcaption></figure>

Open the `Fields to summarise` option and select ‘uprn’. Return to main parameters dialog&#x20;

Open the `Summaries to calculate` option and select ‘count’. Return to main parameters dialog&#x20;

<figure><img src="/files/QSj3cqFqQlBeEY02hTeM" alt=""><figcaption></figcaption></figure>

Ensure `Discard records which could not be joined` is selected.​

Open the `Joined layer` option and select an appropriate output location, file type and name.​

Ensure `Open output file after running algorithm` is selected.​

Run the tool. ​

Viewing the new layer you will see that a reduced number of building features have been returned however, there isan additional step required to ensure all the criteria have been met. Open the layers attribute table and sort thenewly created ‘uprn\_count’ attribute in ascending order. You will see that there are a number of buildings with fewerthan 2 ​

<figure><img src="/files/EWoX98sLrs6R1eFFYd5x" alt=""><figcaption></figcaption></figure>

One of the criteria for a Higher-Risk Building is that there are 2 or more residential addresses. From reviewing the `Join_Count` attribute, we can see that there are several buildings with only a single join. This is complicated by the fact that serviced apartments / aparthotels often don’t have individual addresses but do fall within the criteria for Higher-Risk Buildings. We will use an attribute query in the Select By Expression dialogue box to identify non-commercial buildings where is only a single address.​

```sql
"uprn_count" < 2 AND​
(​
"buildinguse_oslandusetiera" <> 'Temporary Or Holiday
Accommodation'​
OR​
"buildinguse_oslandusetiera" IS NULL​
)
```

<figure><img src="/files/MGh0nOfkVXefOsM0MC04" alt=""><figcaption></figcaption></figure>

Now select the `Edit` option from the top ribbon and `Delete` the selected rows. When prompted, accept the deletions and then save your edits. You now have a feature class that contains all buildings that are considered Higher-Risk.​

<figure><img src="/files/u3qBTIQv0POvg2pTBtaF" alt="flow diagram showing the 4 options for constructing the address"><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.os.uk/more-than-maps/using-buildings/identifying-higher-risk-buildings-in-qgis.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
