Class Waypoint
Class Waypoint
- java.lang.Object
-
- com.here.sdk.routing.Waypoint
-
public final class Waypoint extends java.lang.ObjectRepresents a waypoint, used as input for route calculation.
-
-
Field Summary
Fields Modifier and Type Field Description ChargingStopchargingStopSpecifies of a user-planned charging stop.GeoCoordinatescoordinatesThe waypoint's geographic coordinates.java.lang.IntegercurrentWeightChangeInKilogramsChanges the value ofvehicle[currentWeight]by this value.GeoCoordinatesdisplayLocationOptional coordinates to indicate physical location of the Points of Interest (PoI).DurationdurationThe duration in seconds that should be spent at a waypoint of typeWaypointType.STOPOVER.java.lang.DoubleheadingInDegreesOptional heading angle referenced by true North, clockwise specifying the direction of travel.MatchSideOfStreetmatchSideOfStreetSpecifies how the location set bysideOfStreetHintshould be handled.java.lang.IntegerminCourseDistanceInMetersOptional distance in meters during which the user wants to avoid taking actions.java.lang.StringnameHintOptional name hint causes the router to look for the place with the most similar name.java.lang.IntegeronRoadThresholdInMetersOptional threshold allows specifying a distance within which the waypoint could be considered as being on a highway/bridge/tunnel/sliproad.SegmentReferencesegmentHintOptional segment hint causes the router to try and match to the specified segment.GeoCoordinatessideOfStreetHintOptional coordinates to indicate which side of the street should be used to reach the waypoint.inttransitRadiusInMetersThe maximum allowed distance from the waypoint that the calculated route may pass through.WaypointTypetypeDefines how a waypoint should be considered for route calculation.
-
Constructor Summary
Constructors Constructor Description Waypoint(GeoCoordinates coordinates)Creates a new instance.Waypoint(GeoCoordinates coordinates, WaypointType type, int transitRadiusInMeters, java.lang.Double headingInDegrees, GeoCoordinates sideOfStreetHint, java.lang.Integer minCourseDistanceInMeters, Duration duration)Creates a new instance.Waypoint(GeoCoordinates coordinates, WaypointType type, int transitRadiusInMeters, java.lang.Double headingInDegrees, GeoCoordinates sideOfStreetHint, java.lang.Integer minCourseDistanceInMeters, java.lang.String nameHint, Duration duration)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)inthashCode()
-
-
-
Field Detail
-
coordinates
@NonNull public GeoCoordinates coordinates
The waypoint's geographic coordinates.
-
type
@NonNull public WaypointType type
Defines how a waypoint should be considered for route calculation. The default waypoint type is
WaypointType.STOPOVER.
-
transitRadiusInMeters
public int transitRadiusInMeters
The maximum allowed distance from the waypoint that the calculated route may pass through. For example, to drive past a city without necessarily going into the city center, you can specify the coordinates of the center and a transit radius of 5000m. The default transit radius is zero. If the route should pass the waypoint as close as possible, the default value should be kept. Note that the waypoint will be map-matched to a road. Non-zero values allow a greater tolerance. Note that
sideOfStreetHintoption is ignored if the user sets this option with a value greater than zero.
-
headingInDegrees
@Nullable public java.lang.Double headingInDegrees
Optional heading angle referenced by true North, clockwise specifying the direction of travel. The heading direction may help the routing algorithm to select the best direction, for example, when multiple directions are possible at a road junction. North is 0 degrees, East is 90 degrees, South is 180 degrees, and West is 270 degrees. The value must be in the range [0, 360] when specified. By default, or when
nullis set, heading is ignored for route calculation.
-
sideOfStreetHint
@Nullable public GeoCoordinates sideOfStreetHint
Optional coordinates to indicate which side of the street should be used to reach the waypoint. For example, if the location is to the left of the street, the router will prefer using that side in case the street has dividers. Note that this option is ignored if the user sets
transitRadiusInMetersoption with a value greater than zero.
-
displayLocation
@Nullable public GeoCoordinates displayLocation
Optional coordinates to indicate physical location of the Points of Interest (PoI). It is different from coordinates and
sideOfStreetHintwhich are generally expected to to be on the navigable road network and can be different from actual location of the PoI. display_location is used for visualization of the PoI regardless of road network.
-
minCourseDistanceInMeters
@Nullable public java.lang.Integer minCourseDistanceInMeters
Optional distance in meters during which the user wants to avoid taking actions. For example, if the origin is set by a moving vehicle, the user might not have time to react to immediate actions such as a sharp right turn.
-
nameHint
@Nullable public java.lang.String nameHint
Optional name hint causes the router to look for the place with the most similar name. This can e.g. include things like:
Northbeing used to differentiate between interstatesI66 NorthandI66 South,Downtown Avenuebeing used to correctly select a residential street.
-
matchSideOfStreet
@Nullable public MatchSideOfStreet matchSideOfStreet
Specifies how the location set by
sideOfStreetHintshould be handled. Note that this setting might affect the geometry of the resulting route.
-
duration
@NonNull public Duration duration
The duration in seconds that should be spent at a waypoint of type
WaypointType.STOPOVER. Impacts time-aware calculations. Ignored for waypoints of typeWaypointType.PASS_THROUGH. The default duration is 0 seconds.
-
segmentHint
@Nullable public SegmentReference segmentHint
Optional segment hint causes the router to try and match to the specified segment. Waypoint coordinates need to be on the segment, otherwise waypoint will be matched ignoring the segment hint. This parameter can be used when the waypoint is too close to more than one segment to force matching to a specific one. Only topology segment id and travel direction are used to define the segment hint
Note: The feature is not supported by the
OfflineRoutingEngine.
-
onRoadThresholdInMeters
@Nullable public java.lang.Integer onRoadThresholdInMeters
Optional threshold allows specifying a distance within which the waypoint could be considered as being on a highway/bridge/tunnel/sliproad. Within this threshold, the attributes of the segments do not impact the matching. Outside the threshold only segments which aren't one of highway/bridge/tunnel/sliproad can be matched.
-
chargingStop
@Nullable public ChargingStop chargingStop
Specifies of a user-planned charging stop. The resulting
Routemay contain this waypoint as aRoutePlacewith a non-nullChargingStationmember when the provided specifications indicate that a stop is required to charge the EV battery. Note: If [EVCarOptions.ensure_reachability] is not set astrueand [ChargingStop.min_duration] is not provided, route calculation may suggest a better charging stop instead of this stop.
-
currentWeightChangeInKilograms
@Nullable public java.lang.Integer currentWeightChangeInKilograms
Changes the value of
vehicle[currentWeight]by this value. Enables the support of scenarios where the vehicle takes additional cargo or unloads its cargo along the route. Changes to the configuration of the vehicle, such as adding a trailer, aren't supported. Relative value in kilograms. Available range: from -40000 to 40000 (inclusive). Note:- A route request with this parameter requires to set
VehicleSpecification.currentWeightInKilogramsandVehicleSpecification.grossWeightInKilograms. - This feature is supported in transport modes of
TransportMode.CAR,TransportMode.TAXI, orTransportMode.TRUCK.
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.
- A route request with this parameter requires to set
-
-
Constructor Detail
-
Waypoint
public Waypoint(@NonNull GeoCoordinates coordinates)Creates a new instance.
- Parameters:
coordinates-The waypoint's geographic coordinates.
-
Waypoint
public Waypoint(@NonNull GeoCoordinates coordinates, @NonNull WaypointType type, int transitRadiusInMeters, @Nullable java.lang.Double headingInDegrees, @Nullable GeoCoordinates sideOfStreetHint, @Nullable java.lang.Integer minCourseDistanceInMeters, @NonNull Duration duration)Creates a new instance.
- Parameters:
coordinates-The waypoint's geographic coordinates.
type-Defines how a waypoint should be considered for route calculation. The default waypoint type is
WaypointType.STOPOVER.transitRadiusInMeters-The maximum allowed distance from the waypoint that the calculated route may pass through. For example, to drive past a city without necessarily going into the city center, you can specify the coordinates of the center and a transit radius of 5000m. The default transit radius is zero. If the route should pass the waypoint as close as possible, the default value should be kept. Note that the waypoint will be map-matched to a road. Non-zero values allow a greater tolerance. Note that
sideOfStreetHintoption is ignored if the user sets this option with a value greater than zero.headingInDegrees-Optional heading angle referenced by true North, clockwise specifying the direction of travel. The heading direction may help the routing algorithm to select the best direction, for example, when multiple directions are possible at a road junction. North is 0 degrees, East is 90 degrees, South is 180 degrees, and West is 270 degrees. The value must be in the range [0, 360] when specified. By default, or when
nullis set, heading is ignored for route calculation.sideOfStreetHint-Optional coordinates to indicate which side of the street should be used to reach the waypoint. For example, if the location is to the left of the street, the router will prefer using that side in case the street has dividers. Note that this option is ignored if the user sets
transitRadiusInMetersoption with a value greater than zero.minCourseDistanceInMeters-Optional distance in meters during which the user wants to avoid taking actions. For example, if the origin is set by a moving vehicle, the user might not have time to react to immediate actions such as a sharp right turn.
duration-The duration in seconds that should be spent at a waypoint of type
WaypointType.STOPOVER. Impacts time-aware calculations. Ignored for waypoints of typeWaypointType.PASS_THROUGH. The default duration is 0 seconds.
-
Waypoint
public Waypoint(@NonNull GeoCoordinates coordinates, @NonNull WaypointType type, int transitRadiusInMeters, @Nullable java.lang.Double headingInDegrees, @Nullable GeoCoordinates sideOfStreetHint, @Nullable java.lang.Integer minCourseDistanceInMeters, @Nullable java.lang.String nameHint, @NonNull Duration duration)Creates a new instance.
- Parameters:
coordinates-The waypoint's geographic coordinates.
type-Defines how a waypoint should be considered for route calculation. The default waypoint type is
WaypointType.STOPOVER.transitRadiusInMeters-The maximum allowed distance from the waypoint that the calculated route may pass through. For example, to drive past a city without necessarily going into the city center, you can specify the coordinates of the center and a transit radius of 5000m. The default transit radius is zero. If the route should pass the waypoint as close as possible, the default value should be kept. Note that the waypoint will be map-matched to a road. Non-zero values allow a greater tolerance. Note that
sideOfStreetHintoption is ignored if the user sets this option with a value greater than zero.headingInDegrees-Optional heading angle referenced by true North, clockwise specifying the direction of travel. The heading direction may help the routing algorithm to select the best direction, for example, when multiple directions are possible at a road junction. North is 0 degrees, East is 90 degrees, South is 180 degrees, and West is 270 degrees. The value must be in the range [0, 360] when specified. By default, or when
nullis set, heading is ignored for route calculation.sideOfStreetHint-Optional coordinates to indicate which side of the street should be used to reach the waypoint. For example, if the location is to the left of the street, the router will prefer using that side in case the street has dividers. Note that this option is ignored if the user sets
transitRadiusInMetersoption with a value greater than zero.minCourseDistanceInMeters-Optional distance in meters during which the user wants to avoid taking actions. For example, if the origin is set by a moving vehicle, the user might not have time to react to immediate actions such as a sharp right turn.
nameHint-Optional name hint causes the router to look for the place with the most similar name. This can e.g. include things like:
Northbeing used to differentiate between interstatesI66 NorthandI66 South,Downtown Avenuebeing used to correctly select a residential street.duration-The duration in seconds that should be spent at a waypoint of type
WaypointType.STOPOVER. Impacts time-aware calculations. Ignored for waypoints of typeWaypointType.PASS_THROUGH. The default duration is 0 seconds.
-
-