Class Section
Class Section
- java.lang.Object
-
- com.here.NativeBase
-
- com.here.sdk.routing.Section
-
public final class Section extends NativeBase
A section is a part of the route between two stopovers. A stopover is a location on the route where a stop is made.
Note: A section contains a list of
SectionNoticeobjects that describe potential issues after the route was calculated. If the list is non-empty, it is recommended to evaluate possible violations against the requested route options and reject the route if deemed necessary.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LocationTimegetArrivalLocationTime()Gets the arrival location time of this section.RoutePlacegetArrivalPlace()Gets the arrival place.GeoBoxgetBoundingBox()Gets the closest rectangular area where this section fits in.java.lang.DoublegetConsumptionInKilowattHours()Gets estimated net energy consumption (in kWh) if the transportation mode used for this route is an electric vehicle.LocationTimegetDepartureLocationTime()Gets the departure location time of this section.RoutePlacegetDeparturePlace()Gets the departure place.DurationgetDuration()Gets the estimated time in seconds needed to travel along this section, including real-time traffic delays if available.GeoPolylinegetGeometry()Gets theGeoPolylineobject representing the polyline of this section.intgetLengthInMeters()Gets the length of this section in meters.java.util.List<Maneuver>getManeuvers()Gets the maneuvers for this section.java.util.List<ViolatedRestriction>getNoThroughRestrictions()list of no through restriction.java.util.List<PassThroughWaypoint>getPassthroughWaypoints()Gets the list of passthrough waypoints in this section.java.util.List<PostAction>getPostActions()Gets the post actions that must be done after the arrival at the end of the section.java.util.List<PreAction>getPreActions()Gets the preceding actions that must be done prior to departure at the beginning of the section.java.util.List<SectionNotice>getSectionNotices()Gets the notices which explains the issues encountered during processing of this section.SectionTransportModegetSectionTransportMode()Gets the transport mode of this section.java.util.List<Span>getSpans()Gets theSpan's that constitute this section.java.util.List<Toll>getTolls()Gets all the tolls for this section.DurationgetTrafficDelay()Gets the estimated extra time in seconds spent due to traffic delays along this section.java.util.List<TrafficIncidentOnRoute>getTrafficIncidents()the list of traffic incidents that are found on the section.TransitSectionDetailsgetTransitDetails()Gets the details of a transit section.
-
-
-
Method Detail
-
getGeometry
@NonNull public GeoPolyline getGeometry()
Gets the
GeoPolylineobject representing the polyline of this section.- Returns:
The
GeoPolylineobject representing the polyline of this section.
-
getSpans
@NonNull public java.util.List<Span> getSpans()
Gets the
Span's that constitute this section.- Returns:
The
Span's that constitute this section.
-
getManeuvers
@NonNull public java.util.List<Maneuver> getManeuvers()
Gets the maneuvers for this section.
- Returns:
The maneuvers for this section.
-
getBoundingBox
@NonNull public GeoBox getBoundingBox()
Gets the closest rectangular area where this section fits in.
- Returns:
The closest rectangular area where this section fits in.
-
getLengthInMeters
public int getLengthInMeters()
Gets the length of this section in meters.
- Returns:
The length of this section in meters.
-
getSectionTransportMode
@NonNull public SectionTransportMode getSectionTransportMode()
Gets the transport mode of this section.
- Returns:
The transport mode of this section.
-
getDeparturePlace
@NonNull public RoutePlace getDeparturePlace()
Gets the departure place.
- Returns:
Describes the departure place.
-
getArrivalPlace
@NonNull public RoutePlace getArrivalPlace()
Gets the arrival place.
Describes the arrival place.
- Returns:
The arrival place.
-
getDepartureLocationTime
@Nullable public LocationTime getDepartureLocationTime()
Gets the departure location time of this section.
- Returns:
The departure location time of this section.
-
getArrivalLocationTime
@Nullable public LocationTime getArrivalLocationTime()
Gets the arrival location time of this section.
- Returns:
The arrival location time of this section.
-
getPreActions
@NonNull public java.util.List<PreAction> getPreActions()
Gets the preceding actions that must be done prior to departure at the beginning of the section.
- Returns:
The preceding actions that must be done prior to departure at the beginning of the section.
-
getPostActions
@NonNull public java.util.List<PostAction> getPostActions()
Gets the post actions that must be done after the arrival at the end of the section.
- Returns:
The post actions that must be done after the arrival at the end of the section.
-
getSectionNotices
@NonNull public java.util.List<SectionNotice> getSectionNotices()
Gets the notices which explains the issues encountered during processing of this section. For example, while the scooter transport mode is selected, if no reasonable alternative route is possible except violating controlled-access to highway rule for the section, one notice is generated for the violation. The user must judge all the notices carefully before proceeding.
- Returns:
The notices which explain the issues encountered during processing of this section. For example, while the scooter transport mode is selected, if no reasonable alternative route is possible except violating controlled-access to highway rule for the section, one notice is generated for the violation. The user must judge all the notices carefully before proceeding.
-
getConsumptionInKilowattHours
@Nullable public java.lang.Double getConsumptionInKilowattHours()
Gets estimated net energy consumption (in kWh) if the transportation mode used for this route is an electric vehicle. Note that it can be negative due to energy recuperation.
- Returns:
Estimated net energy consumption (in kWh) if the transportation mode used for this route is an electric vehicle. Note that it can be negative due to energy recuperation.
-
getTransitDetails
@Nullable public TransitSectionDetails getTransitDetails()
Gets the details of a transit section.
- Returns:
The transit details which are avilable for transit sections of a route.
-
getTolls
@NonNull public java.util.List<Toll> getTolls()
Gets all the tolls for this section. Note that tolls are found depending on the transport mode. For example, if pedestrian or bicycle transport mode specified, route sections have no tolls. Indoor route sections have no tolls, too.
Note that tolls are found depending on the transport mode. For example, if pedestrian or bicycle transport mode specified, route sections have no tolls. Indoor route sections have no tolls, too. Note: If you're using the
OfflineRoutingEngine, be aware that this feature is currently in beta. As a result, there may be some bugs or unexpected behaviors. Additionally, this feature and related APIs may be updated in future releases without going through the deprecation process. Note that theOfflineRoutingEngineis only available with the Navigate license. If you're using theRoutingEngine, this feature is considered to be stable.- Returns:
All the tolls for this section.
-
getTrafficIncidents
@NonNull public java.util.List<TrafficIncidentOnRoute> getTrafficIncidents()
the list of traffic incidents that are found on the section.
- Returns:
The list of traffic incidents that are found on the section.
-
getDuration
@NonNull public Duration getDuration()
Gets the estimated time in seconds needed to travel along this section, including real-time traffic delays if available.
- Returns:
The estimated time in seconds needed to travel along this section, including real-time traffic delays if available.
-
getTrafficDelay
@NonNull public Duration getTrafficDelay()
Gets the estimated extra time in seconds spent due to traffic delays along this section. Negative values indicate that the route can be traversed faster than usual.
- Returns:
The estimated extra time in seconds spent due to traffic delays along this section. Negative values indicate that the route can be traversed faster than usual.
-
getPassthroughWaypoints
@NonNull public java.util.List<PassThroughWaypoint> getPassthroughWaypoints()
Gets the list of passthrough waypoints in this section.
- Returns:
The list of passthrough waypoints in this section.
-
getNoThroughRestrictions
@NonNull public java.util.List<ViolatedRestriction> getNoThroughRestrictions()
list of no through restriction.
- Returns:
The list of no through restriction The no through restriction area is part of the road network that do not allow through traffic. For example the
Resident onlysign indicates that vehicles are only allowed to enter this area if they are making a stop. This area will be set only iforigin,destinationorviawaypoint will be requested within the area.
-
-