Class AvoidanceOptions

java.lang.Object
com.here.sdk.routing.AvoidanceOptions

public final class AvoidanceOptions extends Object

The options to specify restrictions for route calculations.

  • Field Details

    • roadFeatures

      @NonNull public List<RoadFeatures> roadFeatures

      Features which routes should avoid. Best effort only (not enforced).

    • countries

      @NonNull public List<CountryCode> countries

      Countries that the route must avoid. Strictly enforced. Violations are reported as SectionNoticeCode.VIOLATED_BLOCKED_ROAD. Note: This avoidance option is not supported in IsolineOptions for isoline calculation.

    • avoidBoundingBoxAreasOptions

      @NonNull public List<AvoidBoundingBoxAreaOptions> avoidBoundingBoxAreasOptions

      List of rectangular shapes which routes must not cross and additional options for this area.

    • avoidPolygonAreasOptions

      @NonNull public List<AvoidPolygonAreaOptions> avoidPolygonAreasOptions

      List of polygon shapes which routes must not cross and additional options for this area. Note: Currently, the maximum count of polygons is limited to 20.

    • avoidCorridorAreasOptions

      @NonNull public List<AvoidCorridorAreaOptions> avoidCorridorAreasOptions

      List of corridor shapes which routes must not cross and additional options for this area. Note: Currently, the maximum count of corridors is limited to 20.

    • zoneCategories

      @NonNull public List<ZoneCategory> zoneCategories

      Zone categories which routes must not cross. Strictly enforced. Violations are reported as SectionNoticeCode.VIOLATED_ZONE_RESTRICTION.

    • segments

      @NonNull public List<SegmentReference> segments

      Segments that routes will avoid going through. Violations are reported as SectionNoticeCode.VIOLATED_BLOCKED_ROAD.

      Notes:

      • This avoidance option is not supported in IsolineOptions for isoline calculation.
      • The engine does not support an unlimited number of segments to avoid. The limit is defined by the HERE backend services and may change. For now, the maximum number of segments to avoid should be below 250. This value may change on the backend and it is therefore not guaranteed to be stable.
    • exceptZoneIds

      @NonNull public List<String> exceptZoneIds

      Exception to AvoidanceOptions.zone_categories, which can be specified by list of zone identifiers. e.g. the format of ID is like here:cm:envzone:2. Information about the various routing zones originates from the respective catalogs of platform.here.com. For example, more information on zone IDs for Environmental Zones is available under "https://platform.here.com/data/hrn:here:data::olp-here:rib-2/environmental-zones/overview".

    • zoneIds

      @NonNull public List<String> zoneIds

      List containing identifiers of zones that routes should avoid going through. e.g. the format of ID is like here:cm:envzone:2. Information about the various routing zones originates from the respective catalogs of platform.here.com. For example, more information on zone IDs for Environmental Zones is available under "https://platform.here.com/data/hrn:here:data::olp-here:rib-2/environmental-zones/overview".

    • avoidedTruckRoadTypes

      @NonNull public List<TruckRoadType> avoidedTruckRoadTypes

      Specifies a list of avoided truck road types for vehicle. Refer to TruckRoadType for the available options.

  • Constructor Details

    • AvoidanceOptions

      public AvoidanceOptions()

      Creates a new instance.

  • Method Details