Turn restrictions

Top  Previous  Next

There are 2 types of restricted turns:

 

Banned turns

Delayed turns

 

Normally you will be using banned turns only, since for most normal routing purposes, setting different road speeds for road classes are sufficient for giving a realistic route choice.

 

Generally you can change choice of route A LOT by using wrong values for delays, so take care.

 

If you add a turn restriction, where one of the links making up the restriction is already marked as one-way, it is skipped.

You will not notice this unless you export the turns.

 

 

Fileformat

 

Turn restrictions are stored in a text file, space-delimited.

 

The format is one or more lines, where each line stores one restriction with parameters.

 

7 different types of restrictions are possible:

 

0: Simple Turn restriction, 2 external link ID's + 1 cost value

1: Simple Turn restriction, 2 link ID's + 1 cost value

2: Turn Standard, coordinates for node (rarely used, see RW Net 4 documentation for details)

3: Mandatory turn, 2 external link ID's

4: Mandatory turn, 2 link ID's

5: Complex Turn restriction, >2 external link ID's + 1 cost value

6: Complex Turn restriction, >2 link ID's + 1 cost value

 

Example:

 

// Comment

0 A4003234 A4003127 -1

1 456 230 -1

2 -77.024098 38.902711

3 A4003234 A4003127

4 456 230

5 A4003279 A4003234 A4003127 -1

6 89 456 230 -1

 

Lines starting with // are ignored as comments.

 

If you use turn restrictions with external ID's (type 0, 3 and 5), make sure you have opened the network with an external ID.

 

Type 0, 2, 3 and 4 gets translated into one or more type 1 during import and type 5 gets translated into type 6 during import.

 

If you export the turn restrictions, you will only get type 1 and 6.