> For the complete documentation index, see [llms.txt](https://docs.os.uk/osngd/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/osngd/using-os-ngd-data/os-ngd-transport/transport-networks-in-the-os-ngd/routing-information.md).

# Routing information

This page covers the Routing Hazard, Routing Structure, Restriction, and Average And Indicative Speed Feature Types of the OS RAMI Collection; they'll help you build a more complete routing network.

[Road Links](/osngd/data-structure/transport/transport-network/road-link.md) and [Road Nodes](/osngd/data-structure/transport/transport-network/road-node.md) alone do not provide you with all the information needed to truly route along the road network. To build a more complete routing picture, you'll also need to use the Routing Hazard, Routing Structure, Restriction, and Average and Indicative Speed Feature Types from the OS Routing and Asset Management (RAMI) Collection.

## Routing Hazard and Routing Structure Feature Types

The [Routing Hazard Feature Type](/osngd/data-structure/transport/rami/routing-hazard.md) provides information about potentially hazardous locations on the road network, for example, fords or severe turns.&#x20;

The [Routing Structure Feature Type](/osngd/data-structure/transport/rami/routingstructure.md) provides information about structures on the road network, such as bridges, level crossings, traffic calming gates, and tunnels.

For both feature types, the link back to the road network is represented through the [Routing Hazard Network Reference table](/osngd/data-structure/transport/rami/routing-hazard.md#routing-hazard-network-reference) and [Routing Structure Network Reference table](/osngd/data-structure/transport/rami/routingstructure.md#routing-structure-network-reference), provided with the Routing Hazard and Routing Structure Feature Types, respectively. The reference tables provide you with the identifier of the Road Link or Road Node the hazard or structure applies to through the Network Reference ID attribute.

Routing Hazard and Routing Structure features are represented spatially as line features with the same geometry as the Road Link to which they are referring (or, in the case of referring to a Road Node, the same geometry as the Road Links which reference that Road Node), and At Position X Coordinate and At Position Y Coordinate attributes to specify the exact location of the hazard / structure.

For example, the Road Link in the following image has a gate on it and a gate Routing Structure feature is present (dashed line) that shares the geometry of the Road Link, with attribution providing the coordinates of the gate.

<figure><img src="https://170091638-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0pZjHxkAvY7Mn6TqFBMD%2Fuploads%2FIFZ5okNhrQMZItT61vRq%2F1.png?alt=media&amp;token=24fff3b3-cdca-4ab0-956a-12dd2be2e496" alt="Example visualisation showing a Routing Structure feature. A background map has been included to provide context."><figcaption><p>Example visualisation showing a Routing Structure feature. A background map has been included to provide context.</p></figcaption></figure>

### Links to and from Routing Structure and Routing Hazard

The following table describes the links to and from Routing Hazard and Routing Structure within the OS NGD Transport Theme:

| Source Feature Type                                                                                                                                     | Foreign Key Attribute | Destination Feature Type                                                    |
| ------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- | --------------------------------------------------------------------------- |
| [Routing Structure](/osngd/data-structure/transport/rami/routingstructure.md#routing-structure-network-reference) (Routing Structure Network Reference) | `networkreferenceid`  | [Road Link](/osngd/data-structure/transport/transport-network/road-link.md) |
| [Routing Hazard](/osngd/data-structure/transport/rami/routing-hazard.md#routing-hazard-network-reference) (Routing Hazard Network Reference)            | `networkreferenceid`  | [Road Link](/osngd/data-structure/transport/transport-network/road-link.md) |
| [Routing Structure](/osngd/data-structure/transport/rami/routingstructure.md#routing-structure-network-reference) (Routing Structure Network Reference) | `networkreferenceid`  | [Road Node](/osngd/data-structure/transport/transport-network/road-node.md) |
| [Routing Hazard](/osngd/data-structure/transport/rami/routing-hazard.md#routing-hazard-network-reference) (Routing Hazard Network Reference)            | `networkreferenceid`  | [Road Node](/osngd/data-structure/transport/transport-network/road-node.md) |

## Restriction Feature Type

The [Restriction Feature Type](/osngd/data-structure/transport/rami/restriction.md) provides information about turn restrictions, one-way restrictions, restriction for vehicles (for example, maximum height or weight) and access restrictions. The link back to the road network to tell you which Road Links the restrictions apply to is represented through the [Restriction Network Reference table](/osngd/data-structure/transport/rami/restriction.md#restriction-network-reference). This cross-reference table provides you with the identifier of the Road Link or Road Node the restriction applies to through the [Network Reference ID attribute](/osngd/data-structure/transport/rami/restriction.md#networkreferenceid); it also provides the road direction that the restriction applies to, if applicable, through the [Road Link Direction attribute](/osngd/data-structure/transport/rami/restriction.md#roadlinkdirection).

Restrictions are represented spatially as line features with the same geometry as the Road Link(s) to which they are referring. Turn restrictions will reference more than one Road Link as they are describing a mandatory or forbidden manoeuvre between two or more links.

For example, in the following image, the Road Links have a one-way restriction on them so one-way restriction features are present (dashed line) that share the geometry of the Road Links.

<figure><img src="https://170091638-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0pZjHxkAvY7Mn6TqFBMD%2Fuploads%2FyiPzFs4pxFjSkL8wLgjA%2F2.png?alt=media&amp;token=dc5d6bc2-e135-453f-948b-0d750596bac3" alt="Example visualisation showing Restriction features, which are shown as dashed lines and indicate a one-way restriction for Road Link features. A background map has been included to provide context."><figcaption><p>Example visualisation showing Restriction features. A background map has been included to provide context.</p></figcaption></figure>

Restriction features also include an additional cross-reference table, [Date Time Qualifier](/osngd/data-structure/transport/rami/restriction.md#date-time-qualifier), which describes if a Restriction only applies at particular times of day, week, month or year. The table provides an identifier for the Restriction, an identifier for the Date Time Qualifier itself, and then details of the qualifier in the following columns which will only be populated for the relevant periods, with the rest being null:

* [**Named Date**](/osngd/data-structure/transport/rami/restriction.md#nameddate) – Named times of year, for example, All Year, Autumn, or January.
* [**Start Date**](/osngd/data-structure/transport/rami/restriction.md#startdate) **and** [**End Date**](/osngd/data-structure/transport/rami/restriction.md#enddate) – If the restriction has a specific date range, these dates will be provided in format YYYY-MM-DD.
* [**Start Month Day**](/osngd/data-structure/transport/rami/restriction.md#startmonthday) **and** [**End Month Day**](/osngd/data-structure/transport/rami/restriction.md#endmonthday) – As above, in format MM-DD, for example, 01-31 or 07-04.
* [**Start Time**](/osngd/data-structure/transport/rami/restriction.md#starttime) **and** [**End Time**](/osngd/data-structure/transport/rami/restriction.md#endtime) – If the restriction applies between two specified times, these times will be provided in format hh:mm:ss and will use the 24-hour clock, for example, 09:00:00 or 15:30:00.
* [**Named Time**](/osngd/data-structure/transport/rami/restriction.md#namedtime) – Named times of day, for example, All Day, Dusk till Dawn, or Peak Times. These may not necessarily relate to the same time each day consistently across the country.
* [**Named Period**](/osngd/data-structure/transport/rami/restriction.md#namedperiod) – Named periods of the year, for example, Term Time.
* [**Named Day**](/osngd/data-structure/transport/rami/restriction.md#namedday) – Named days of the week, for example, Monday, Weekends, or Public Holidays.

### Priority of Restrictions

Restrictions features record the effect and nature of the real-world restriction or environmental factors; however, this is not always possible as restrictions may manifest in many different ways yet have the same effect.

For example, a single restriction may consist of a one-way street that has a no entry sign, no right / left turn sign and / or mandatory turn signs on the approach roads. This is represented in the simplest way by recording a one-way street.&#x20;

To ensure a level of consistency, a hierarchy is used when more than one restriction that has the same effect occurs at a given location. Only the restriction that has the highest priority will be captured.&#x20;

Therefore, restrictions primarily model the effect of any restriction in the simplest possible way and secondary to this is recording the real-world manifestation.

#### Restriction priority table

The restriction priority table below outlines the hierarchy used:

<table><thead><tr><th width="144" valign="top">Priority</th><th valign="top">Restriction</th></tr></thead><tbody><tr><td valign="top">1</td><td valign="top">One Way</td></tr><tr><td valign="top">2</td><td valign="top">No Entry / Access Prohibited To / Access Limited To</td></tr><tr><td valign="top">3</td><td valign="top">Mandatory Turns</td></tr><tr><td valign="top">4</td><td valign="top">No Turn</td></tr></tbody></table>

### Links to and from Restriction

The following table describes the links to and from Restriction features within the OS NGD Transport Theme:

| Source Feature Type                                                                                                              | Foreign Key Attribute | Destination Feature Type                                                    |
| -------------------------------------------------------------------------------------------------------------------------------- | --------------------- | --------------------------------------------------------------------------- |
| [Restriction](/osngd/data-structure/transport/rami/restriction.md#restriction-network-reference) (Restriction Network Reference) | `networkreferenceid`  | [Road Link](/osngd/data-structure/transport/transport-network/road-link.md) |
| [Restriction](/osngd/data-structure/transport/rami/restriction.md#restriction-network-reference) (Restriction Network Reference) | `networkreferenceid`  | [Road Node](/osngd/data-structure/transport/transport-network/road-node.md) |
| [Restriction](/osngd/data-structure/transport/rami/restriction.md#date-time-qualifier) (Date Time Qualifier)                     | `restrictionid`       | [Restriction](/osngd/data-structure/transport/rami/restriction.md)          |

## Average And Indicative Speed Feature Type

The [Average And Indicative Speed Feature Type](/osngd/data-structure/transport/rami/average-and-indicative-speed.md) provides the indicative speed limit and average speeds across various time intervals for each Road Link.

Average And Indicative Speed data is provided to OS by a third party: Basemap. Updates to average speed data are published twice a year in March and September and the data represents a historic average of the preceding six months. Updates to indicative speed limits are published quarterly in March, June, September and December. OS Road Links are updated monthly, so some infilling is necessary in the Average And Indicative Speed Feature Type every month to account for the changes to the road network.

Unlike other routing information, the Average And Indicative Speed Feature Type does not refer back to Road Link via a cross reference table, but instead shares the same [OS Identifier (OSID)](/osngd/data-structure/transport/rami/average-and-indicative-speed.md#osid) as the Road Link it refers to.

Average And Indicative Speed features are represented spatially as line features with the same geometry as the Road Link to which they are referring.

Due to this one-to-one relationship with Road Link features, at present, indicative speeds are only changed at the break in a Road Link. This may result in the indicative speed limit change being in a different position to the real world.

In addition to the link back to the Road Link feature, an Average and Indicative Speed feature also provides a link back to the Street feature that it is associated with (if its Road Link has been matched to a Street – see the [Street Feature Type section on the Streets and asset management information page](/osngd/using-os-ngd-data/os-ngd-transport/transport-networks-in-the-os-ngd/streets-and-asset-management-information.md#street-feature-type) for further detail on matching).

### Links to and from Average And Indicative Speed

The following table describes the links to and from Average And Indicative Speed features within the OS NGD Transport Theme:

| Source Feature Type                                                                                  | Foreign Key Attribute | Destination Feature Type                                                    |
| ---------------------------------------------------------------------------------------------------- | --------------------- | --------------------------------------------------------------------------- |
| [Average And Indicative Speed](/osngd/data-structure/transport/rami/average-and-indicative-speed.md) | `osid`                | [Road Link](/osngd/data-structure/transport/transport-network/road-link.md) |
| [Average And Indicative Speed](/osngd/data-structure/transport/rami/average-and-indicative-speed.md) | `formspartofstreet`   | [Street](/osngd/data-structure/transport/transport-network/street.md)       |


---

# 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/osngd/using-os-ngd-data/os-ngd-transport/transport-networks-in-the-os-ngd/routing-information.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.
