public static List <SpeedLimitLaneRecord> GetLanes(ushort segmentId) { int maxLaneCount = segmentId.ToSegment().Info.m_lanes.Length; var ret = new List <SpeedLimitLaneRecord>(maxLaneCount); var lanes = netService.GetSortedLanes( segmentId, ref segmentId.ToSegment(), null, LANE_TYPES, VEHICLE_TYPES, sort: false); foreach (var lane in lanes) { SpeedLimitLaneRecord laneData = new SpeedLimitLaneRecord { LaneId = lane.laneId, LaneIndex = lane.laneIndex, }; ret.Add(laneData); } ret.TrimExcess(); return(ret); }