TrafficSection

class TrafficSection(val sectionLocation: SectionLocation, val routeOffset: Distance, val length: Distance, val simpleCategory: SimpleCategory = SimpleCategory.OTHER, val effectiveSpeedInKmh: Int, val delay: Duration, val magnitudeOfDelay: MagnitudeOfDelay? = null, val tec: Tec? = null, val id: String? = null) : Section

Represents a route section with a traffic event.

See also

Constructors

Link copied to clipboard
constructor(geometry: List<GeoPoint>, routeOffset: Distance, length: Distance, simpleCategory: SimpleCategory = SimpleCategory.OTHER, effectiveSpeedInKmh: Int, delay: Duration, magnitudeOfDelay: MagnitudeOfDelay? = null, tec: Tec? = null, id: String? = null)

Constructs a TrafficSection object with the given parameters.

constructor(sectionLocation: SectionLocation, routeOffset: Distance, length: Distance, simpleCategory: SimpleCategory = SimpleCategory.OTHER, effectiveSpeedInKmh: Int, delay: Duration, magnitudeOfDelay: MagnitudeOfDelay? = null, tec: Tec? = null, id: String? = null)

Properties

Link copied to clipboard

Duration of the delay caused by the incident.

Link copied to clipboard

Effective speed of the incident in km/h, averaged over its entire length.

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

List of GeoPoints representing the section.

Link copied to clipboard
val id: String? = null

Important: This is a Public Preview API. It may be changed or removed at any time.

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

Magnitude of delay caused by the incident.

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.

Link copied to clipboard

Type of the incident.

Link copied to clipboard
val tec: Tec? = null

Details of the traffic event.

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(): SimpleCategory

Returns simpleCategory property of the class.

Link copied to clipboard
operator fun component5(): Int

Returns effectiveSpeedInKmh property of the class.

Link copied to clipboard
operator fun component6(): Duration

Returns delay property of the class.

Link copied to clipboard
operator fun component7(): MagnitudeOfDelay?

Returns magnitudeOfDelay property of the class.

Link copied to clipboard
operator fun component8(): Tec?

Returns tec property of the class.

Link copied to clipboard
operator fun component9(): String?

Returns id property of the class.

Link copied to clipboard
fun copy(geometry: List<GeoPoint> = this.geometry, routeOffset: Distance = this.routeOffset, length: Distance = this.length, simpleCategory: SimpleCategory = this.simpleCategory, effectiveSpeedInKmh: Int = this.effectiveSpeedInKmh, delay: Duration = this.delay, magnitudeOfDelay: MagnitudeOfDelay? = this.magnitudeOfDelay, tec: Tec? = this.tec, id: String? = this.id): TrafficSection

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.