> 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-topographic-features/standardising-data-for-crossing-points-and-bottlenecks-in-qgis.md).

# Standardising data for Crossing Points and Bottlenecks in QGIS​

This how-to guide follows on from the [Identifying crossing points and bottlenecks​ recipe guide on the OS NGD Docs site](https://docs.os.uk/osngd/getting-started/downloading-with-os-select+build/getting-started-with-os-recommended-recipes/identifying-crossing-points-and-bottlenecks-recipe-guide); the recipe guide gives you step-by-step instructions on how to select relevant pieces of addressing, structures, transport and water data from the OS National Geographic Database (OS NGD) and weave them into a recipe to help you identify the location of bridges, tunnels, fords and crossing points.

Before starting the how-to guide on this page, we suggest you:

1. Create your recipe (following the instructions in the [Identifying crossing points and bottlenecks​ recipe guide on the OS NGD Docs site](https://docs.os.uk/osngd/getting-started/downloading-with-os-select+build/getting-started-with-os-recommended-recipes/identifying-crossing-points-and-bottlenecks-recipe-guide))
2. [Add a data package to your recipe](https://docs.os.uk/osngd/getting-started/downloading-with-os-select+build/getting-started-with-data-packages) (where you can select the format, update frequency and area of interest for the required data)
3. [Download your data package](https://docs.os.uk/osngd/getting-started/downloading-with-os-select+build/getting-started-with-data-packages#how-do-i-find-and-download-an-existing-data-package)

The how-to guide below shows you how to use QGIS to standardise the geometry of the datasets you've downloaded and, if required, standardise the data into one layer using common attributes.​

## Loading data

Add the GeoPackages to the QGIS environment.​

Open QGIS and select Layer -> Add Layer -> Add Vector Layer and then select the GeoPackages you want to load you created earlier in the recipe. Just select the geometry object in the list and do not add cross reference tables.​

<figure><img src="https://3774974716-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzIfdYInJITdcxaLLMhlD%2Fuploads%2F4M8AevGeSLc5LFiGggdK%2Fngd-crossing-points-loading-data-1.png?alt=media&amp;token=a21fc9b2-fc68-4418-bc2f-212f36f37c91" alt="Image of QGIS showing Data Source Manager window"><figcaption></figcaption></figure>

Select Add and you should see four datasets in your map view.​

<figure><img src="https://3774974716-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzIfdYInJITdcxaLLMhlD%2Fuploads%2FbHSI2nOOWACezjNXv4KS%2Fngd-crossing-points-loading-data-2.png?alt=media&amp;token=68de8863-28b8-4ae3-9536-c5d1abfd25dc" alt="Image of QGIS showing 4 data layers over the OS Maps API"><figcaption></figcaption></figure>

## Standardising geometry

### Benefits and caveats

Choosing to standardise geometry will always depend on your use case and may not always be suitable; here are some advantages and draw backs to the approach:

#### Benefits

| NGD Feature​          | Collection​                                                                                             |
| --------------------- | ------------------------------------------------------------------------------------------------------- |
| Combining layers​     | Having a single geometry type can allow users to combine the datasets into a single layer if required.​ |
| Cartographic styling​ | Having a single consistent representation makes map styling easier to interpret and understand.​        |
| Analytical benefits​  | It is quicker to run analysis on point datasets than complex geometry.​                                 |
| Lower storage​        | For large datasets, point geometry takes up less storage and can be more efficient to load.​            |

#### Caveats

| OS NGD Feature​         | Collection​                                                                                                                                                                          |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Cartographic drawbacks​ | Features are now represented as points so the user can no longer see the true shape of the feature (for example, a bridge's outline).                                                |
| Approximate location​   | The point on surface calculations find the approximate centre inside a feature. For complex geometry, this point will be the best central prediction for the location of a feature.​ |
| Analytical drawbacks​   | If a use case requires intersections with the true geometry of the feature (for example, a bridge outline), the point data is not suitable.                                          |
| Cartographic drawbacks​ | The user can no longer visualise the true topographic outline of a feature as it has been generalised to a point.​                                                                   |

### Converting polygon to point data

Create a group layer by right-clicking on the layers tab and clicking add group and name it something suitable.​

<figure><img src="https://3774974716-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzIfdYInJITdcxaLLMhlD%2Fuploads%2FHZ2F5BjddbEpWVwsfx40%2Fngd-crossing-points-standard-geometry-1.png?alt=media&amp;token=c0ca7466-6c8c-43d6-b728-19a82190b20f" alt="Image of QGIS legend showing a group added to the project"><figcaption></figcaption></figure>

Click Processing (on the top ribbon) and open the Processing Toolbox. Type in point on surface and select the tool. In the tool, run the processing for the two topographic features: Road Track Or Path and Compound Structure. Save them to a new GeoPackage by clicking the three dots next to the point call out in the tool.​

<figure><img src="https://3774974716-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzIfdYInJITdcxaLLMhlD%2Fuploads%2FQfJ5IU6vAzCnwe0Tjz6m%2Fngd-crossing-points-standard-geometry-2.png?alt=media&amp;token=a429ec44-0ff3-4af1-9f40-7998ab2a2976" alt="Image of QGIS Point of Surface Tool"><figcaption></figcaption></figure>

Once run, move the features to your group layer and the two layers with point geometry already: Water Point and Non Addressable Object.​ &#x20;

<figure><img src="https://3774974716-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzIfdYInJITdcxaLLMhlD%2Fuploads%2FVRq9JZBfEBpYCBiHMSut%2Fngd-crossing-points-standard-geometry-3.png?alt=media&amp;token=8ad0fd17-bc42-4dac-aa05-5a5ac8a5cdb2" alt="Image of QGIS with point layers added"><figcaption></figcaption></figure>

## Standardising layers​

### Benefits and caveats

Choosing to standardise layers will always depend on your use case and may not always be suitable; here are some&#x20;advantages and drawbacks to the approach:

#### Benefits

| NGD Feature​             | Collection​                                                                                                                        |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------- |
| Single dataset​          | Having a single combined dataset gives a user a centralised view of the features of interest.​                                     |
| Standardised attributes​ | Having consistent attributes across the layer allows the user to compare the differences between different features in one layer.​ |
| Analytical benefits​     | Performing analysis on a single layer with standardised attributes and geometry improves the consistency of analysis.​             |
| Better layer management​ | Having a single layer is easier to load into software or RDBMS systems, making the data easier to manage and share.​               |

#### Caveats

| NGD Feature​       | Collection                                                                                                                                                                                                                                                                                                                                                                                    |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Lost attributes​   | <p>To standardise a layer, we need to keep attributes which have the same representation across the different layers. ​</p><p>​</p><p>Many attributes are unique to certain layers and would be lost when combining data. A good example is the network over / network under attribution on structures. If these are required, then this approach may not be suitable for your use case.​</p> |
| Lower flexibility​ | With all datasets in one layer, the user no longer has the flexibility to use separate layers for analysis with unique attributes.​                                                                                                                                                                                                                                                           |

### Prepare Road Track Or Path data

Right-click the Road Track Or Path layer you converted to points previously and open the attribute table. Click on the edit pencil and then click the Delete Fields function highlighted below.​

<figure><img src="https://3774974716-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzIfdYInJITdcxaLLMhlD%2Fuploads%2FNlhtf3d4p5YXQ200KgZM%2Fngd-crossing-points-standard-layers-1.png?alt=media&amp;token=53de6243-b488-4193-8058-126c78448dcf" alt="Image of QGIS showing the Delete Fields function"><figcaption></figcaption></figure>

Click all the attributes except the ones highlighted in the list below, click okay and then save the layer.

Attributes to keep:

* osid
* versiondate
* ​versionavailablefromdate
* versionavailabletodate​
* changetype
* description
* description\_evidencedate​
* description\_updatedate​
* status​

### Prepare Water Point data

Right-click the Water Point layer and open the attribute table. Click on the edit pencil and then click the Delete Fields function highlighted below doing the same process outlined above in 'Prepare Road Track Or Path data'.​

Click all the attributes except the ones highlighted in the list below, click okay and then save the layer.

Attributes to keep:

* osid
* versiondate
* ​versionavailablefromdate
* versionavailabletodate​
* changetype
* theme
* description
* description\_evidencedate​
* description\_updatedate​
* name1\_text​
* name1\_language​
* name1\_evidencedate​
* name1\_updatedate​
* name2\_text​
* name2\_language​
* name2\_evidencedate​
* name2\_updatedate​
* operationalstatus​

If you have not already, save the Water Point data as a new layer.&#x20;

Right-click the layer and click Properties. Go to Fields, click the edit pencil and rename operationalstatus to status. ​

<figure><img src="https://3774974716-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzIfdYInJITdcxaLLMhlD%2Fuploads%2FZGBgJppEXwThlIhJqMW9%2Fngd-crossing-points-standard-layers-2.png?alt=media&amp;token=4c20465f-268f-40f2-8860-08a7ecc1bf24" alt="Image of QGIS showing the field to update"><figcaption></figcaption></figure>

### Prepare Compound Structure data

Right-click the Compound Structure layer you converted to points previously. Click on the edit pencil and then click the Delete Fields function highlighted below doing the same process outlined above in 'Prepare Road Track Or Path data'.​

Click all the attributes except the ones highlighted in the list below, click okay and then save the layer.&#x20;

Attributes to keep:

* osid
* versiondate
* ​versionavailablefromdate
* versionavailabletodate​
* changetype
* theme
* description
* description\_evidencedate​
* description\_updatedate​
* name1\_text​
* name1\_language​
* name1\_evidencedate​
* name1\_updatedate​
* name2\_text​
* name2\_language​
* name2\_evidencedate​
* name2\_updatedate​
* status​

### Omit Non Addressable Objects

The schema for Non Addressable Objects is too different to the other layers, so cannot accurately be standardised in one dataset. ​For now, we will have to keep this dataset separate as supplementary addresses to support analysis.​ ​

### Combining layers to create a single dataset

Before combining the data right-click each of the dataset layers and click Rename layer. Give the layer a simple name which outlines the source we got the data from. In this instance we named them after their OS NGD feature layers.​

<figure><img src="https://3774974716-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzIfdYInJITdcxaLLMhlD%2Fuploads%2FXD1C8J7uDfJUGqYatf0a%2Fngd-crossing-points-standard-layers-3.png?alt=media&amp;token=c41bba7b-4991-4b8a-ad40-3ad15804fb0a" alt="Image of renamed layers in QGS"><figcaption></figcaption></figure>

In the geoprocessing toolbox search for merge vector layers, select the three layers we have processed, set the CRS to British National Grid and save the output to a new GeoPackage using the three dots next to the output layer.​

<div><figure><img src="https://3774974716-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzIfdYInJITdcxaLLMhlD%2Fuploads%2Fyn2YiawIV78i26WIWB17%2Fngd-crossing-points-standard-layers-4.png?alt=media&amp;token=a50e9e99-046b-413c-92b1-c43a90da14e7" alt="Image of Merge Layers inputs"><figcaption></figcaption></figure> <figure><img src="https://3774974716-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzIfdYInJITdcxaLLMhlD%2Fuploads%2FmWN1y4NuDRl1dR32vW1N%2Fngd-crossing-points-standard-layers-5.png?alt=media&amp;token=b9fd0404-e14a-4a1c-9db8-c9513496c754" alt="Image of Merge Layers parameters"><figcaption></figcaption></figure></div>

The output will be a standardised point dataset with a reduced set of attributes standardised around common values. Remember, if you would like more detail for these layers (for example, detail on bridges or height levels), refer back to the source datasets which have complete attribute sets.​

<figure><img src="https://3774974716-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzIfdYInJITdcxaLLMhlD%2Fuploads%2F5wPeD4zBCf3PSaW1GBZn%2Fngd-crossing-points-standard-layers-6.png?alt=media&amp;token=b26b2871-52ac-49c0-b7ee-51385c61f017" alt="Image of combined Layers in QGIS"><figcaption></figcaption></figure>

Standardised attributes

* osid
* versiondate
* ​versionavailablefromdate
* versionavailabletodate​
* changetype
* theme
* description
* description\_evidencedate​
* description\_updatedate​
* name1\_text​
* name1\_language​
* name1\_evidencedate​
* name1\_updatedate​
* name2\_text​
* name2\_language​
* name2\_evidencedate​
* name2\_updatedate​
* status​


---

# 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-topographic-features/standardising-data-for-crossing-points-and-bottlenecks-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.
