HorizonSnapshot

class HorizonSnapshot(val paths: List<HorizonPath>, val state: HorizonSnapshotState, mainPathId: Int?)

Snapshot of the horizon provided by the horizon engine for a set of registered horizon options. These options define the extent of the paths on the horizon and which map attributes are collected for those paths.

Constructors

Link copied to clipboard
constructor(paths: List<HorizonPath>, state: HorizonSnapshotState, mainPathId: Int?)

Properties

Link copied to clipboard

List of horizon paths, consisting of the main path and zero or more sub-paths. The main path is the path on which the likeliest map-matched on-road position is located. If there is no on-road map-matched position candidate, there is no main path either. This is because no horizon can be provided if there is no on-road map-matched position. See HorizonPosition for more details. A sub-path is any path in the horizon snapshot that is not the main path. For a horizon snapshot to contain sub-paths, the options for which it was generated must specify sub-path search options for at least one sub-path level.

Link copied to clipboard

Horizon snapshot state.

Functions

Link copied to clipboard

Returns the tree distance from the specified position to the start offset of the given horizon element.

Link copied to clipboard

Returns the coordinates of the given element on the path. If the element is a spot element, the returned list contains a single point. If the element is a segment element, the returned list contains a sequence of points from the element start to the element end, including all the intermediate points. If the element is not in the snapshot, the returned list is empty.

Link copied to clipboard
fun elementsAhead(position: HorizonPosition, distanceAhead: Distance): List<HorizonElement>

Returns the HorizonElements that are ahead of the given position on the path to which the position belongs, within the given distance. Elements of the same type are provided in increasing order of the start offset.

Returns the horizon elements of the given type that are ahead of the given position on the path to which the position belongs, within the given distance. The elements are provided in increasing order of the start offset.

Returns the HorizonElements of the given types that are ahead of the given position on the path to which the position belongs, within the given distance. Elements of the same type are provided in increasing order of the start offset.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

Returns the main horizon path. The main path is the path on which the likeliest map-matched on-road position is located. If there is no on-road map-matched position candidate, there is no main path either because no horizon can be provided. See HorizonPosition for more details.

Link copied to clipboard

Returns the list of horizon sub-paths. A sub-path is any path that is not the main path. For a horizon snapshot to contain sub-paths, the options for which it was generated must specify sub-path search options for at least one sub-path level.

Link copied to clipboard
open override fun toString(): String