Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

🆕Standardising data for Crossing Points and Bottlenecks in QGIS​

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.​

This how-to guide follows on from the Identifying crossing points and bottlenecks​ recipe guide on the OS NGD Docs site; 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. Add a data package to your recipe (where you can select the format, update frequency and area of interest for the required data)

Loading data

  • Add the GeoPackages to the QGIS environment.​

  • Open QGIS and select Layer > Add Layer > Add Vector Layer, then select the GeoPackages you want to load that you created earlier in the recipe. Just select the geometry object in the list and don't add cross-reference tables.​

QGIS UI with the Data Source Manager dialog open.
QGIS UI with the Data Source Manager dialog open.
  • Select Add. You should see four datasets in your map view.​

QGIS UI showing four data layers over the OS Maps API.
QGIS UI showing four data layers over the OS Maps API.

Standardising geometry

Benefits and caveats

Choosing to standardise geometry will always depend on your use case and may not always be suitable; the two tables below outline some of the advantages and drawbacks to this 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, clicking Add group and naming the group something suitable.​

QGIS Layers legend showing a group added to the project.
QGIS Layers legend showing a group added to the project.
  • 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.​

QGIS UI with the Vector Geometry – Point on Surface dialog open.
QGIS UI with the Vector Geometry – Point on Surface dialog open.
  • Once run, move the features to your group layer and the two layers with point geometry already: Water Point and Non-Addressable Object.​

Image of QGIS with point layers added
QGIS UI with point layers added to the map.

Standardising layers​

Benefits and caveats

Choosing to standardise layers will always depend on your use case and may not always be suitable; the following two tables outline some of the advantages and drawbacks to this 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​

To standardise a layer, we need to keep attributes which have the same representation across the different layers. ​

​

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.​

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 the edit pencil and then click the Delete Fields function highlighted below.​

QGIS UI showing the Delete Fields diaglog.
QGIS UI showing the Delete Fields diaglog.
  • Click all the attributes except the ones highlighted in the list below. Click OK 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 the edit pencil and then click the Delete Fields function by following 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 OK 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.

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

QGIS UI showing the field to update.
QGIS UI showing the field to update (operationalstatus).

Prepare Compound Structure data

  • Right-click the Compound Structure layer you converted to points previously. Click the edit pencil and then click the Delete Fields function by following 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 OK 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​

    • 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 dataset layer and click Rename layer. Give the layer a simple name that outlines the source you got the data from. In this instance, we named them after their OS NGD feature layers.​

QGIS UI showing the renamed layers.
QGIS UI showing the renamed layers.
  • In the Geoprocessing Toolbox, search for Merge vector layers, select the three layers we have processed, set the coordinate reference system (CRS) to British National Grid and save the output to a new GeoPackage using the three dots next to the Output layer.​

QGIS UI with the Vector General – Merge Vector Layers dialog open.
QGIS UI with the Vector General – Merge Vector Layers dialog open.
QGIS UI with the Vector General – Merge Vector Layers dialog open.
QGIS UI with the Vector General – Merge Vector Layers dialog open.

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.​

QGIS UI showing the combined layers.
QGIS UI showing the combined layers.
  • 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​

Last updated

Was this helpful?