/// <summary> /// creats a sorted list of segmetns connected to nodeId. /// roads without outgoing lanes are excluded as they do not need traffic lights /// the segments are arranged in a clockwise direction (Counter clock wise for LHT). /// </summary> /// <param name="nodeId">the junction</param> /// <returns>a list of segments aranged in counter clockwise direction.</returns> private static List <ushort> ArrangedSegments(ushort nodeId) { ClockDirection clockDirection = Shortcuts.LHT ? ClockDirection.CounterClockwise : ClockDirection.Clockwise; List <ushort> segList = new List <ushort>(); ExtNodeManager extNodeManager = ExtNodeManager.Instance; foreach (var segmentId in extNodeManager.GetNodeSegmentIds(nodeId, clockDirection)) { if (CountOutgoingLanes(segmentId, nodeId) > 0) { segList.Add(segmentId); } } return(segList); }