GeneralRoadPropertiesElement

public struct GeneralRoadPropertiesElement : HorizonElement

HorizonElement that contains data about general road properties.

To receive such elements in the HorizonSnapshot, specify HorizonElementType.generalRoadPropertiesType in the HorizonOptions that you register with the HorizonEngine:

let horizonOptions = HorizonOptions(
    id: UUID(),
    elementTypes: [.cityType],
    ...
)
  • Initializes GeneralRoadPropertiesElement .

    To obtain GeneralRoadPropertiesElement horizon element, user must create instance of HorizonEngine, register HorizonOptions with call registerHorizonOptions including elementTypes containing value HorizonElementType .generalRoadPropertiesType.

    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>,
        roadProperties: RoadProperties
    )

    Parameters

    id

    Identifier of this element.

    pathID

    Identifier of the path this element belongs to.

    startOffset

    Start offset on the path.

    endOffset

    End offset on the path.

    roadProperties

    Information about the properties of the road at the current location such as number of lanes, driving side, road condition etc.

  • Type of the element. Used to filter elements by type.

    Declaration

    Swift

    public let elementType: HorizonElementType
  • id

    Identifier of this element.

    Declaration

    Swift

    public let id: Int
  • Identifier of the HorizonPath to which this element belongs.

    Declaration

    Swift

    public let pathID: Int
  • Start offset on the HorizonPath.

    Declaration

    Swift

    public let startOffset: Measurement<UnitLength>
  • End offset on the HorizonPath.

    Declaration

    Swift

    public let endOffset: Measurement<UnitLength>
  • General TomTomSDKCommon/Roadproperties of the road, such as number of lanes, road importance designator, physical properties, surface, driving side and others.

    Declaration

    Swift

    public let roadProperties: RoadProperties