SafetyLocation
public struct SafetyLocation : HorizonElement
Describes a safety location on the horizon element.
This class holds a horizon element with information regarding safety location. It contains information regarding safety location’s ID, start, end, bounding box, type, speed limit, recommended warning distance and flag indicating whether safety location is zone.
To obtain SafetyLocation
horizon elements, the integrator must create an instance of HorizonEngine
,
register HorizonOptions
including elementTypes
containing HorizonElementType
.safetyLocationType
with a call to HorizonEngine
.registerHorizonOptions
,
and request a HorizonResult
using the previously registered HorizonOptions
with a call to
HorizonEngine
.generateHorizon
.
Important
This is a Public Preview API. It may be changed or removed at any time.-
init(id:
pathID: startOffset: endOffset: safetyLocationId: startLocation: endLocation: boundingBox: type: speedLimit: recommendedWarningDistance: isZone: ) Initializes instance of
SafetyLocation
.Declaration
Swift
public init( id: Int, pathID: Int, startOffset: Measurement<UnitLength>, endOffset: Measurement<UnitLength>, safetyLocationId: String, startLocation: CLLocationCoordinate2D, endLocation: CLLocationCoordinate2D, boundingBox: BoundingBox, type: SafetyLocation.SafetyLocationType, speedLimit: Measurement<UnitSpeed>?, recommendedWarningDistance: Measurement<UnitLength>?, isZone: Bool )
-
Safety location types.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public enum SafetyLocationType
-
Declaration
Swift
public let elementType: HorizonElementType
-
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>
-
Unique id of safety location data object.
Declaration
Swift
public let safetyLocationId: String
-
Start coordinate of the safety location.
Declaration
Swift
public let startLocation: CLLocationCoordinate2D
-
End coordinate of the safety location.
Declaration
Swift
public let endLocation: CLLocationCoordinate2D
-
Bounding box encapsulating safety location.
Declaration
Swift
public let boundingBox: BoundingBox
-
Safety location type.
Declaration
Swift
public let type: SafetyLocationType
-
The maximum allowed speed for the reported safety location.
Declaration
Swift
public let speedLimit: Measurement<UnitSpeed>?
-
Recommended warning distance.
Declaration
Swift
public let recommendedWarningDistance: Measurement<UnitLength>?
-
An indication if the camera is a zone. i.e., if the start and end points are truly different locations.
Declaration
Swift
public let isZone: Bool