public struct SegmentReference : Hashable

Reference to a segment id with a travel direction.

Note: This is a beta release of this feature, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases without a deprecation process.

  • Topology segment id representing a unique identifier within the HERE platform catalogs.

    Declaration

    Swift

    public var segmentId: String
  • Travel direction of the segment.

    Declaration

    Swift

    public var travelDirection: TravelDirection
  • The start offset is a non-negative number between 0 and 1, representing the start of the referenced range using a proportion of the length of the segment. 0 represents the start and 1 the end of the segment, relative to the indicated direction (or positive direction in case of undirected segments)

    Declaration

    Swift

    public var offsetStart: Double
  • The end offset is a non-negative number between 0 and 1, representing the end of the referenced range using a proportion of the length of the segment. 0 represents the start and 1 the end of the segment, relative to the indicated direction (or positive direction in case of undirected segments)

    Declaration

    Swift

    public var offsetEnd: Double
  • HERE tile partition id (Morton-encoding + level indicator) of the segment. As in HERE Map Content.

    Declaration

    Swift

    public var tilePartitionId: UInt32
  • Local ID of the segment inside the OCM tile.

    Declaration

    Swift

    public var localId: UInt32?
  • Creates a new instance.

    Declaration

    Swift

    public init(segmentId: String = "", travelDirection: TravelDirection = TravelDirection.bidirectional, offsetStart: Double = 0.0, offsetEnd: Double = 1.0, tilePartitionId: UInt32 = 0, localId: UInt32? = 0)
  • Returns an instance of this struct from a string if it’s well-formatted, nil otherwise.

    Declaration

    Swift

    public static func fromString(segmentRef: String) -> SegmentReference?

    Parameters

    segmentRef

    The string to parse

    Return Value

    An instance of SegmentReference from a string if it’s well-formatted, nil otherwise.