GPSTrace

A TimedRoute made of GPSPoints.

Inheritors

Functions

Link copied to clipboard
open fun forEach(action: Consumer<in T>)
Link copied to clipboard
abstract fun getFinalPosition(): GPSPoint
Returns the last point of the trace.
Link copied to clipboard
abstract fun getFinalTime(): Time
Returns the time of the last point of the trace.
Link copied to clipboard
Returns the first point of the trace.
Link copied to clipboard
abstract fun getNextPosition(time: Time): GPSPoint
Returns the first point of the trace after the given time.
Link copied to clipboard
abstract fun getPoint(step: Int): P
Link copied to clipboard
abstract fun getPoints(): List<P>
Link copied to clipboard
abstract fun getPreviousPosition(time: Time): GPSPoint
Returns the last point of the trace before the given time.
Link copied to clipboard
abstract fun getStartTime(): Time
Returns the time of the first point of the trace.
Link copied to clipboard
abstract fun getTripTime(): Double
Returns the time required to travel the route.
Link copied to clipboard
abstract fun interpolate(time: Time): GeoPosition
Interpolates the position along the trace at the given time.
Link copied to clipboard
abstract fun iterator(): Iterator<T>
Link copied to clipboard
abstract fun length(): Double
Link copied to clipboard
fun <R> Iterable<R>.randomElement(randomGenerator: RandomGenerator): R

Returns a random element of the Iterable using the provided randomGenerator.

Link copied to clipboard
fun <R> Iterable<R>.shuffled(randomGenerator: RandomGenerator): Iterable<R>

Fisher–Yates shuffle algorithm using a RandomGenerator. More information on Wikipedia.

Link copied to clipboard
abstract fun size(): Int
Link copied to clipboard
Link copied to clipboard
abstract fun startAt(time: Time): GPSTrace
Shifts the trace so that it starts at the given time.
Link copied to clipboard
open fun stream(): Stream<P>