Waypoint

open class Waypoint(lon: Double, lat: Double, val heading: Double = Double.NaN, val transportationMode: TranspMode = TranspMode.PASSENGER_CAR, val radius: Int = 0, var alertRadius: Int = 50, val avoidUTurn: WaypointStatus = WaypointStatus.UNDEF, var useStartAngle: WaypointStatus = WaypointStatus.UNDEF, val useStopRoadSide: WaypointStatus = WaypointStatus.UNDEF, val ignoreTrafficDirection: Boolean = false, val ignoreRoadBlocks: Boolean = false, val ignoreRestrictions: Boolean = false, val ignorePoint: Boolean = false, val ignoreVehicleProfile: Boolean = false, val stopTime: Int = 0, val maxDrivingSpeed: Int = 0, val offroadPolyline: List<GeoPoint>? = null) : GeoPoint

Defines a Waypoint which is a GeoPoint plus additional properties that can impact the routing algorithm. For instance, the radius which defines the distance under which the routing algorithm considers that the waypoint is reached.

If this location is an intermediate point passed to the route planner, avoidUturn defines if route planner must avoid (if possible) a U-turn after reaching waypoint's location. If this location is not the last waypoint passed to the route planner, ignoreTrafficDirections defines if route planner can ignore traffic directions to reach following waypoint passed to the planner (allowing going against traffic directions).

Parameters

lon

waypoint longitude

lat

waypoint latitude

heading

Heading in degrees (clockwise oriented from North)

transportationMode

transportation mode assigned to given waypoint

avoidUTurn

Defines if a UTurn should be avoided (if possible) by the route Planner at this location

useStartAngle

flag indicating presence of the use start angle restriction

radius

radius (in meters) of the waypoint

alertRadius

Defines the distance (in meters) between current's vehicle's position and waypoint's location the navigation guidance should alert that the waypoint is reached.

useStopRoadSide

flag indicating presence of the use stop road side restriction

ignoreTrafficDirection

Defines if route planner can ignore traffic directions to reach following waypoint passed to the Planner (allowing going against traffic directions).

ignoreRoadBlocks

Defines if route planner can ignore road blocks to reach following waypoint passed to the Planner.

ignoreRestrictions

Defines if route planner can ignore turn restrictions and blocked passages to reach following waypoint passed to the Planner.

ignorePoint

Flag indicating if given waypoint is ignored by the planner for its route calculation

ignoreVehicleProfile

Defines if route Planner can ignore the vehicle profile set to the Planner to reach following waypoint passed to the Planner (and therefore ignoring truck attributes).

stopTime

Defines the stop time (in seconds) associated to this Waypoint. If a ChargePoolStop is associated to the RouteWaypoint to which this Waypoint belongs to, the stopTime corresponds to the ChargePoolStop.chargeDuration + the RechargeParameters.stopFixedTime

maxDrivingSpeed

the maximum driving speed (in kph) between current Waypoint and next Waypoint.

offroadPolyline

List of GeoPoint defining an offroad path. Used by GeoDecoder.mapMatchCircuitWaypoints for circuit navigation.

Constructors

Link copied to clipboard
constructor(lon: Double, lat: Double, geoWayPoint: GeoWaypoint, heading: Double, transportationMode: Int, radius: Int, alertRadius: Int, avoidUTurn: Int, useStartAngle: Int, useStopRoadSide: Int, ignoreTrafficDirection: Boolean, ignoreRoadBlocks: Boolean, ignoreRestrictions: Boolean, ignorePoint: Boolean, ignoreVehicleProfile: Boolean, stopTime: Int, maxDrivingSpeed: Int)

Creates a Waypoint form a GeoPoint instance and the additional properties

constructor(lon: Double, lat: Double, heading: Double = Double.NaN, transportationMode: TranspMode = TranspMode.PASSENGER_CAR, radius: Int = 0, alertRadius: Int = 50, avoidUTurn: WaypointStatus = WaypointStatus.UNDEF, useStartAngle: WaypointStatus = WaypointStatus.UNDEF, useStopRoadSide: WaypointStatus = WaypointStatus.UNDEF, ignoreTrafficDirection: Boolean = false, ignoreRoadBlocks: Boolean = false, ignoreRestrictions: Boolean = false, ignorePoint: Boolean = false, ignoreVehicleProfile: Boolean = false, stopTime: Int = 0, maxDrivingSpeed: Int = 0, offroadPolyline: List<GeoPoint>? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val ignorePoint: Boolean = false
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val radius: Int = 0
Link copied to clipboard
val stopTime: Int = 0
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open fun getAngle(other: GeoPoint): Double

Returns clockwise oriented angle (in [0, 360] degrees) between this GeoPoint and another one and vertical.

Link copied to clipboard
open fun getDistance(point: GeoPoint): Double

Returns the euclidian distance (in meters) between this GeoPoint and another one.

Link copied to clipboard
Link copied to clipboard
open fun latitude(): Double

Accessor the latitude.

open fun latitude(lat: Double)

Sets the y-coordinate (latitude)..

Link copied to clipboard
open fun longitude(): Double

Accessor to the longitude

open fun longitude(lon: Double)

Sets the longitude.

Link copied to clipboard
open fun setRoadLocation(roadLocation: GeoRoadLocation)
Link copied to clipboard
fun toJson(): String
Link copied to clipboard
Link copied to clipboard
open override fun toString(): String

Returns the geographical coordinates as a string.

Link copied to clipboard
Link copied to clipboard
open fun x(): Double

Accessor to the x-coordinate (longitude)

open fun x(x: Double)

Sets the x-coordinate (longitude).

Link copied to clipboard
open fun y(): Double

Accessor the y-coordinate (latitude).

open fun y(y: Double)

Sets the y-coordinate (latitude)..