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

Add Restrictions and Descriptors

Restrictions are settings within Network Analyst that determine whether using transportlink features with specific characteristics is prohibited entirely, to be avoided, or preferred. For example, restrictions can be used to prevent cyclists from cycling on motorways or to prevent tall vehicles from traveling on roads with insufficient overhead height clearance. Restrictions need to be set up in Network Analyst for different vehicle types and modes of transport, for example, the restrictions for driving a bus will be different from those for walking or riding a bicycle or driving an HGV. OS MRN contains attribution for different vehicle types and modes of transport that determine whether a transportlink can be traversed using a particular transport type. Network hierarchies set in Network Analyst from the OS MRN data can also be used to set preferences for certain transportlink features to be avoided or preferred.

Descriptors are attributes that describe characteristics of the network or its elements, such as vehicle height and width limits, speed limits, and the number of lanes on a road link. These can come directly from attributes in the network data itself or be derived from them via scripts. Unlike costs, descriptors are not apportioned, meaning that the value does not depend on the length of the edge element. Descriptors can be used to bring attributes for use in hierarchy and restrictions that are not meant to be apportioned and used in a cost into the network dataset.

OS MRN data is structured slightly differently from the model data used in the Esri tutorial, which has different attributes for the FT (from-to, or Along) and TF (to-from, or Against) directions of travel with values populated in both directions of travel, even if the link is one-way. In OS MRN, attributes like maxheight:forward and maxheight:backward only have a value for some one-way transportlink features. If the transportlink is not one-way, the same maxheight (or equivalent) attribute can be used for both the Along (forward) and Against (backward) directions of travel. The same applies for other restrictions such as maxweight and maxlength, including the prohibited restrictions for different vehicle classes or pedestrian travel.

This means that the descriptors such as Height Limit need to be set as conditional with the condition being whether the transportlink is one-way or not.

Most of the Restrictions used in testing can take advantage of the way OS MRN data is structured, with different fields that specifically describe whether a transportlink can be accessed by different modes of transport. The list of access types included in these fields can be found in the AccessValue page of the OS NGD documentation. In this case, the restriction that needs to be defined is where the transportlink has an access value of ‘no’ for the particular mode of transport, for example, a walker cannot use a transportlink if the value in the foot field is ‘no’, and a bus cannot use a transport link if the value in the bus field is ‘no’, etc.

Use Field Scripts to set up Restrictions for driving a bus, driving a motor vehicle, walking, for travelling on one-way network links, and a height restriction for tall vehicles, as per the following screenshots included on this page.

Restriction - Driving a Bus

A screenshot of the Network Dataset Properties window showing the Travel Attributes menu and the Restrictions tab selected. 'Driving a Bus' has been added to the Restriction column.
The Driving a Bus Restriction settings.

Restriction - Driving a Motor Vehicle

A screenshot of the Network Dataset Properties window showing the Travel Attributes menu and the Restrictions tab selected. 'Driving a Bus' and 'Driving a Motor Vehicle' have been added to the Restriction column.
The Driving a Motor Vehicle Restriction settings.

Restriction - Walking

A screenshot of the Network Dataset Properties window showing the Travel Attributes menu and the Restrictions tab selected. 'Driving a Bus', 'Driving a Motor Vehicle', and 'Walking' have been added to the Restriction column.
The Walking Restriction settings.

Restriction - Oneway

In the OS MRN data, there is a oneway field with values of "-1", "yes", or "no".

  • "yes" means the transportlink is one-way in the Along direction.

  • "-1" means the transportlink is one-way in the Against direction.

  • "no" means not one-way.

Therefore, the Prohibited Restrictions need to be set for the opposite scenarios, for example, if the oneway value is "-1", it is one-way in the Against direction and therefore prohibited to travel along that transportlink in the Along direction. Note that both the Along and Against Edge evaluator types are Field Scripts here.

A screenshot of the Network Dataset Properties window showing the Travel Attributes menu and the Restrictions tab selected. An additional 'Oneway' restriction has been added with Usage Type set to minus one.
The Oneway Restriction settings.

Restriction - Height Restriction

Setting up a height restriction also requires setting up a Descriptor for the Height Limit.

As previously mentioned, there are several fields in the OS MRN data relating to maximum height limits on transport links, with values populated depending on whether the transportlink is one-way or not.

If the transportlink is not one-way, there will be a value in the maxheight field. However, if it is one-way the maxheight value will be and we need to use either the maxheight_forward or maxheight_backward value depending on in which direction the transportlink is one-way.

Move to the Descriptors tab in the Travel Attributes section. Use a field script to account for this complexity when setting up a height limit descriptor, with different field scripts required for the Along and Against directions, using some Python code as shown in the screenshot below (use two or four spaces to create the indentation needed in the code block).

Field script text code snippets

Code snippets containing the field script texts which can be copied and pasted into the field script dialogue boxes are included in the associated markdown file “MRN code snippets.md” hosted on the OS MRN Downloads page.

The Height Restriction settings.
The Field Scripts for the Height Limit Descriptor settings in the Along direction of travel
The Field Scripts for the Height Limit Descriptor settings in the Against direction of travel.

Equivalent Descriptors will need to be created for each Restriction created:

  • Weight limits – possibly for each vehicle type if different for say HGVs vs. Buses

  • Width limit

  • Axle load limit

  • Unladen weight limit

It is possible that the same Descriptor can be used in more than one Restriction, as appropriate.

Once the Height Limit Descriptor has been set-up, it can be used to create the Height Restriction. This creates a restriction that says the height limit cannot be less than or equal to the vehicle height, for example, a vehicle that is 3.5m high is restricted from using a transportlink with a height limit of 3.0m.

To create the restriction, a Parameter for the Vehicle Height is also required, which is defined in the Parameters section of the screen as shown in the screenshot belwo. The default value for the Parameter can be left as 0, as this Parameter will be set separately when defining the different modes of travel. More information on defining modes of travel is available on the Add Travel Modes page.

The completed Height Restriction settings screen including the Vehicle Height parameter.

Last updated

Was this helpful?