GeneralRoadElements

public struct GeneralRoadElements : HorizonElement

Describes the general road properties on the horizon element.

Important

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

Lifecycle

  • Initializes GeneralRoadElements .

    Important

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

    Declaration

    Swift

    public init(
        id: Int,
        pathID: Int,
        startOffset: Measurement<UnitLength>,
        endOffset: Measurement<UnitLength>,
        numberOfLanes: NumberOfLanes,
        functionalRoadClass: Int,
        formOfWay: FormOfWay?,
        roadCondition: RoadCondition?,
        drivingSide: DrivingSide,
        isOverpass: Bool = false,
        isUnderpass: Bool = false,
        isDividedRoad: Bool = false,
        isTransitProhibited: Bool = false,
        isTollRoad: Bool = false,
        isUrbanArea: Bool = false,
        isComplexIntersection: Bool = false,
        isTunnel: Bool = false,
        tunnelName: String? = nil,
        isBridge: Bool = false,
        bridgeName: String? = nil
    ) throws

    Parameters

    id

    Identifier of this element.

    pathID

    Identifier of the path where this element belongs.

    startOffset

    Start offset on the path.

    endOffset

    End offset on the path.

    numberOfLanes

    Number of lanes on the road.

    functionalRoadClass

    Functional road class.

    formOfWay

    Form of way. It describes the physical properties of the road.

    roadCondition

    Road condition. It describes the surface of the road.

    drivingSide

    Driving side of the current road.

    isOverpass

    Flag that indicates whether the road is on an overpass: true if on an overpass, false otherwise.

    isUnderpass

    Flag that indicates whether the road is in an underpass: true if in an underpass, false otherwise.

    isDividedRoad

    Flag that indicates whether the road is divided: true if dual carriage, false if single carriage.

    isTransitProhibited

    Flag that indicates whether transit on the road is prohibited: true if prohibited, false otherwise.

    isTollRoad

    Flag that indicates whether the road requires a toll payment: true if toll is required, false otherwise.

    isUrbanArea

    Flag that indicates whether the road is in a built-up area: true if in a built-up area, false otherwise.

    isComplexIntersection

    Flag that indicates whether the road is part of a complex intersection: true if part of a complex intersection, false otherwise.

    isTunnel

    Flag that indicates whether the road is in a tunnel. True if the road is in a tunnel, false otherwise.

    tunnelName

    The name of the tunnel or nil if not applicable (i.e., isTunnel is false) or not available.

    isBridge

    Flag that indicates whether the road is on a bridge. True if the road is on a bridge, false otherwise.

    bridgeName

    The name of the bridge or nil if not applicable (i.e., isBridge is false) or not available.

Public

  • Contains threshold values for the parameters used to initialize GeneralRoadElements.

    Important

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

    Declaration

    Swift

    public enum Constants
  • Declaration

    Swift

    public let elementType: HorizonElementType
  • id

    Declaration

    Swift

    public let id: Int
  • Declaration

    Swift

    public let pathID: Int
  • Declaration

    Swift

    public let startOffset: Measurement<UnitLength>
  • Declaration

    Swift

    public let endOffset: Measurement<UnitLength>
  • Number of lanes on the road.

    Declaration

    Swift

    public let numberOfLanes: NumberOfLanes
  • Functional road class. The value is in the range [0..7] with 0 representing the most important functional road class. The higher the value the less important the road class.

    Declaration

    Swift

    public let functionalRoadClass: Int
  • Form of way. It describes the physical properties of the road.

    Declaration

    Swift

    public let formOfWay: FormOfWay?
  • Road condition. It describes the surface of the road.

    Declaration

    Swift

    public let roadCondition: RoadCondition?
  • Driving side of the current road.

    Declaration

    Swift

    public let drivingSide: DrivingSide
  • Flag that indicates whether the road is on an overpass: true if on an overpass, false otherwise.

    Declaration

    Swift

    public let isOverpass: Bool
  • Flag that indicates whether the road is in an underpass: true if in an underpass, false otherwise.

    Declaration

    Swift

    public let isUnderpass: Bool
  • Flag that indicates whether the road is divided: true if dual carriage, false if single carriage.

    Declaration

    Swift

    public let isDividedRoad: Bool
  • Flag that indicates whether transit on the road is prohibited: true if prohibited, false otherwise.

    Declaration

    Swift

    public let isTransitProhibited: Bool
  • Flag that indicates whether the road requires a toll payment: true if toll is required, false otherwise.

    Declaration

    Swift

    public let isTollRoad: Bool
  • Flag that indicates whether the road is in a built-up area: true if in a built-up area, false otherwise.

    Declaration

    Swift

    public let isUrbanArea: Bool
  • Flag that indicates whether the road is part of a complex intersection: true if part of a complex intersection, false otherwise.

    Declaration

    Swift

    public let isComplexIntersection: Bool
  • Flag that indicates whether the road is in a tunnel. True if the road is in a tunnel, false otherwise. It is not mutually exclusive with isBridge.

    Declaration

    Swift

    public let isTunnel: Bool
  • The name of the tunnel or nil if not applicable (i.e., isTunnel is false) or not available. It is not mutually exclusive with bridgeName.

    Declaration

    Swift

    public let tunnelName: String?
  • Flag that indicates whether the road is on a bridge. True if the road is on a bridge, false otherwise. It is not mutually exclusive with isTunnel.

    Declaration

    Swift

    public let isBridge: Bool
  • The name of the bridge or nil if not applicable (i.e., isBridge is false) or not available. It is not mutually exclusive with tunnelName.

    Declaration

    Swift

    public let bridgeName: String?