LaneSection

class LaneSection(val sectionLocation: SectionLocation, val routeOffset: Distance, val length: Distance, val lanes: List<Lane>, val laneSeparators: List<LaneSeparator>) : Section

Represents a route section with a consistent lane configuration. If the number of lanes or the lane separators change, these will be reported as separate LaneSections.

See also

Constructors

Link copied to clipboard
constructor(geometry: List<GeoPoint>, routeOffset: Distance, length: Distance, lanes: List<Lane>, laneSeparators: List<LaneSeparator>)

Constructs a LaneSection object with the given parameters.

constructor(sectionLocation: SectionLocation, routeOffset: Distance, length: Distance, lanes: List<Lane>, laneSeparators: List<LaneSeparator>)

Properties

Link copied to clipboard
open override val geometry: List<GeoPoint>

List of GeoPoints representing the section.

Link copied to clipboard

List of lanes in the section, ordered from left to right. Each contains a list of directions reachable from the lane, and optionally one recommended direction to follow.

Link copied to clipboard

List of lane separators in the section, ordered from left to right. Separators that are shared between adjacent lanes are only listed once. Therefore, there must be one more separator than the number of lanes.

Link copied to clipboard
open override val length: Distance

Distance from the the start point to the end point of the sectionLocation.

Link copied to clipboard
open override val routeOffset: Distance

Distance from the start of the route to the start point of the sectionLocation.

Link copied to clipboard
open override val sectionLocation: SectionLocation

Information about the location of a section on a route's geometry.

Functions

Link copied to clipboard
operator fun component1(): List<GeoPoint>

Returns geometry property of the class.

Link copied to clipboard
operator fun component2(): Distance

Returns routeOffset property of the class.

Link copied to clipboard
operator fun component3(): Distance

Returns length property of the class.

Link copied to clipboard
operator fun component4(): List<Lane>

Returns lanes property of the class.

Link copied to clipboard
operator fun component5(): List<LaneSeparator>

Returns laneSeparators property of the class.

Link copied to clipboard
fun copy(geometry: List<GeoPoint> = this.geometry, routeOffset: Distance = this.routeOffset, length: Distance = this.length, lanes: List<Lane> = this.lanes, laneSeparators: List<LaneSeparator> = this.laneSeparators): LaneSection

Creates a copy of the object, with the option to modify some of its properties.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Indicates whether some other object is "equal to" this one.

Link copied to clipboard
open override fun hashCode(): Int

Returns a hash code value for the object.

Link copied to clipboard
open override fun toString(): String

Returns a string representation of the object.