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 SectionNotice objects 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 Details

    • getGeometry

      @NonNull public GeoPolyline getGeometry()

      Gets the GeoPolyline object representing the polyline of this section.

      Returns:

      The GeoPolyline object representing the polyline of this section.

    • getSpans

      @NonNull public List<Span> getSpans()

      Gets the Span's that constitute this section.

      Returns:

      The Span's that constitute this section.

    • getManeuvers

      @NonNull public 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 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 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 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 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 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 the OfflineRoutingEngine is only available with the Navigate license. If you're using the RoutingEngine, this feature is considered to be stable.

      Returns:

      All the tolls for this section.

    • getTrafficIncidents

      @NonNull public 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 List<PassThroughWaypoint> getPassthroughWaypoints()

      Gets the list of passthrough waypoints in this section.

      Returns:

      The list of passthrough waypoints in this section.

    • getNoThroughRestrictions

      @NonNull public 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 only sign indicates that vehicles are only allowed to enter this area if they are making a stop. This area will be set only if origin, destination or via waypoint will be requested within the area.