Shift Lanes with a Lane Offset¶
Move all the lanes of a road sideways, off its reference line, without touching the line itself: for a lane that opens on one side, a road that widens unevenly, or a carriageway that bends away from where the road was drawn. In OpenDRIVE this is the road's lane offset. It moves the centre lane, which normally lies on the reference line, and every lane is counted from the centre lane, so all of them move with it. A positive offset is to the left of the reference line, a negative one to its right. See Road Geometry for how the lane offset sits next to the shape of the reference line.
Everything here happens in the Roads workspace (1) with the Select tool. The lane offset of a road is in the Lane offset block of the panel, between the Road block and the Sections list; it appears whenever the road is selected, or one of its sections or lanes.
Add a lane offset¶
- Select the road.
- In the Lane offset block, click +.
The road gets a lane offset of one level segment at zero, from the start of the road to its end, and the lane offset is selected. Nothing moves yet. The block now shows one row, lane offset, with a summary such as 1 segment · all zero, and the canvas draws the lane offset as a dotted line along the centre lane, with a pink diamond in the middle of the segment.
Segments and nodes¶
A lane offset is a chain of segments. Each segment runs from one node to the next, and the start and the end of the road are nodes too. A segment has one of four shapes, shown in the shape column of the list:
| Shape | What the offset does along the segment |
|---|---|
flat |
Stays at one value, its level |
straight |
Changes evenly, a straight ramp |
smooth |
Changes from one value to the next and is level at both ends, an S-shaped transition |
custom |
Anything else, usually from a file |
Neighbouring segments meet at their nodes: when you change the offset at a node, the segment beside it keeps its far
end and is rebuilt to reach the new value. A flat neighbour becomes a smooth transition, a straight one stays
straight, a smooth one stays smooth.
The usual way to shift the lanes over part of a road is to cut the lane offset into parts and then move a level:
- Cut the lane offset where the shift should begin, and again where it should be complete (see Cut a segment). You now have three level segments at zero.
- Set the level of the last one, for example to
3.5.
The middle segment becomes a smooth transition from 0 to 3.5, and the lanes move one 3.5 m lane to the left from
the end of the transition on.
Edit the segments in the panel¶
Click the lane offset row to select the lane offset (the bin button appears beside it). The list of segments opens under the row:
| Column | Contents |
|---|---|
| number | Click it to open the four coefficients a, b, c and d of the segment. |
| from s | Where the segment starts, in metres along the road. |
| offset | The offset where the segment starts, in metres to the left of the reference line. |
| shape | flat, or a list with smooth and straight for a segment that changes. A segment of any other shape shows a greyed-out custom at the top of the list: it is what the segment is, but it cannot be picked. |
| to | Where a segment that changes arrives. Empty for a level segment. |
| buttons | Cut this segment in half (scissors) and Remove the node this segment starts on (✕). |
Each number can be typed in exactly one place; where it shows up in a second row, it is plain text there:
- The level of a
flatsegment: in its offset field. - The offset at a node no level segment touches: in the offset field of the segment that starts there.
- The offset at the end of the road, when the last segment changes: in the to field of the last row.
- Where a node stands: in the from s field of the segment that starts there. A node stays at least 1 cm from its neighbours; a number outside that range is refused with the range, for example s must be between 0.01 and 99.99 m.
- The shape of a segment that changes: pick smooth or straight in its shape list. The segment keeps the values at its two ends.
A field applies on Enter or when you leave it; Esc puts the old number back. An offset is limited to 50 m either way. What the fields cannot reach, such as a level segment that slopes a little, is in the four coefficients: open a row by its number and type them. A coefficient changes only its own segment, so it can leave a step at a node (see Warnings under the row).
When the lane offset of a file starts later than the start of the road, the list begins with a level segment at zero marked not in file. It behaves like any other segment and is written to the file once you change it. Cutting it writes only the part after the cut; the part before the cut stays at zero and stays out of the file.
Drag the handles on the canvas¶
While the lane offset is selected, its handles stand on the dotted centre line:
- A pink diamond in the middle of each level segment. Drag it across the road to move the level; the segments on both sides follow.
- A small light diamond at a node that no level segment touches. Drag it across the road to set the offset there.
- A tick across the line at each node between two segments. Drag it along the road to move the node; the segments keep their values and only change length.
The value counts from where the drag started, by how far the pointer moved across the road. It sticks to zero, to the values at the far ends of the neighbouring segments, and, for a node, to the starts of the road's lane sections; hold Alt while dragging to turn that off. Pointing at a row of the list lights up the handles of its segment, and pointing at a handle lights up its row. Each drag is one step of Undo.
To select the lane offset on the canvas, click its dotted line. Where the line runs on the reference line, a click there selects the road instead, so a lane offset that is still all zero can only be selected by its row in the panel.
Cut a segment¶
Either:
- click the scissors button Cut this segment in half on the segment's row; or
- Shift + Click on the dotted line of the selected lane offset where the cut should be; or
- right-click the dotted line and choose Split lane offset at s=… m (Shift+LMB), or right-click a pink diamond and choose Split lane offset at s=… m.
The cut does not change the shape of the lane offset: it adds a node. A level segment becomes two level segments at the same level, which can then be moved apart. A cut closer than 1 cm to a node is not made; from the menu, the editor says why in a message.
While the lane offset is selected, Shift + Click on the road's reference line cuts it too, instead of adding a vertex. This is how you cut a lane offset that still runs on the reference line, such as a new one. A right-click on the reference line opens the same Split lane offset at s=… menu where the lane offset runs along it; where the lane offset has left the reference line, the right-click selects the road and opens the road's own menu, which has no cut.
Remove a node¶
Either:
- click ✕ on the row of the segment that starts at the node; or
- right-click the node's tick or light diamond and choose Delete node.
The two segments on either side of the node become one, starting as the first did and ending as the second did. The start and the end of the road cannot be removed: their menu item reads Delete node — an end of the road stays.
Warnings under the row¶
Two things are reported under the lane offset row, selected or not, each with a button that mends it:
| Warning | Button | What the button does |
|---|---|---|
| Steps by … m at s = … m: every lane of the road is broken there. | Close the step | Rebuilds the segment before the step to end where the next one starts. |
| Still changing at the start (or end) of the road, where it is linked: the lanes run at …° to the reference line there. | Level the end | Rebuilds the segment at that end to arrive level, keeping its values. |
A step usually comes from a file or from typed coefficients. The second warning appears only at an end that is linked to another road or a junction. Both are listed with the editor's other findings in Findings.
Where two roads are joined end to end, their reference lines meet but their centre lanes may not: the Linkage findings list this as a lane offset step under Width steps. Close it here: select the lane offset of either road and drag the diamond of its segment at that end; it sticks to the offset that makes the centre lanes meet.
Delete a lane offset¶
- Select the lane offset (click its row).
- Click the bin button Delete lane offset beside the row and confirm Delete lane offset?.
The centre lane goes back onto the reference line, and every lane of the road with it. The block shows + again.
What does not move with the lanes¶
Objects and signals stay where they are when you edit the lane offset of an ordinary road: they are placed relative to the reference line, not to the lanes. After a big shift, check stop lines and crossings in the Objects/Signals workspace.
Connecting roads at the ends of the road move with its lanes, as they do when a lane gets wider.
On a connecting road¶
A connecting road has its own lane offset, edited the same way. One thing differs: an end that stands on an anchor keeps its lanes on the lanes of the road it continues. Change the offset at such an end, and the editor moves the reference line of the connecting road the other way instead, so the lanes stay put. The handle you drag may not move at all; the number in the panel and the reference line show the change. Objects and signals of the connecting road move with its reference line.
The tooltip of the lane offset row and of the affected handles says this, and the Delete lane offset? question says that the reference line will move onto the centre lane at the anchored ends. See Reshape a Connecting Road for the anchors.
Lane offsets from a file¶
A road read from a file with <laneOffset> records shows them as segments, and is saved with the same records, number
for number, except for those you changed. Its dotted line is drawn whenever the offset is not zero, and a small diamond on
the reference line marks where the first record starts. When that is after the start of the road, the editor reads the
offset before it as zero.
When the file is opened, a record is removed if its s is missing, not a number or negative, if a later record has
the same s (the last one stays), or if it starts at or beyond the end of the road. Records out of order are sorted,
not removed. Before you
confirm the load, the load dialog lists each of them under Findings as a lane-offset-cleaned row that names the
road and the record, for example Road 1: the <laneOffset> at s = 75 was removed — …. After the load they stay
in the Unsupported elements panel under Lane offset records corrected. See
Open a File.
