StepIntersection

@Serializable
data class StepIntersection(val location: Point, val bearings: List<Int>? = null, val classes: List<String>? = null, val entry: List<Boolean>? = null, val inIndex: Int? = null, val outIndex: Int? = null, val lanes: List<IntersectionLanes>? = null, val geometryIndex: Int? = null, val isUrban: Boolean? = null, val adminIndex: Int? = null, val restStop: RestStop? = null, val tollCollection: TollCollection? = null, val tunnelName: String? = null)

Object representing an intersection along the step.

Since

1.3.0

Constructors

Link copied to clipboard
constructor(location: Point, bearings: List<Int>? = null, classes: List<String>? = null, entry: List<Boolean>? = null, inIndex: Int? = null, outIndex: Int? = null, lanes: List<IntersectionLanes>? = null, geometryIndex: Int? = null, isUrban: Boolean? = null, adminIndex: Int? = null, restStop: RestStop? = null, tollCollection: TollCollection? = null, tunnelName: String? = null)

Types

Link copied to clipboard
class Builder(location: Point)

Builder class for creating StepIntersection instances.

Properties

Link copied to clipboard
@SerialName(value = "admin_index")
val adminIndex: Int? = null

The zero-based index into the admin list on the route leg for this intersection. Use this field to look up the ISO-3166-1 country code for this point on the route. Only available on the driving profile.

Link copied to clipboard
val bearings: List<Int>? = null

An integer list of bearing values available at the step intersection.

Link copied to clipboard
val classes: List<String>? = null

A list of strings signifying the classes of the road exiting the intersection. Possible values:

Link copied to clipboard
val entry: List<Boolean>? = null

A list of entry flags, corresponding in a 1:1 relationship to the bearings. A value of true indicates that the respective road could be entered on a valid route. false indicates that the turn onto the respective road would violate a restriction.

Link copied to clipboard
@SerialName(value = "geometry_index")
val geometryIndex: Int? = null

The zero-based index for the intersection. This value can be used to apply the duration annotation that corresponds with the intersection. Only available on the driving profile.

Link copied to clipboard
@SerialName(value = "in")
val inIndex: Int? = null

Index into bearings/entry array. Used to calculate the bearing before the turn. Namely, the clockwise angle from true north to the direction of travel before the maneuver/passing the intersection. To get the bearing in the direction of driving, the bearing has to be rotated by a value of 180. The value is not supplied for departure maneuvers.

Link copied to clipboard
@SerialName(value = "is_urban")
val isUrban: Boolean? = null
Link copied to clipboard

Array of lane objects that represent the available turn lanes at the intersection. If no lane information is available for an intersection, the lanes property will not be present. Lanes are provided in their order on the street, from left to right.

Link copied to clipboard
@Serializable(with = PointSerializer::class)
val location: Point

A Point representing this intersection location.

Link copied to clipboard
@SerialName(value = "out")
val outIndex: Int? = null

Index out of the bearings/entry array. Used to extract the bearing after the turn. Namely, The clockwise angle from true north to the direction of travel after the maneuver/passing the intersection. The value is not supplied for arrive maneuvers.

Link copied to clipboard
@SerialName(value = "rest_stop")
val restStop: RestStop? = null

An object containing information about passing rest stops along the route. Only available on the driving profile.

Link copied to clipboard
@SerialName(value = "toll_collection")
val tollCollection: TollCollection? = null

An object containing information about a toll collection point along the route. This is a payment booth or overhead electronic gantry payment booth or overhead electronic gantry where toll charge is collected. Only available on the DirectionsCriteria.PROFILE_DRIVING profile.

Link copied to clipboard
@SerialName(value = "tunnel_name")
val tunnelName: String? = null

Name of the tunnel. Value may be present if .classes contains "tunnel".

Functions

Link copied to clipboard

Creates a builder initialized with the current values of the StepIntersection instance.