DangerousGoodsRestriction

public struct DangerousGoodsRestriction : HorizonElement

Describes dangerous goods restrictions on the horizon element.

This struct holds a horizon element with information regarding dangerous goods restriction. It contains information regarding exact type of dangerous goods restriction and flag indicating whether this restriction is violated with current configuration.

To obtain DangerousGoodsRestriction horizon elements, the integrator must create an instance of HorizonEngine, register HorizonOptions including elementTypes containing HorizonElementType .dangerousGoodsRestrictionType 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.

Lifecycle

  • Creates a single instance of a horizon element that specifies dangerous goods restrictions.

    Declaration

    Swift

    public init(
        id: Int,
        pathID: Int,
        startOffset: Measurement<UnitLength>,
        endOffset: Measurement<UnitLength>,
        restrictions: [RestrictionData]
    )

    Parameters

    id

    The unique ID of the horizon element.

    pathID

    The id of the path to which this element belongs.

    startOffset

    Indicates the start offset along the path this data applies to.

    endOffset

    Indicates the end offset along the path this data applies to.

    restrictions

    A list of dangerous goods restrictions.

RestrictionData

  • Data for a single dangerous goods restriction.

    See more

    Declaration

    Swift

    public struct RestrictionData

RestrictionType

  • Supported dangerous goods restriction types.

    See more

    Declaration

    Swift

    public enum RestrictionType
  • id

    The unique ID of the horizon element.

    Declaration

    Swift

    public let id: Int
  • The id of the path to which this element belongs.

    Declaration

    Swift

    public let pathID: Int
  • Indicates the start offset along the path this data applies to.

    Declaration

    Swift

    public let startOffset: Measurement<UnitLength>
  • Indicates the end offset along the path this data applies to.

    Declaration

    Swift

    public let endOffset: Measurement<UnitLength>
  • Type of the element used to filter elements by type.

    Declaration

    Swift

    public let elementType: HorizonElementType
  • A list of dangerous goods restrictions.

    Declaration

    Swift

    public let restrictions: [RestrictionData]