Amazon Location Service Routes V2

2024/10/30 - Amazon Location Service Routes V2 - 5 new api methods

Changes  Release of Amazon Location Routes API. Routes enables you to plan efficient routes and streamline deliveries by leveraging real-time traffic, vehicle restrictions, and turn-by-turn directions.

CalculateRoutes (new) Link ¶

Calculates a route given the following required parameters: Origin and Destination .

See also: AWS API Documentation

Request Syntax

client.calculate_routes(
    Allow={
        'Hot': True|False,
        'Hov': True|False
    },
    ArrivalTime='string',
    Avoid={
        'Areas': [
            {
                'Except': [
                    {
                        'Corridor': {
                            'LineString': [
                                [
                                    123.0,
                                ],
                            ],
                            'Radius': 123
                        },
                        'BoundingBox': [
                            123.0,
                        ],
                        'Polygon': [
                            [
                                [
                                    123.0,
                                ],
                            ],
                        ],
                        'PolylineCorridor': {
                            'Polyline': 'string',
                            'Radius': 123
                        },
                        'PolylinePolygon': [
                            'string',
                        ]
                    },
                ],
                'Geometry': {
                    'Corridor': {
                        'LineString': [
                            [
                                123.0,
                            ],
                        ],
                        'Radius': 123
                    },
                    'BoundingBox': [
                        123.0,
                    ],
                    'Polygon': [
                        [
                            [
                                123.0,
                            ],
                        ],
                    ],
                    'PolylineCorridor': {
                        'Polyline': 'string',
                        'Radius': 123
                    },
                    'PolylinePolygon': [
                        'string',
                    ]
                }
            },
        ],
        'CarShuttleTrains': True|False,
        'ControlledAccessHighways': True|False,
        'DirtRoads': True|False,
        'Ferries': True|False,
        'SeasonalClosure': True|False,
        'TollRoads': True|False,
        'TollTransponders': True|False,
        'TruckRoadTypes': [
            'string',
        ],
        'Tunnels': True|False,
        'UTurns': True|False,
        'ZoneCategories': [
            {
                'Category': 'CongestionPricing'|'Environmental'|'Vignette'
            },
        ]
    },
    DepartNow=True|False,
    DepartureTime='string',
    Destination=[
        123.0,
    ],
    DestinationOptions={
        'AvoidActionsForDistance': 123,
        'AvoidUTurns': True|False,
        'Heading': 123.0,
        'Matching': {
            'NameHint': 'string',
            'OnRoadThreshold': 123,
            'Radius': 123,
            'Strategy': 'MatchAny'|'MatchMostSignificantRoad'
        },
        'SideOfStreet': {
            'Position': [
                123.0,
            ],
            'UseWith': 'AnyStreet'|'DividedStreetOnly'
        },
        'StopDuration': 123
    },
    Driver={
        'Schedule': [
            {
                'DriveDuration': 123,
                'RestDuration': 123
            },
        ]
    },
    Exclude={
        'Countries': [
            'string',
        ]
    },
    InstructionsMeasurementSystem='Metric'|'Imperial',
    Key='string',
    Languages=[
        'string',
    ],
    LegAdditionalFeatures=[
        'Elevation'|'Incidents'|'PassThroughWaypoints'|'Summary'|'Tolls'|'TravelStepInstructions'|'TruckRoadTypes'|'TypicalDuration'|'Zones',
    ],
    LegGeometryFormat='FlexiblePolyline'|'Simple',
    MaxAlternatives=123,
    OptimizeRoutingFor='FastestRoute'|'ShortestRoute',
    Origin=[
        123.0,
    ],
    OriginOptions={
        'AvoidActionsForDistance': 123,
        'AvoidUTurns': True|False,
        'Heading': 123.0,
        'Matching': {
            'NameHint': 'string',
            'OnRoadThreshold': 123,
            'Radius': 123,
            'Strategy': 'MatchAny'|'MatchMostSignificantRoad'
        },
        'SideOfStreet': {
            'Position': [
                123.0,
            ],
            'UseWith': 'AnyStreet'|'DividedStreetOnly'
        }
    },
    SpanAdditionalFeatures=[
        'BestCaseDuration'|'CarAccess'|'Country'|'Distance'|'Duration'|'DynamicSpeed'|'FunctionalClassification'|'Gates'|'Incidents'|'Names'|'Notices'|'PedestrianAccess'|'RailwayCrossings'|'Region'|'RoadAttributes'|'RouteNumbers'|'ScooterAccess'|'SpeedLimit'|'TollSystems'|'TruckAccess'|'TruckRoadTypes'|'TypicalDuration'|'Zones'|'Consumption',
    ],
    Tolls={
        'AllTransponders': True|False,
        'AllVignettes': True|False,
        'Currency': 'string',
        'EmissionType': {
            'Co2EmissionClass': 'string',
            'Type': 'string'
        },
        'VehicleCategory': 'Minibus'
    },
    Traffic={
        'FlowEventThresholdOverride': 123,
        'Usage': 'IgnoreTrafficData'|'UseTrafficData'
    },
    TravelMode='Car'|'Pedestrian'|'Scooter'|'Truck',
    TravelModeOptions={
        'Car': {
            'EngineType': 'Electric'|'InternalCombustion'|'PluginHybrid',
            'LicensePlate': {
                'LastCharacter': 'string'
            },
            'MaxSpeed': 123.0,
            'Occupancy': 123
        },
        'Pedestrian': {
            'Speed': 123.0
        },
        'Scooter': {
            'EngineType': 'Electric'|'InternalCombustion'|'PluginHybrid',
            'LicensePlate': {
                'LastCharacter': 'string'
            },
            'MaxSpeed': 123.0,
            'Occupancy': 123
        },
        'Truck': {
            'AxleCount': 123,
            'EngineType': 'Electric'|'InternalCombustion'|'PluginHybrid',
            'GrossWeight': 123,
            'HazardousCargos': [
                'Combustible'|'Corrosive'|'Explosive'|'Flammable'|'Gas'|'HarmfulToWater'|'Organic'|'Other'|'Poison'|'PoisonousInhalation'|'Radioactive',
            ],
            'Height': 123,
            'HeightAboveFirstAxle': 123,
            'KpraLength': 123,
            'Length': 123,
            'LicensePlate': {
                'LastCharacter': 'string'
            },
            'MaxSpeed': 123.0,
            'Occupancy': 123,
            'PayloadCapacity': 123,
            'TireCount': 123,
            'Trailer': {
                'AxleCount': 123,
                'TrailerCount': 123
            },
            'TruckType': 'LightTruck'|'StraightTruck'|'Tractor',
            'TunnelRestrictionCode': 'string',
            'WeightPerAxle': 123,
            'WeightPerAxleGroup': {
                'Single': 123,
                'Tandem': 123,
                'Triple': 123,
                'Quad': 123,
                'Quint': 123
            },
            'Width': 123
        }
    },
    TravelStepType='Default'|'TurnByTurn',
    Waypoints=[
        {
            'AvoidActionsForDistance': 123,
            'AvoidUTurns': True|False,
            'Heading': 123.0,
            'Matching': {
                'NameHint': 'string',
                'OnRoadThreshold': 123,
                'Radius': 123,
                'Strategy': 'MatchAny'|'MatchMostSignificantRoad'
            },
            'PassThrough': True|False,
            'Position': [
                123.0,
            ],
            'SideOfStreet': {
                'Position': [
                    123.0,
                ],
                'UseWith': 'AnyStreet'|'DividedStreetOnly'
            },
            'StopDuration': 123
        },
    ]
)
type Allow

dict

param Allow

Features that are allowed while calculating. a route

  • Hot (boolean) --

    Allow Hot (High Occupancy Toll) lanes while calculating the route.

  • Hov (boolean) --

    Allow Hov (High Occupancy vehicle) lanes while calculating the route.

type ArrivalTime

string

param ArrivalTime

Time of arrival at the destination.

Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm

Examples:

2020-04-22T17:57:24Z

2020-04-22T17:57:24+02:00

type Avoid

dict

param Avoid

Features that are avoided while calculating a route. Avoidance is on a best-case basis. If an avoidance can't be satisfied for a particular case, it violates the avoidance and the returned response produces a notice for the violation.

  • Areas (list) --

    Areas to be avoided.

    • (dict) --

      Areas to be avoided.

      • Except (list) --

        Exceptions to the provided avoidance geometry, to be included while calculating the route.

        • (dict) --

          Geometry of the area to be avoided.

          • Corridor (dict) --

            Geometry defined as a corridor - a LineString with a radius that defines the width of the corridor.

            • LineString (list) -- [REQUIRED]

              An ordered list of positions used to plot a route on a map.

              Note

              LineString and Polyline are mutually exclusive properties.

              • (list) --

                • (float) --

            • Radius (integer) -- [REQUIRED]

              Radius that defines the width of the corridor.

          • BoundingBox (list) --

            Geometry defined as a bounding box. The first pair represents the X and Y coordinates (longitude and latitude,) of the southwest corner of the bounding box; the second pair represents the X and Y coordinates (longitude and latitude) of the northeast corner.

            • (float) --

          • Polygon (list) --

            Geometry defined as a polygon with only one linear ring.

            • (list) --

              • (list) --

                • (float) --

          • PolylineCorridor (dict) --

            Geometry defined as an encoded corridor - an encoded polyline with a radius that defines the width of the corridor.

            • Polyline (string) -- [REQUIRED]

              An ordered list of positions used to plot a route on a map in a lossy compression format.

              Note

              LineString and Polyline are mutually exclusive properties.

            • Radius (integer) -- [REQUIRED]

              Considers all roads within the provided radius to match the provided destination to. The roads that are considered are determined by the provided Strategy.

              Unit : Meters

          • PolylinePolygon (list) --

            A list of Isoline PolylinePolygon, for each isoline PolylinePolygon, it contains PolylinePolygon of the first linear ring (the outer ring) and from 2nd item to the last item (the inner rings). For more information on polyline encoding, see https://github.com/heremaps/flexiblepolyline/blob/master/README.md.

            • (string) --

      • Geometry (dict) -- [REQUIRED]

        Geometry of the area to be avoided.

        • Corridor (dict) --

          Geometry defined as a corridor - a LineString with a radius that defines the width of the corridor.

          • LineString (list) -- [REQUIRED]

            An ordered list of positions used to plot a route on a map.

            Note

            LineString and Polyline are mutually exclusive properties.

            • (list) --

              • (float) --

          • Radius (integer) -- [REQUIRED]

            Radius that defines the width of the corridor.

        • BoundingBox (list) --

          Geometry defined as a bounding box. The first pair represents the X and Y coordinates (longitude and latitude,) of the southwest corner of the bounding box; the second pair represents the X and Y coordinates (longitude and latitude) of the northeast corner.

          • (float) --

        • Polygon (list) --

          Geometry defined as a polygon with only one linear ring.

          • (list) --

            • (list) --

              • (float) --

        • PolylineCorridor (dict) --

          Geometry defined as an encoded corridor - an encoded polyline with a radius that defines the width of the corridor.

          • Polyline (string) -- [REQUIRED]

            An ordered list of positions used to plot a route on a map in a lossy compression format.

            Note

            LineString and Polyline are mutually exclusive properties.

          • Radius (integer) -- [REQUIRED]

            Considers all roads within the provided radius to match the provided destination to. The roads that are considered are determined by the provided Strategy.

            Unit : Meters

        • PolylinePolygon (list) --

          A list of Isoline PolylinePolygon, for each isoline PolylinePolygon, it contains PolylinePolygon of the first linear ring (the outer ring) and from 2nd item to the last item (the inner rings). For more information on polyline encoding, see https://github.com/heremaps/flexiblepolyline/blob/master/README.md.

          • (string) --

  • CarShuttleTrains (boolean) --

    Avoid car-shuttle-trains while calculating the route.

  • ControlledAccessHighways (boolean) --

    Avoid controlled access highways while calculating the route.

  • DirtRoads (boolean) --

    Avoid dirt roads while calculating the route.

  • Ferries (boolean) --

    Avoid ferries while calculating the route.

  • SeasonalClosure (boolean) --

    Avoid roads that have seasonal closure while calculating the route.

  • TollRoads (boolean) --

    Avoids roads where the specified toll transponders are the only mode of payment.

  • TollTransponders (boolean) --

    Avoids roads where the specified toll transponders are the only mode of payment.

  • TruckRoadTypes (list) --

    Truck road type identifiers. BK1 through BK4 apply only to Sweden. A2,A4,B2,B4,C,D,ET2,ET4 apply only to Mexico.

    Note

    There are currently no other supported values as of 26th April 2024.

    • (string) --

  • Tunnels (boolean) --

    Avoid tunnels while calculating the route.

  • UTurns (boolean) --

    Avoid U-turns for calculation on highways and motorways.

  • ZoneCategories (list) --

    Zone categories to be avoided.

    • (dict) --

      Zone categories to be avoided.

      • Category (string) -- [REQUIRED]

        Zone category to be avoided.

type DepartNow

boolean

param DepartNow

Uses the current time as the time of departure.

type DepartureTime

string

param DepartureTime

Time of departure from thr origin.

Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm

Examples:

2020-04-22T17:57:24Z

2020-04-22T17:57:24+02:00

type Destination

list

param Destination

[REQUIRED]

The final position for the route. In the World Geodetic System (WGS 84) format: [longitude, latitude] .

  • (float) --

type DestinationOptions

dict

param DestinationOptions

Destination related options.

  • AvoidActionsForDistance (integer) --

    Avoids actions for the provided distance. This is typically to consider for users in moving vehicles who may not have sufficient time to make an action at an origin or a destination.

  • AvoidUTurns (boolean) --

    Avoid U-turns for calculation on highways and motorways.

  • Heading (float) --

    GPS Heading at the position.

  • Matching (dict) --

    Options to configure matching the provided position to the road network.

    • NameHint (string) --

      Attempts to match the provided position to a road similar to the provided name.

    • OnRoadThreshold (integer) --

      If the distance to a highway/bridge/tunnel/sliproad is within threshold, the waypoint will be snapped to the highway/bridge/tunnel/sliproad.

      Unit : meters

    • Radius (integer) --

      Considers all roads within the provided radius to match the provided destination to. The roads that are considered are determined by the provided Strategy.

      Unit : Meters

    • Strategy (string) --

      Strategy that defines matching of the position onto the road network. MatchAny considers all roads possible, whereas MatchMostSignificantRoad matches to the most significant road.

  • SideOfStreet (dict) --

    Options to configure matching the provided position to a side of the street.

    • Position (list) -- [REQUIRED]

      Position defined as [longitude, latitude] .

      • (float) --

    • UseWith (string) --

      Strategy that defines when the side of street position should be used.

      Default Value: DividedStreetOnly

  • StopDuration (integer) --

    Duration of the stop.

    Unit : seconds

type Driver

dict

param Driver

Driver related options.

  • Schedule (list) --

    Driver work-rest schedule. Stops are added to fulfil the provided rest schedule.

    • (dict) --

      Interval of the driver work-rest schedule. Stops are added to fulfil the provided rest schedule.

      • DriveDuration (integer) -- [REQUIRED]

        Maximum allowed driving time before stopping to rest.

        Unit : seconds

      • RestDuration (integer) -- [REQUIRED]

        Resting time before the driver can continue driving.

        Unit : seconds

type Exclude

dict

param Exclude

Features to be strictly excluded while calculating the route.

  • Countries (list) -- [REQUIRED]

    List of countries to be avoided defined by two-letter or three-letter country codes.

    • (string) --

type InstructionsMeasurementSystem

string

param InstructionsMeasurementSystem

Measurement system to be used for instructions within steps in the response.

type Key

string

param Key

Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.

type Languages

list

param Languages

List of languages for instructions within steps in the response.

Note

Instructions in the requested language are returned only if they are available.

  • (string) --

type LegAdditionalFeatures

list

param LegAdditionalFeatures

A list of optional additional parameters such as timezone that can be requested for each result.

  • Elevation : Retrieves the elevation information for each location.

  • Incidents : Provides information on traffic incidents along the route.

  • PassThroughWaypoints : Indicates waypoints that are passed through without stopping.

  • Summary : Returns a summary of the route, including distance and duration.

  • Tolls : Supplies toll cost information along the route.

  • TravelStepInstructions : Provides step-by-step instructions for travel along the route.

  • TruckRoadTypes : Returns information about road types suitable for trucks.

  • TypicalDuration : Gives typical travel duration based on historical data.

  • Zones : Specifies the time zone information for each waypoint.

  • (string) --

type LegGeometryFormat

string

param LegGeometryFormat

Specifies the format of the geometry returned for each leg of the route. You can choose between two different geometry encoding formats.

FlexiblePolyline : A compact and precise encoding format for the leg geometry. For more information on the format, see the GitHub repository for FlexiblePolyline.

Simple : A less compact encoding, which is easier to decode but may be less precise and result in larger payloads.

type MaxAlternatives

integer

param MaxAlternatives

Maximum number of alternative routes to be provided in the response, if available.

type OptimizeRoutingFor

string

param OptimizeRoutingFor

Specifies the optimization criteria for calculating a route.

Default Value: FastestRoute

type Origin

list

param Origin

[REQUIRED]

The start position for the route.

  • (float) --

type OriginOptions

dict

param OriginOptions

Origin related options.

  • AvoidActionsForDistance (integer) --

    Avoids actions for the provided distance. This is typically to consider for users in moving vehicles who may not have sufficient time to make an action at an origin or a destination.

  • AvoidUTurns (boolean) --

    Avoid U-turns for calculation on highways and motorways.

  • Heading (float) --

    GPS Heading at the position.

  • Matching (dict) --

    Options to configure matching the provided position to the road network.

    • NameHint (string) --

      Attempts to match the provided position to a road similar to the provided name.

    • OnRoadThreshold (integer) --

      If the distance to a highway/bridge/tunnel/sliproad is within threshold, the waypoint will be snapped to the highway/bridge/tunnel/sliproad.

      Unit : meters

    • Radius (integer) --

      Considers all roads within the provided radius to match the provided destination to. The roads that are considered are determined by the provided Strategy.

      Unit : Meters

    • Strategy (string) --

      Strategy that defines matching of the position onto the road network. MatchAny considers all roads possible, whereas MatchMostSignificantRoad matches to the most significant road.

  • SideOfStreet (dict) --

    Options to configure matching the provided position to a side of the street.

    • Position (list) -- [REQUIRED]

      Position defined as [longitude, latitude] .

      • (float) --

    • UseWith (string) --

      Strategy that defines when the side of street position should be used.

      Default Value: DividedStreetOnly

type SpanAdditionalFeatures

list

param SpanAdditionalFeatures

A list of optional features such as SpeedLimit that can be requested for a Span. A span is a section of a Leg for which the requested features have the same values.

  • (string) --

type Tolls

dict

param Tolls

Toll related options.

  • AllTransponders (boolean) --

    Specifies if the user has valid transponder with access to all toll systems. This impacts toll calculation, and if true the price with transponders is used.

  • AllVignettes (boolean) --

    Specifies if the user has valid vignettes with access for all toll roads. If a user has a vignette for a toll road, then toll cost for that road is omitted since no further payment is necessary.

  • Currency (string) --

    Currency code corresponding to the price. This is the same as Currency specified in the request.

  • EmissionType (dict) --

    Emission type of the vehicle for toll cost calculation.

    Valid values : Euro1, Euro2, Euro3, Euro4, Euro5, Euro6, EuroEev

    • Co2EmissionClass (string) --

      The CO 2 emission classes.

    • Type (string) -- [REQUIRED]

      Type of the emission.

      Valid values : Euro1, Euro2, Euro3, Euro4, Euro5, Euro6, EuroEev

  • VehicleCategory (string) --

    Vehicle category for toll cost calculation.

type Traffic

dict

param Traffic

Traffic related options.

  • FlowEventThresholdOverride (integer) --

    Duration for which flow traffic is considered valid. For this period, the flow traffic is used over historical traffic data. Flow traffic refers to congestion, which changes very quickly. Duration in seconds for which flow traffic event would be considered valid. While flow traffic event is valid it will be used over the historical traffic data.

  • Usage (string) --

    Determines if traffic should be used or ignored while calculating the route.

    Default Value: UseTrafficData

type TravelMode

string

param TravelMode

Specifies the mode of transport when calculating a route. Used in estimating the speed of travel and road compatibility.

Default Value: Car

type TravelModeOptions

dict

param TravelModeOptions

Travel mode related options for the provided travel mode.

  • Car (dict) --

    Travel mode options when the provided travel mode is "Car"

    • EngineType (string) --

      Engine type of the vehicle.

    • LicensePlate (dict) --

      The vehicle License Plate.

      • LastCharacter (string) --

        The last character of the License Plate.

    • MaxSpeed (float) --

      Maximum speed specified.

      Unit : KilometersPerHour

    • Occupancy (integer) --

      The number of occupants in the vehicle.

      Default Value: 1

  • Pedestrian (dict) --

    Travel mode options when the provided travel mode is "Pedestrian"

    • Speed (float) --

      Walking speed in Kilometers per hour.

  • Scooter (dict) --

    Travel mode options when the provided travel mode is "Scooter"

    • EngineType (string) --

      Engine type of the vehicle.

    • LicensePlate (dict) --

      The vehicle License Plate.

      • LastCharacter (string) --

        The last character of the License Plate.

    • MaxSpeed (float) --

      Maximum speed

      Unit : KilometersPerHour

    • Occupancy (integer) --

      The number of occupants in the vehicle.

      Default Value: 1

  • Truck (dict) --

    Travel mode options when the provided travel mode is "Truck"

    • AxleCount (integer) --

      Total number of axles of the vehicle.

    • EngineType (string) --

      Engine type of the vehicle.

    • GrossWeight (integer) --

      Gross weight of the vehicle including trailers, and goods at capacity.

      Unit : Kilograms

    • HazardousCargos (list) --

      List of Hazardous cargo contained in the vehicle.

      • (string) --

    • Height (integer) --

      Height of the vehicle.

      Unit : centimeters

    • HeightAboveFirstAxle (integer) --

      Height of the vehicle above its first axle.

      Unit : centimeters

    • KpraLength (integer) --

      Kingpin to rear axle length of the vehicle.

      Unit : centimeters

    • Length (integer) --

      Length of the vehicle.

      Unit : c

    • LicensePlate (dict) --

      The vehicle License Plate.

      • LastCharacter (string) --

        The last character of the License Plate.

    • MaxSpeed (float) --

      Maximum speed

      Unit : KilometersPerHour

    • Occupancy (integer) --

      The number of occupants in the vehicle.

      Default Value: 1

    • PayloadCapacity (integer) --

      Payload capacity of the vehicle and trailers attached.

      Unit : kilograms

    • TireCount (integer) --

      Number of tires on the vehicle.

    • Trailer (dict) --

      Trailer options corresponding to the vehicle.

      • AxleCount (integer) --

        Total number of axles of the vehicle.

      • TrailerCount (integer) --

        Number of trailers attached to the vehicle.

        Default Value: 0

    • TruckType (string) --

      Type of the truck.

    • TunnelRestrictionCode (string) --

      The tunnel restriction code.

      Tunnel categories in this list indicate the restrictions which apply to certain tunnels in Great Britain. They relate to the types of dangerous goods that can be transported through them.

      • Tunnel Category B

        • Risk Level : Limited risk

        • Restrictions : Few restrictions

      • Tunnel Category C

        • Risk Level : Medium risk

        • Restrictions : Some restrictions

      • Tunnel Category D

        • Risk Level : High risk

        • Restrictions : Many restrictions occur

      • Tunnel Category E

        • Risk Level : Very high risk

        • Restrictions : Restricted tunnel

    • WeightPerAxle (integer) --

      Heaviest weight per axle irrespective of the axle type or the axle group. Meant for usage in countries where the differences in axle types or axle groups are not distinguished.

      Unit : Kilograms

    • WeightPerAxleGroup (dict) --

      Specifies the total weight for the specified axle group. Meant for usage in countries that have different regulations based on the axle group type.

      Unit : Kilograms

      • Single (integer) --

        Weight for single axle group.

        Unit : Kilograms

      • Tandem (integer) --

        Weight for tandem axle group.

        Unit : Kilograms

      • Triple (integer) --

        Weight for triple axle group.

        Unit : Kilograms

      • Quad (integer) --

        Weight for quad axle group.

        Unit : Kilograms

      • Quint (integer) --

        Weight for quad quint group.

        Unit : Kilograms

    • Width (integer) --

      Width of the vehicle.

      Unit : centimeters

type TravelStepType

string

param TravelStepType

Type of step returned by the response. Default provides basic steps intended for web based applications. TurnByTurn provides detailed instructions with more granularity intended for a turn based naviagtion system.

type Waypoints

list

param Waypoints

List of waypoints between the Origin and Destination.

  • (dict) --

    Waypoint between the Origin and Destination.

    • AvoidActionsForDistance (integer) --

      Avoids actions for the provided distance. This is typically to consider for users in moving vehicles who may not have sufficient time to make an action at an origin or a destination.

    • AvoidUTurns (boolean) --

      Avoid U-turns for calculation on highways and motorways.

    • Heading (float) --

      GPS Heading at the position.

    • Matching (dict) --

      Options to configure matching the provided position to the road network.

      • NameHint (string) --

        Attempts to match the provided position to a road similar to the provided name.

      • OnRoadThreshold (integer) --

        If the distance to a highway/bridge/tunnel/sliproad is within threshold, the waypoint will be snapped to the highway/bridge/tunnel/sliproad.

        Unit : meters

      • Radius (integer) --

        Considers all roads within the provided radius to match the provided destination to. The roads that are considered are determined by the provided Strategy.

        Unit : Meters

      • Strategy (string) --

        Strategy that defines matching of the position onto the road network. MatchAny considers all roads possible, whereas MatchMostSignificantRoad matches to the most significant road.

    • PassThrough (boolean) --

      If the waypoint should not be treated as a stop. If yes, the waypoint is passed through and doesn't split the route into different legs.

    • Position (list) -- [REQUIRED]

      Position defined as [longitude, latitude] .

      • (float) --

    • SideOfStreet (dict) --

      Options to configure matching the provided position to a side of the street.

      • Position (list) -- [REQUIRED]

        Position defined as [longitude, latitude] .

        • (float) --

      • UseWith (string) --

        Strategy that defines when the side of street position should be used.

        Default Value: DividedStreetOnly

    • StopDuration (integer) --

      Duration of the stop.

      Unit : seconds

rtype

dict

returns

Response Syntax

{
    'LegGeometryFormat': 'FlexiblePolyline'|'Simple',
    'Notices': [
        {
            'Code': 'MainLanguageNotFound'|'Other'|'TravelTimeExceedsDriverWorkHours',
            'Impact': 'High'|'Low'
        },
    ],
    'PricingBucket': 'string',
    'Routes': [
        {
            'Legs': [
                {
                    'FerryLegDetails': {
                        'AfterTravelSteps': [
                            {
                                'Duration': 123,
                                'Instruction': 'string',
                                'Type': 'Deboard'
                            },
                        ],
                        'Arrival': {
                            'Place': {
                                'Name': 'string',
                                'OriginalPosition': [
                                    123.0,
                                ],
                                'Position': [
                                    123.0,
                                ],
                                'WaypointIndex': 123
                            },
                            'Time': 'string'
                        },
                        'BeforeTravelSteps': [
                            {
                                'Duration': 123,
                                'Instruction': 'string',
                                'Type': 'Board'
                            },
                        ],
                        'Departure': {
                            'Place': {
                                'Name': 'string',
                                'OriginalPosition': [
                                    123.0,
                                ],
                                'Position': [
                                    123.0,
                                ],
                                'WaypointIndex': 123
                            },
                            'Time': 'string'
                        },
                        'Notices': [
                            {
                                'Code': 'AccuratePolylineUnavailable'|'NoSchedule'|'Other'|'ViolatedAvoidFerry'|'ViolatedAvoidRailFerry',
                                'Impact': 'High'|'Low'
                            },
                        ],
                        'PassThroughWaypoints': [
                            {
                                'GeometryOffset': 123,
                                'Place': {
                                    'OriginalPosition': [
                                        123.0,
                                    ],
                                    'Position': [
                                        123.0,
                                    ],
                                    'WaypointIndex': 123
                                }
                            },
                        ],
                        'RouteName': 'string',
                        'Spans': [
                            {
                                'Country': 'string',
                                'Distance': 123,
                                'Duration': 123,
                                'GeometryOffset': 123,
                                'Names': [
                                    {
                                        'Language': 'string',
                                        'Value': 'string'
                                    },
                                ],
                                'Region': 'string'
                            },
                        ],
                        'Summary': {
                            'Overview': {
                                'Distance': 123,
                                'Duration': 123
                            },
                            'TravelOnly': {
                                'Duration': 123
                            }
                        },
                        'TravelSteps': [
                            {
                                'Distance': 123,
                                'Duration': 123,
                                'GeometryOffset': 123,
                                'Instruction': 'string',
                                'Type': 'Depart'|'Continue'|'Arrive'
                            },
                        ]
                    },
                    'Geometry': {
                        'LineString': [
                            [
                                123.0,
                            ],
                        ],
                        'Polyline': 'string'
                    },
                    'Language': 'string',
                    'PedestrianLegDetails': {
                        'Arrival': {
                            'Place': {
                                'Name': 'string',
                                'OriginalPosition': [
                                    123.0,
                                ],
                                'Position': [
                                    123.0,
                                ],
                                'SideOfStreet': 'Left'|'Right',
                                'WaypointIndex': 123
                            },
                            'Time': 'string'
                        },
                        'Departure': {
                            'Place': {
                                'Name': 'string',
                                'OriginalPosition': [
                                    123.0,
                                ],
                                'Position': [
                                    123.0,
                                ],
                                'SideOfStreet': 'Left'|'Right',
                                'WaypointIndex': 123
                            },
                            'Time': 'string'
                        },
                        'Notices': [
                            {
                                'Code': 'AccuratePolylineUnavailable'|'Other'|'ViolatedAvoidDirtRoad'|'ViolatedAvoidTunnel'|'ViolatedPedestrianOption',
                                'Impact': 'High'|'Low'
                            },
                        ],
                        'PassThroughWaypoints': [
                            {
                                'GeometryOffset': 123,
                                'Place': {
                                    'OriginalPosition': [
                                        123.0,
                                    ],
                                    'Position': [
                                        123.0,
                                    ],
                                    'WaypointIndex': 123
                                }
                            },
                        ],
                        'Spans': [
                            {
                                'BestCaseDuration': 123,
                                'Country': 'string',
                                'Distance': 123,
                                'Duration': 123,
                                'DynamicSpeed': {
                                    'BestCaseSpeed': 123.0,
                                    'TurnDuration': 123,
                                    'TypicalSpeed': 123.0
                                },
                                'FunctionalClassification': 123,
                                'GeometryOffset': 123,
                                'Incidents': [
                                    123,
                                ],
                                'Names': [
                                    {
                                        'Language': 'string',
                                        'Value': 'string'
                                    },
                                ],
                                'PedestrianAccess': [
                                    'Allowed'|'Indoors'|'NoThroughTraffic'|'Park'|'Stairs'|'TollRoad',
                                ],
                                'Region': 'string',
                                'RoadAttributes': [
                                    'Bridge'|'BuiltUpArea'|'ControlledAccessHighway'|'DirtRoad'|'DividedRoad'|'Motorway'|'PrivateRoad'|'Ramp'|'RightHandTraffic'|'Roundabout'|'Tunnel'|'UnderConstruction',
                                ],
                                'RouteNumbers': [
                                    {
                                        'Direction': 'East'|'North'|'South'|'West',
                                        'Language': 'string',
                                        'Value': 'string'
                                    },
                                ],
                                'SpeedLimit': {
                                    'MaxSpeed': 123.0,
                                    'Unlimited': True|False
                                },
                                'TypicalDuration': 123
                            },
                        ],
                        'Summary': {
                            'Overview': {
                                'Distance': 123,
                                'Duration': 123
                            },
                            'TravelOnly': {
                                'Duration': 123
                            }
                        },
                        'TravelSteps': [
                            {
                                'ContinueStepDetails': {
                                    'Intersection': [
                                        {
                                            'Language': 'string',
                                            'Value': 'string'
                                        },
                                    ]
                                },
                                'CurrentRoad': {
                                    'RoadName': [
                                        {
                                            'Language': 'string',
                                            'Value': 'string'
                                        },
                                    ],
                                    'RouteNumber': [
                                        {
                                            'Direction': 'East'|'North'|'South'|'West',
                                            'Language': 'string',
                                            'Value': 'string'
                                        },
                                    ],
                                    'Towards': [
                                        {
                                            'Language': 'string',
                                            'Value': 'string'
                                        },
                                    ],
                                    'Type': 'Highway'|'Rural'|'Urban'
                                },
                                'Distance': 123,
                                'Duration': 123,
                                'ExitNumber': [
                                    {
                                        'Language': 'string',
                                        'Value': 'string'
                                    },
                                ],
                                'GeometryOffset': 123,
                                'Instruction': 'string',
                                'KeepStepDetails': {
                                    'Intersection': [
                                        {
                                            'Language': 'string',
                                            'Value': 'string'
                                        },
                                    ],
                                    'SteeringDirection': 'Left'|'Right'|'Straight',
                                    'TurnAngle': 123.0,
                                    'TurnIntensity': 'Sharp'|'Slight'|'Typical'
                                },
                                'NextRoad': {
                                    'RoadName': [
                                        {
                                            'Language': 'string',
                                            'Value': 'string'
                                        },
                                    ],
                                    'RouteNumber': [
                                        {
                                            'Direction': 'East'|'North'|'South'|'West',
                                            'Language': 'string',
                                            'Value': 'string'
                                        },
                                    ],
                                    'Towards': [
                                        {
                                            'Language': 'string',
                                            'Value': 'string'
                                        },
                                    ],
                                    'Type': 'Highway'|'Rural'|'Urban'
                                },
                                'RoundaboutEnterStepDetails': {
                                    'Intersection': [
                                        {
                                            'Language': 'string',
                                            'Value': 'string'
                                        },
                                    ],
                                    'SteeringDirection': 'Left'|'Right'|'Straight',
                                    'TurnAngle': 123.0,
                                    'TurnIntensity': 'Sharp'|'Slight'|'Typical'
                                },
                                'RoundaboutExitStepDetails': {
                                    'Intersection': [
                                        {
                                            'Language': 'string',
                                            'Value': 'string'
                                        },
                                    ],
                                    'RelativeExit': 123,
                                    'RoundaboutAngle': 123.0,
                                    'SteeringDirection': 'Left'|'Right'|'Straight'
                                },
                                'RoundaboutPassStepDetails': {
                                    'Intersection': [
                                        {
                                            'Language': 'string',
                                            'Value': 'string'
                                        },
                                    ],
                                    'SteeringDirection': 'Left'|'Right'|'Straight',
                                    'TurnAngle': 123.0,
                                    'TurnIntensity': 'Sharp'|'Slight'|'Typical'
                                },
                                'Signpost': {
                                    'Labels': [
                                        {
                                            'RouteNumber': {
                                                'Direction': 'East'|'North'|'South'|'West',
                                                'Language': 'string',
                                                'Value': 'string'
                                            },
                                            'Text': {
                                                'Language': 'string',
                                                'Value': 'string'
                                            }
                                        },
                                    ]
                                },
                                'TurnStepDetails': {
                                    'Intersection': [
                                        {
                                            'Language': 'string',
                                            'Value': 'string'
                                        },
                                    ],
                                    'SteeringDirection': 'Left'|'Right'|'Straight',
                                    'TurnAngle': 123.0,
                                    'TurnIntensity': 'Sharp'|'Slight'|'Typical'
                                },
                                'Type': 'Arrive'|'Continue'|'Depart'|'Keep'|'RoundaboutEnter'|'RoundaboutExit'|'RoundaboutPass'|'Turn'|'Exit'|'Ramp'|'UTurn'
                            },
                        ]
                    },
                    'TravelMode': 'Car'|'Ferry'|'Pedestrian'|'Scooter'|'Truck',
                    'Type': 'Ferry'|'Pedestrian'|'Vehicle',
                    'VehicleLegDetails': {
                        'Arrival': {
                            'Place': {
                                'Name': 'string',
                                'OriginalPosition': [
                                    123.0,
                                ],
                                'Position': [
                                    123.0,
                                ],
                                'SideOfStreet': 'Left'|'Right',
                                'WaypointIndex': 123
                            },
                            'Time': 'string'
                        },
                        'Departure': {
                            'Place': {
                                'Name': 'string',
                                'OriginalPosition': [
                                    123.0,
                                ],
                                'Position': [
                                    123.0,
                                ],
                                'SideOfStreet': 'Left'|'Right',
                                'WaypointIndex': 123
                            },
                            'Time': 'string'
                        },
                        'Incidents': [
                            {
                                'Description': 'string',
                                'EndTime': 'string',
                                'Severity': 'Critical'|'High'|'Medium'|'Low',
                                'StartTime': 'string',
                                'Type': 'Accident'|'Congestion'|'Construction'|'DisabledVehicle'|'LaneRestriction'|'MassTransit'|'Other'|'PlannedEvent'|'RoadClosure'|'RoadHazard'|'Weather'
                            },
                        ],
                        'Notices': [
                            {
                                'Code': 'AccuratePolylineUnavailable'|'Other'|'PotentialViolatedAvoidTollRoadUsage'|'PotentialViolatedCarpoolUsage'|'PotentialViolatedTurnRestrictionUsage'|'PotentialViolatedVehicleRestrictionUsage'|'PotentialViolatedZoneRestrictionUsage'|'SeasonalClosure'|'TollsDataTemporarilyUnavailable'|'TollsDataUnavailable'|'TollTransponder'|'ViolatedAvoidControlledAccessHighway'|'ViolatedAvoidDifficultTurns'|'ViolatedAvoidDirtRoad'|'ViolatedAvoidSeasonalClosure'|'ViolatedAvoidTollRoad'|'ViolatedAvoidTollTransponder'|'ViolatedAvoidTruckRoadType'|'ViolatedAvoidTunnel'|'ViolatedAvoidUTurns'|'ViolatedBlockedRoad'|'ViolatedCarpool'|'ViolatedEmergencyGate'|'ViolatedStartDirection'|'ViolatedTurnRestriction'|'ViolatedVehicleRestriction'|'ViolatedZoneRestriction',
                                'Details': [
                                    {
                                        'Title': 'string',
                                        'ViolatedConstraints': {
                                            'AllHazardsRestricted': True|False,
                                            'AxleCount': {
                                                'Min': 123,
                                                'Max': 123
                                            },
                                            'HazardousCargos': [
                                                'Combustible'|'Corrosive'|'Explosive'|'Flammable'|'Gas'|'HarmfulToWater'|'Organic'|'Other'|'Poison'|'PoisonousInhalation'|'Radioactive',
                                            ],
                                            'MaxHeight': 123,
                                            'MaxKpraLength': 123,
                                            'MaxLength': 123,
                                            'MaxPayloadCapacity': 123,
                                            'MaxWeight': {
                                                'Type': 'Current'|'Gross'|'Unknown',
                                                'Value': 123
                                            },
                                            'MaxWeightPerAxle': 123,
                                            'MaxWeightPerAxleGroup': {
                                                'Single': 123,
                                                'Tandem': 123,
                                                'Triple': 123,
                                                'Quad': 123,
                                                'Quint': 123
                                            },
                                            'MaxWidth': 123,
                                            'Occupancy': {
                                                'Min': 123,
                                                'Max': 123
                                            },
                                            'RestrictedTimes': 'string',
                                            'TimeDependent': True|False,
                                            'TrailerCount': {
                                                'Min': 123,
                                                'Max': 123
                                            },
                                            'TravelMode': True|False,
                                            'TruckRoadType': 'string',
                                            'TruckType': 'LightTruck'|'StraightTruck'|'Tractor',
                                            'TunnelRestrictionCode': 'string'
                                        }
                                    },
                                ],
                                'Impact': 'High'|'Low'
                            },
                        ],
                        'PassThroughWaypoints': [
                            {
                                'GeometryOffset': 123,
                                'Place': {
                                    'OriginalPosition': [
                                        123.0,
                                    ],
                                    'Position': [
                                        123.0,
                                    ],
                                    'WaypointIndex': 123
                                }
                            },
                        ],
                        'Spans': [
                            {
                                'BestCaseDuration': 123,
                                'CarAccess': [
                                    'Allowed'|'NoThroughTraffic'|'TollRoad',
                                ],
                                'Country': 'string',
                                'Distance': 123,
                                'Duration': 123,
                                'DynamicSpeed': {
                                    'BestCaseSpeed': 123.0,
                                    'TurnDuration': 123,
                                    'TypicalSpeed': 123.0
                                },
                                'FunctionalClassification': 123,
                                'Gate': 'Emergency'|'KeyAccess'|'PermissionRequired',
                                'GeometryOffset': 123,
                                'Incidents': [
                                    123,
                                ],
                                'Names': [
                                    {
                                        'Language': 'string',
                                        'Value': 'string'
                                    },
                                ],
                                'Notices': [
                                    123,
                                ],
                                'RailwayCrossing': 'Protected'|'Unprotected',
                                'Region': 'string',
                                'RoadAttributes': [
                                    'Bridge'|'BuiltUpArea'|'ControlledAccessHighway'|'DirtRoad'|'DividedRoad'|'Motorway'|'PrivateRoad'|'Ramp'|'RightHandTraffic'|'Roundabout'|'Tunnel'|'UnderConstruction',
                                ],
                                'RouteNumbers': [
                                    {
                                        'Direction': 'East'|'North'|'South'|'West',
                                        'Language': 'string',
                                        'Value': 'string'
                                    },
                                ],
                                'ScooterAccess': [
                                    'Allowed'|'NoThroughTraffic'|'TollRoad',
                                ],
                                'SpeedLimit': {
                                    'MaxSpeed': 123.0,
                                    'Unlimited': True|False
                                },
                                'TollSystems': [
                                    123,
                                ],
                                'TruckAccess': [
                                    'Allowed'|'NoThroughTraffic'|'TollRoad',
                                ],
                                'TruckRoadTypes': [
                                    123,
                                ],
                                'TypicalDuration': 123,
                                'Zones': [
                                    123,
                                ]
                            },
                        ],
                        'Summary': {
                            'Overview': {
                                'BestCaseDuration': 123,
                                'Distance': 123,
                                'Duration': 123,
                                'TypicalDuration': 123
                            },
                            'TravelOnly': {
                                'BestCaseDuration': 123,
                                'Duration': 123,
                                'TypicalDuration': 123
                            }
                        },
                        'Tolls': [
                            {
                                'Country': 'string',
                                'PaymentSites': [
                                    {
                                        'Name': 'string',
                                        'Position': [
                                            123.0,
                                        ]
                                    },
                                ],
                                'Rates': [
                                    {
                                        'ApplicableTimes': 'string',
                                        'ConvertedPrice': {
                                            'Currency': 'string',
                                            'Estimate': True|False,
                                            'PerDuration': 123,
                                            'Range': True|False,
                                            'RangeValue': {
                                                'Min': 123.0,
                                                'Max': 123.0
                                            },
                                            'Value': 123.0
                                        },
                                        'Id': 'string',
                                        'LocalPrice': {
                                            'Currency': 'string',
                                            'Estimate': True|False,
                                            'PerDuration': 123,
                                            'Range': True|False,
                                            'RangeValue': {
                                                'Min': 123.0,
                                                'Max': 123.0
                                            },
                                            'Value': 123.0
                                        },
                                        'Name': 'string',
                                        'Pass': {
                                            'IncludesReturnTrip': True|False,
                                            'SeniorPass': True|False,
                                            'TransferCount': 123,
                                            'TripCount': 123,
                                            'ValidityPeriod': {
                                                'Period': 'Annual'|'Days'|'ExtendedAnnual'|'Minutes'|'Months',
                                                'PeriodCount': 123
                                            }
                                        },
                                        'PaymentMethods': [
                                            'BankCard'|'Cash'|'CashExact'|'CreditCard'|'PassSubscription'|'TravelCard'|'Transponder'|'VideoToll',
                                        ],
                                        'Transponders': [
                                            {
                                                'SystemName': 'string'
                                            },
                                        ]
                                    },
                                ],
                                'Systems': [
                                    123,
                                ]
                            },
                        ],
                        'TollSystems': [
                            {
                                'Name': 'string'
                            },
                        ],
                        'TravelSteps': [
                            {
                                'ContinueHighwayStepDetails': {
                                    'Intersection': [
                                        {
                                            'Language': 'string',
                                            'Value': 'string'
                                        },
                                    ],
                                    'SteeringDirection': 'Left'|'Right'|'Straight',
                                    'TurnAngle': 123.0,
                                    'TurnIntensity': 'Sharp'|'Slight'|'Typical'
                                },
                                'ContinueStepDetails': {
                                    'Intersection': [
                                        {
                                            'Language': 'string',
                                            'Value': 'string'
                                        },
                                    ]
                                },
                                'CurrentRoad': {
                                    'RoadName': [
                                        {
                                            'Language': 'string',
                                            'Value': 'string'
                                        },
                                    ],
                                    'RouteNumber': [
                                        {
                                            'Direction': 'East'|'North'|'South'|'West',
                                            'Language': 'string',
                                            'Value': 'string'
                                        },
                                    ],
                                    'Towards': [
                                        {
                                            'Language': 'string',
                                            'Value': 'string'
                                        },
                                    ],
                                    'Type': 'Highway'|'Rural'|'Urban'
                                },
                                'Distance': 123,
                                'Duration': 123,
                                'EnterHighwayStepDetails': {
                                    'Intersection': [
                                        {
                                            'Language': 'string',
                                            'Value': 'string'
                                        },
                                    ],
                                    'SteeringDirection': 'Left'|'Right'|'Straight',
                                    'TurnAngle': 123.0,
                                    'TurnIntensity': 'Sharp'|'Slight'|'Typical'
                                },
                                'ExitNumber': [
                                    {
                                        'Language': 'string',
                                        'Value': 'string'
                                    },
                                ],
                                'ExitStepDetails': {
                                    'Intersection': [
                                        {
                                            'Language': 'string',
                                            'Value': 'string'
                                        },
                                    ],
                                    'RelativeExit': 123,
                                    'SteeringDirection': 'Left'|'Right'|'Straight',
                                    'TurnAngle': 123.0,
                                    'TurnIntensity': 'Sharp'|'Slight'|'Typical'
                                },
                                'GeometryOffset': 123,
                                'Instruction': 'string',
                                'KeepStepDetails': {
                                    'Intersection': [
                                        {
                                            'Language': 'string',
                                            'Value': 'string'
                                        },
                                    ],
                                    'SteeringDirection': 'Left'|'Right'|'Straight',
                                    'TurnAngle': 123.0,
                                    'TurnIntensity': 'Sharp'|'Slight'|'Typical'
                                },
                                'NextRoad': {
                                    'RoadName': [
                                        {
                                            'Language': 'string',
                                            'Value': 'string'
                                        },
                                    ],
                                    'RouteNumber': [
                                        {
                                            'Direction': 'East'|'North'|'South'|'West',
                                            'Language': 'string',
                                            'Value': 'string'
                                        },
                                    ],
                                    'Towards': [
                                        {
                                            'Language': 'string',
                                            'Value': 'string'
                                        },
                                    ],
                                    'Type': 'Highway'|'Rural'|'Urban'
                                },
                                'RampStepDetails': {
                                    'Intersection': [
                                        {
                                            'Language': 'string',
                                            'Value': 'string'
                                        },
                                    ],
                                    'SteeringDirection': 'Left'|'Right'|'Straight',
                                    'TurnAngle': 123.0,
                                    'TurnIntensity': 'Sharp'|'Slight'|'Typical'
                                },
                                'RoundaboutEnterStepDetails': {
                                    'Intersection': [
                                        {
                                            'Language': 'string',
                                            'Value': 'string'
                                        },
                                    ],
                                    'SteeringDirection': 'Left'|'Right'|'Straight',
                                    'TurnAngle': 123.0,
                                    'TurnIntensity': 'Sharp'|'Slight'|'Typical'
                                },
                                'RoundaboutExitStepDetails': {
                                    'Intersection': [
                                        {
                                            'Language': 'string',
                                            'Value': 'string'
                                        },
                                    ],
                                    'RelativeExit': 123,
                                    'RoundaboutAngle': 123.0,
                                    'SteeringDirection': 'Left'|'Right'|'Straight'
                                },
                                'RoundaboutPassStepDetails': {
                                    'Intersection': [
                                        {
                                            'Language': 'string',
                                            'Value': 'string'
                                        },
                                    ],
                                    'SteeringDirection': 'Left'|'Right'|'Straight',
                                    'TurnAngle': 123.0,
                                    'TurnIntensity': 'Sharp'|'Slight'|'Typical'
                                },
                                'Signpost': {
                                    'Labels': [
                                        {
                                            'RouteNumber': {
                                                'Direction': 'East'|'North'|'South'|'West',
                                                'Language': 'string',
                                                'Value': 'string'
                                            },
                                            'Text': {
                                                'Language': 'string',
                                                'Value': 'string'
                                            }
                                        },
                                    ]
                                },
                                'TurnStepDetails': {
                                    'Intersection': [
                                        {
                                            'Language': 'string',
                                            'Value': 'string'
                                        },
                                    ],
                                    'SteeringDirection': 'Left'|'Right'|'Straight',
                                    'TurnAngle': 123.0,
                                    'TurnIntensity': 'Sharp'|'Slight'|'Typical'
                                },
                                'Type': 'Arrive'|'Continue'|'ContinueHighway'|'Depart'|'EnterHighway'|'Exit'|'Keep'|'Ramp'|'RoundaboutEnter'|'RoundaboutExit'|'RoundaboutPass'|'Turn'|'UTurn',
                                'UTurnStepDetails': {
                                    'Intersection': [
                                        {
                                            'Language': 'string',
                                            'Value': 'string'
                                        },
                                    ],
                                    'SteeringDirection': 'Left'|'Right'|'Straight',
                                    'TurnAngle': 123.0,
                                    'TurnIntensity': 'Sharp'|'Slight'|'Typical'
                                }
                            },
                        ],
                        'TruckRoadTypes': [
                            'string',
                        ],
                        'Zones': [
                            {
                                'Category': 'CongestionPricing'|'Environmental'|'Vignette',
                                'Name': 'string'
                            },
                        ]
                    }
                },
            ],
            'MajorRoadLabels': [
                {
                    'RoadName': {
                        'Language': 'string',
                        'Value': 'string'
                    },
                    'RouteNumber': {
                        'Direction': 'East'|'North'|'South'|'West',
                        'Language': 'string',
                        'Value': 'string'
                    }
                },
            ],
            'Summary': {
                'Distance': 123,
                'Duration': 123,
                'Tolls': {
                    'Total': {
                        'Currency': 'string',
                        'Estimate': True|False,
                        'Range': True|False,
                        'RangeValue': {
                            'Min': 123.0,
                            'Max': 123.0
                        },
                        'Value': 123.0
                    }
                }
            }
        },
    ]
}

Response Structure

  • (dict) --

    • LegGeometryFormat (string) --

      Specifies the format of the geometry returned for each leg of the route.

    • Notices (list) --

      Notices are additional information returned that indicate issues that occurred during route calculation.

      • (dict) --

        Notices are additional information returned that indicate issues that occurred during route calculation.

        • Code (string) --

          Code corresponding to the issue.

        • Impact (string) --

          Impact corresponding to the issue. While Low impact notices can be safely ignored, High impact notices must be evaluated further to determine the impact.

    • PricingBucket (string) --

      The pricing bucket for which the query is charged at.

    • Routes (list) --

      The path from the origin to the destination.

      • (dict) --

        The route.

        • Legs (list) --

          A leg is a section of a route from one waypoint to the next. A leg could be of type Vehicle, Pedestrian or Ferry. Legs of different types could occur together within a single route. For example, a car employing the use of a Ferry will contain Vehicle legs corresponding to journey on land, and Ferry legs corresponding to the journey via Ferry.

          • (dict) --

            A leg is a section of a route from one waypoint to the next. A leg could be of type Vehicle, Pedestrian or Ferry. Legs of different types could occur together within a single route. For example, a car employing the use of a Ferry will contain Vehicle legs corresponding to journey on land, and Ferry legs corresponding to the journey via Ferry.

            • FerryLegDetails (dict) --

              FerryLegDetails is populated when the Leg type is Ferry, and provides additional information that is specific

              • AfterTravelSteps (list) --

                Steps of a leg that must be performed after the travel portion of the leg.

                • (dict) --

                  Steps of a leg that must be performed after the travel portion of the leg.

                  • Duration (integer) --

                    Duration of the step.

                    Unit : seconds

                  • Instruction (string) --

                    Brief description of the step in the requested language.

                    Note

                    Only available when the TravelStepType is Default.

                  • Type (string) --

                    Type of the step.

              • Arrival (dict) --

                Details corresponding to the arrival for the leg.

                • Place (dict) --

                  The place details.

                  • Name (string) --

                    The name of the place.

                  • OriginalPosition (list) --

                    Position provided in the request.

                    • (float) --

                  • Position (list) --

                    Position defined as [longitude, latitude] .

                    • (float) --

                  • WaypointIndex (integer) --

                    Index of the waypoint in the request.

                • Time (string) --

                  The time.

              • BeforeTravelSteps (list) --

                Steps of a leg that must be performed before the travel portion of the leg.

                • (dict) --

                  Steps of a leg that must be performed before the travel portion of the leg.

                  • Duration (integer) --

                    Duration of the step.

                    Unit : seconds

                  • Instruction (string) --

                    Brief description of the step in the requested language.

                    Note

                    Only available when the TravelStepType is Default.

                  • Type (string) --

                    Type of the step.

              • Departure (dict) --

                Details corresponding to the departure for the leg.

                • Place (dict) --

                  The place details.

                  • Name (string) --

                    The name of the place.

                  • OriginalPosition (list) --

                    Position provided in the request.

                    • (float) --

                  • Position (list) --

                    Position defined as [longitude, latitude] .

                    • (float) --

                  • WaypointIndex (integer) --

                    Index of the waypoint in the request.

                • Time (string) --

                  The time.

              • Notices (list) --

                Notices are additional information returned that indicate issues that occurred during route calculation.

                • (dict) --

                  Notices are additional information returned that indicate issues that occurred during route calculation.

                  • Code (string) --

                    Code corresponding to the issue.

                  • Impact (string) --

                    Impact corresponding to the issue. While Low impact notices can be safely ignored, High impact notices must be evaluated further to determine the impact.

              • PassThroughWaypoints (list) --

                Waypoints that were passed through during the leg. This includes the waypoints that were configured with the PassThrough option.

                • (dict) --

                  If the waypoint should be treated as a stop. If yes, the route is split up into different legs around the stop.

                  • GeometryOffset (integer) --

                    Offset in the leg geometry corresponding to the start of this step.

                  • Place (dict) --

                    The place details.

                    • OriginalPosition (list) --

                      Position provided in the request.

                      • (float) --

                    • Position (list) --

                      Position defined as [longitude, latitude] .

                      • (float) --

                    • WaypointIndex (integer) --

                      Index of the waypoint in the request.

              • RouteName (string) --

                Route name of the ferry line.

              • Spans (list) --

                Spans that were computed for the requested SpanAdditionalFeatures.

                • (dict) --

                  Span computed for the requested SpanAdditionalFeatures.

                  • Country (string) --

                    3 letter Country code corresponding to the Span.

                  • Distance (integer) --

                    Distance of the computed span. This feature doesn't split a span, but is always computed on a span split by other properties.

                  • Duration (integer) --

                    Duration of the computed span. This feature doesn't split a span, but is always computed on a span split by other properties.

                    Unit : seconds

                  • GeometryOffset (integer) --

                    Offset in the leg geometry corresponding to the start of this span.

                  • Names (list) --

                    Provides an array of names of the ferry span in available languages.

                    • (dict) --

                      The localized string.

                      • Language (string) --

                        A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                      • Value (string) --

                        The value of the localized string.

                  • Region (string) --

                    2-3 letter Region code corresponding to the Span. This is either a province or a state.

              • Summary (dict) --

                Summarized details of the leg.

                • Overview (dict) --

                  Summarized details for the leg including before travel, travel and after travel steps.

                  • Distance (integer) --

                    Distance of the step.

                  • Duration (integer) --

                    Duration of the step.

                    Unit : seconds

                • TravelOnly (dict) --

                  Summarized details for the leg including travel steps only. The Distance for the travel only portion of the journey is in meters

                  • Duration (integer) --

                    Total duration in free flowing traffic, which is the best case or shortest duration possible to cover the leg.

                    Unit : seconds

              • TravelSteps (list) --

                Steps of a leg that must be performed before the travel portion of the leg.

                • (dict) --

                  Steps of a leg that must be performed during the travel portion of the leg.

                  • Distance (integer) --

                    Distance of the step.

                  • Duration (integer) --

                    Duration of the step.

                    Unit : seconds

                  • GeometryOffset (integer) --

                    Offset in the leg geometry corresponding to the start of this step.

                  • Instruction (string) --

                    Brief description of the step in the requested language.

                    Note

                    Only available when the TravelStepType is Default.

                  • Type (string) --

                    Type of the step.

            • Geometry (dict) --

              Geometry of the area to be avoided.

              • LineString (list) --

                An ordered list of positions used to plot a route on a map.

                Note

                LineString and Polyline are mutually exclusive properties.

                • (list) --

                  • (float) --

              • Polyline (string) --

                An ordered list of positions used to plot a route on a map in a lossy compression format.

                Note

                LineString and Polyline are mutually exclusive properties.

            • Language (string) --

              List of languages for instructions within steps in the response.

            • PedestrianLegDetails (dict) --

              Details related to the pedestrian leg.

              • Arrival (dict) --

                Details corresponding to the arrival for the leg.

                • Place (dict) --

                  The place details.

                  • Name (string) --

                    The name of the place.

                  • OriginalPosition (list) --

                    Position provided in the request.

                    • (float) --

                  • Position (list) --

                    Position defined as [longitude, latitude] .

                    • (float) --

                  • SideOfStreet (string) --

                    Options to configure matching the provided position to a side of the street.

                  • WaypointIndex (integer) --

                    Index of the waypoint in the request.

                • Time (string) --

                  The time.

              • Departure (dict) --

                Details corresponding to the departure for the leg.

                • Place (dict) --

                  The place details.

                  • Name (string) --

                    The name of the place.

                  • OriginalPosition (list) --

                    Position provided in the request.

                    • (float) --

                  • Position (list) --

                    Position defined as [longitude, latitude] .

                    • (float) --

                  • SideOfStreet (string) --

                    Options to configure matching the provided position to a side of the street.

                  • WaypointIndex (integer) --

                    Index of the waypoint in the request.

                • Time (string) --

                  The time.

              • Notices (list) --

                Notices are additional information returned that indicate issues that occurred during route calculation.

                • (dict) --

                  Notices are additional information returned that indicate issues that occurred during route calculation.

                  • Code (string) --

                    Code corresponding to the issue.

                  • Impact (string) --

                    Impact corresponding to the issue. While Low impact notices can be safely ignored, High impact notices must be evaluated further to determine the impact.

              • PassThroughWaypoints (list) --

                Waypoints that were passed through during the leg. This includes the waypoints that were configured with the PassThrough option.

                • (dict) --

                  If the waypoint should be treated as a stop. If yes, the route is split up into different legs around the stop.

                  • GeometryOffset (integer) --

                    Offset in the leg geometry corresponding to the start of this step.

                  • Place (dict) --

                    The place details.

                    • OriginalPosition (list) --

                      Position provided in the request.

                      • (float) --

                    • Position (list) --

                      Position defined as [longitude, latitude] .

                      • (float) --

                    • WaypointIndex (integer) --

                      Index of the waypoint in the request.

              • Spans (list) --

                Spans that were computed for the requested SpanAdditionalFeatures.

                • (dict) --

                  Span computed for the requested SpanAdditionalFeatures.

                  • BestCaseDuration (integer) --

                    Duration of the computed span without traffic congestion.

                    Unit : seconds

                  • Country (string) --

                    3 letter Country code corresponding to the Span.

                  • Distance (integer) --

                    Distance of the computed span. This feature doesn't split a span, but is always computed on a span split by other properties.

                  • Duration (integer) --

                    Duration of the computed span. This feature doesn't split a span, but is always computed on a span split by other properties.

                    Unit : seconds

                  • DynamicSpeed (dict) --

                    Dynamic speed details corresponding to the span.

                    Unit : KilometersPerHour

                    • BestCaseSpeed (float) --

                      Estimated speed while traversing the span without traffic congestion.

                      Unit : KilometersPerHour

                    • TurnDuration (integer) --

                      Estimated time to turn from this span into the next.

                      Unit : seconds

                    • TypicalSpeed (float) --

                      Estimated speed while traversing the span under typical traffic congestion.

                      Unit : KilometersPerHour

                  • FunctionalClassification (integer) --

                    Functional classification of the road segment corresponding to the span.

                  • GeometryOffset (integer) --

                    Offset in the leg geometry corresponding to the start of this span.

                  • Incidents (list) --

                    Incidents corresponding to the span. These index into the Incidents in the parent Leg.

                    • (integer) --

                  • Names (list) --

                    Provides an array of names of the pedestrian span in available languages.

                    • (dict) --

                      The localized string.

                      • Language (string) --

                        A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                      • Value (string) --

                        The value of the localized string.

                  • PedestrianAccess (list) --

                    Access attributes for a pedestrian corresponding to the span.

                    • (string) --

                  • Region (string) --

                    2-3 letter Region code corresponding to the Span. This is either a province or a state.

                  • RoadAttributes (list) --

                    Attributes for the road segment corresponding to the span.

                    • (string) --

                  • RouteNumbers (list) --

                    Designated route name or number corresponding to the span.

                    • (dict) --

                      The route number.

                      • Direction (string) --

                        Directional identifier of the route.

                      • Language (string) --

                        List of languages for instructions corresponding to the route number.

                      • Value (string) --

                        The route number.

                  • SpeedLimit (dict) --

                    Speed limit details corresponding to the span.

                    Unit : KilometersPerHour

                    • MaxSpeed (float) --

                      Maximum speed.

                      Unit : KilometersPerHour

                    • Unlimited (boolean) --

                      If the span doesn't have a speed limit like the Autobahn.

                  • TypicalDuration (integer) --

                    Duration of the computed span under typical traffic congestion.

                    Unit : seconds

              • Summary (dict) --

                Summarized details of the leg.

                • Overview (dict) --

                  Summarized details for the leg including before travel, travel and after travel steps.

                  • Distance (integer) --

                    Distance of the step.

                  • Duration (integer) --

                    Duration of the step.

                • TravelOnly (dict) --

                  Summarized details for the leg including travel steps only. The Distance for the travel only portion of the journey is in meters

                  • Duration (integer) --

                    Duration of the step.

                    Unit : seconds

              • TravelSteps (list) --

                Steps of a leg that must be performed before the travel portion of the leg.

                • (dict) --

                  Steps of a leg that must be performed during the travel portion of the leg.

                  • ContinueStepDetails (dict) --

                    Details related to the continue step.

                    • Intersection (list) --

                      Name of the intersection, if applicable to the step.

                      • (dict) --

                        The localized string.

                        • Language (string) --

                          A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                        • Value (string) --

                          The value of the localized string.

                  • CurrentRoad (dict) --

                    Details of the current road. See RouteRoad for details of sub-attributes.

                    • RoadName (list) --

                      Name of the road (localized).

                      • (dict) --

                        The localized string.

                        • Language (string) --

                          A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                        • Value (string) --

                          The value of the localized string.

                    • RouteNumber (list) --

                      Route number of the road.

                      • (dict) --

                        The route number.

                        • Direction (string) --

                          Directional identifier of the route.

                        • Language (string) --

                          List of languages for instructions corresponding to the route number.

                        • Value (string) --

                          The route number.

                    • Towards (list) --

                      Names of destinations that can be reached when traveling on the road.

                      • (dict) --

                        The localized string.

                        • Language (string) --

                          A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                        • Value (string) --

                          The value of the localized string.

                    • Type (string) --

                      The type of road.

                  • Distance (integer) --

                    Distance of the step.

                  • Duration (integer) --

                    Duration of the step.

                    Unit : seconds

                  • ExitNumber (list) --

                    Exit number of the road exit, if applicable.

                    • (dict) --

                      The localized string.

                      • Language (string) --

                        A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                      • Value (string) --

                        The value of the localized string.

                  • GeometryOffset (integer) --

                    Offset in the leg geometry corresponding to the start of this step.

                  • Instruction (string) --

                    Brief description of the step in the requested language.

                    Note

                    Only available when the TravelStepType is Default.

                  • KeepStepDetails (dict) --

                    Details that are specific to a Keep step.

                    • Intersection (list) --

                      Name of the intersection, if applicable to the step.

                      • (dict) --

                        The localized string.

                        • Language (string) --

                          A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                        • Value (string) --

                          The value of the localized string.

                    • SteeringDirection (string) --

                      Steering direction for the step.

                    • TurnAngle (float) --

                      Angle of the turn.

                    • TurnIntensity (string) --

                      Intensity of the turn.

                  • NextRoad (dict) --

                    Details of the next road. See RouteRoad for details of sub-attributes.

                    • RoadName (list) --

                      Name of the road (localized).

                      • (dict) --

                        The localized string.

                        • Language (string) --

                          A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                        • Value (string) --

                          The value of the localized string.

                    • RouteNumber (list) --

                      Route number of the road.

                      • (dict) --

                        The route number.

                        • Direction (string) --

                          Directional identifier of the route.

                        • Language (string) --

                          List of languages for instructions corresponding to the route number.

                        • Value (string) --

                          The route number.

                    • Towards (list) --

                      Names of destinations that can be reached when traveling on the road.

                      • (dict) --

                        The localized string.

                        • Language (string) --

                          A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                        • Value (string) --

                          The value of the localized string.

                    • Type (string) --

                      The type of road.

                  • RoundaboutEnterStepDetails (dict) --

                    Details that are specific to a Roundabout Enter step.

                    • Intersection (list) --

                      Name of the intersection, if applicable to the step.

                      • (dict) --

                        The localized string.

                        • Language (string) --

                          A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                        • Value (string) --

                          The value of the localized string.

                    • SteeringDirection (string) --

                      Steering direction for the step.

                    • TurnAngle (float) --

                      Angle of the turn.

                    • TurnIntensity (string) --

                      Intensity of the turn.

                  • RoundaboutExitStepDetails (dict) --

                    Details that are specific to a Roundabout Exit step.

                    • Intersection (list) --

                      Name of the intersection, if applicable to the step.

                      • (dict) --

                        The localized string.

                        • Language (string) --

                          A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                        • Value (string) --

                          The value of the localized string.

                    • RelativeExit (integer) --

                      Exit to be taken.

                    • RoundaboutAngle (float) --

                      Angle of the roundabout.

                    • SteeringDirection (string) --

                      Steering direction for the step.

                  • RoundaboutPassStepDetails (dict) --

                    Details that are specific to a Roundabout Pass step.

                    • Intersection (list) --

                      Name of the intersection, if applicable to the step.

                      • (dict) --

                        The localized string.

                        • Language (string) --

                          A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                        • Value (string) --

                          The value of the localized string.

                    • SteeringDirection (string) --

                      Steering direction for the step.

                    • TurnAngle (float) --

                      Angle of the turn.

                    • TurnIntensity (string) --

                      Intensity of the turn.

                  • Signpost (dict) --

                    Sign post information of the action, applicable only for TurnByTurn steps. See RouteSignpost for details of sub-attributes.

                    • Labels (list) --

                      Labels present on the sign post.

                      • (dict) --

                        Labels presented on the sign post.

                        • RouteNumber (dict) --

                          Route number of the road.

                          • Direction (string) --

                            Directional identifier of the route.

                          • Language (string) --

                            List of languages for instructions corresponding to the route number.

                          • Value (string) --

                            The route number.

                        • Text (dict) --

                          The Signpost text.

                          • Language (string) --

                            A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                          • Value (string) --

                            The value of the localized string.

                  • TurnStepDetails (dict) --

                    Details that are specific to a turn step.

                    • Intersection (list) --

                      Name of the intersection, if applicable to the step.

                      • (dict) --

                        The localized string.

                        • Language (string) --

                          A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                        • Value (string) --

                          The value of the localized string.

                    • SteeringDirection (string) --

                      Steering direction for the step.

                    • TurnAngle (float) --

                      Angle of the turn.

                    • TurnIntensity (string) --

                      Intensity of the turn.

                  • Type (string) --

                    Type of the step.

            • TravelMode (string) --

              Specifies the mode of transport when calculating a route. Used in estimating the speed of travel and road compatibility.

              Default Value: Car

            • Type (string) --

              Type of the leg.

            • VehicleLegDetails (dict) --

              Details related to the vehicle leg.

              • Arrival (dict) --

                Details corresponding to the arrival for the leg.

                • Place (dict) --

                  The place details.

                  • Name (string) --

                    The name of the place.

                  • OriginalPosition (list) --

                    Position provided in the request.

                    • (float) --

                  • Position (list) --

                    Position defined as [longitude, latitude] .

                    • (float) --

                  • SideOfStreet (string) --

                    Options to configure matching the provided position to a side of the street.

                  • WaypointIndex (integer) --

                    Index of the waypoint in the request.

                • Time (string) --

                  The time.

              • Departure (dict) --

                Details corresponding to the departure for the leg.

                • Place (dict) --

                  The place details.

                  • Name (string) --

                    The name of the place.

                  • OriginalPosition (list) --

                    Position provided in the request.

                    • (float) --

                  • Position (list) --

                    Position defined as [longitude, latitude] .

                    • (float) --

                  • SideOfStreet (string) --

                    Options to configure matching the provided position to a side of the street.

                  • WaypointIndex (integer) --

                    Index of the waypoint in the request.

                • Time (string) --

                  The departure time.

              • Incidents (list) --

                Incidents corresponding to this leg of the route.

                • (dict) --

                  Incidents corresponding to this leg of the route.

                  • Description (string) --

                    Brief readable description of the incident.

                  • EndTime (string) --

                    End timestamp of the incident.

                  • Severity (string) --

                    Severity of the incident Critical - The part of the route the incident affects is unusable. Major- Major impact on the leg duration, for example stop and go Minor- Minor impact on the leg duration, for example traffic jam Low - Low on duration, for example slightly increased traffic

                  • StartTime (string) --

                    Start time of the incident.

                  • Type (string) --

                    Type of the incident.

              • Notices (list) --

                Notices are additional information returned that indicate issues that occurred during route calculation.

                • (dict) --

                  Notices are additional information returned that indicate issues that occurred during route calculation.

                  • Code (string) --

                    Code corresponding to the issue.

                  • Details (list) --

                    Additional details of the notice.

                    • (dict) --

                      Additional details of the notice.

                      • Title (string) --

                        The notice title.

                      • ViolatedConstraints (dict) --

                        Any violated constraints.

                        • AllHazardsRestricted (boolean) --

                          This restriction applies to truck cargo, where the resulting route excludes roads on which hazardous materials are prohibited from being transported.

                        • AxleCount (dict) --

                          Total number of axles of the vehicle.

                          • Min (integer) --

                            Minimum value for the range.

                          • Max (integer) --

                            Maximum value for the range.

                        • HazardousCargos (list) --

                          List of Hazardous cargo contained in the vehicle.

                          • (string) --

                        • MaxHeight (integer) --

                          The maximum height of the vehicle.

                        • MaxKpraLength (integer) --

                          The maximum Kpra length of the vehicle.

                          Unit : centimeters

                        • MaxLength (integer) --

                          The maximum length of the vehicle.

                        • MaxPayloadCapacity (integer) --

                          The maximum load capacity of the vehicle.

                          Unit : kilograms

                        • MaxWeight (dict) --

                          The maximum weight of the route.

                          Unit : Kilograms

                          • Type (string) --

                            The type of constraint.

                          • Value (integer) --

                            The constraint value.

                            Unit : Kilograms

                        • MaxWeightPerAxle (integer) --

                          The maximum weight per axle of the vehicle.

                          Unit : Kilograms

                        • MaxWeightPerAxleGroup (dict) --

                          The maximum weight per axle group of the vehicle.

                          Unit : Kilograms

                          • Single (integer) --

                            Weight for single axle group.

                            Unit : Kilograms

                          • Tandem (integer) --

                            Weight for tandem axle group.

                            Unit : Kilograms

                          • Triple (integer) --

                            Weight for triple axle group.

                            Unit : Kilograms

                          • Quad (integer) --

                            Weight for quad axle group.

                            Unit : Kilograms

                          • Quint (integer) --

                            Weight for quad quint group.

                            Unit : Kilograms

                        • MaxWidth (integer) --

                          The maximum width of the vehicle.

                        • Occupancy (dict) --

                          The number of occupants in the vehicle.

                          Default Value: 1

                          • Min (integer) --

                            Minimum value for the range.

                          • Max (integer) --

                            Maximum value for the range.

                        • RestrictedTimes (string) --

                          Access radius restrictions based on time.

                        • TimeDependent (boolean) --

                          The time dependent constraint.

                        • TrailerCount (dict) --

                          Number of trailers attached to the vehicle.

                          Default Value: 0

                          • Min (integer) --

                            Minimum value for the range.

                          • Max (integer) --

                            Maximum value for the range.

                        • TravelMode (boolean) --

                          Travel mode corresponding to the leg.

                        • TruckRoadType (string) --

                          Truck road type identifiers. BK1 through BK4 apply only to Sweden. A2,A4,B2,B4,C,D,ET2,ET4 apply only to Mexico.

                          Note

                          There are currently no other supported values as of 26th April 2024.

                        • TruckType (string) --

                          Type of the truck.

                        • TunnelRestrictionCode (string) --

                          The tunnel restriction code.

                          Tunnel categories in this list indicate the restrictions which apply to certain tunnels in Great Britain. They relate to the types of dangerous goods that can be transported through them.

                          • Tunnel Category B

                            • Risk Level : Limited risk

                            • Restrictions : Few restrictions

                          • Tunnel Category C

                            • Risk Level : Medium risk

                            • Restrictions : Some restrictions

                          • Tunnel Category D

                            • Risk Level : High risk

                            • Restrictions : Many restrictions occur

                          • Tunnel Category E

                            • Risk Level : Very high risk

                            • Restrictions : Restricted tunnel

                  • Impact (string) --

                    Impact corresponding to the issue. While Low impact notices can be safely ignored, High impact notices must be evaluated further to determine the impact.

              • PassThroughWaypoints (list) --

                Waypoints that were passed through during the leg. This includes the waypoints that were configured with the PassThrough option.

                • (dict) --

                  If the waypoint should be treated as a stop. If yes, the route is split up into different legs around the stop.

                  • GeometryOffset (integer) --

                    Offset in the leg geometry corresponding to the start of this step.

                  • Place (dict) --

                    The place details.

                    • OriginalPosition (list) --

                      Position provided in the request.

                      • (float) --

                    • Position (list) --

                      Position defined as [longitude, latitude] .

                      • (float) --

                    • WaypointIndex (integer) --

                      Index of the waypoint in the request.

              • Spans (list) --

                Spans that were computed for the requested SpanAdditionalFeatures.

                • (dict) --

                  Span computed for the requested SpanAdditionalFeatures.

                  • BestCaseDuration (integer) --

                    Duration of the computed span without traffic congestion.

                    Unit : seconds

                  • CarAccess (list) --

                    Access attributes for a car corresponding to the span.

                    • (string) --

                  • Country (string) --

                    3 letter Country code corresponding to the Span.

                  • Distance (integer) --

                    Distance of the computed span. This feature doesn't split a span, but is always computed on a span split by other properties.

                  • Duration (integer) --

                    Duration of the computed span. This feature doesn't split a span, but is always computed on a span split by other properties.

                    Unit : seconds

                  • DynamicSpeed (dict) --

                    Dynamic speed details corresponding to the span.

                    Unit : KilometersPerHour

                    • BestCaseSpeed (float) --

                      Estimated speed while traversing the span without traffic congestion.

                      Unit : KilometersPerHour

                    • TurnDuration (integer) --

                      Estimated time to turn from this span into the next.

                      Unit : seconds

                    • TypicalSpeed (float) --

                      Estimated speed while traversing the span under typical traffic congestion.

                      Unit : KilometersPerHour

                  • FunctionalClassification (integer) --

                    Functional classification of the road segment corresponding to the span.

                  • Gate (string) --

                    Attributes corresponding to a gate. The gate is present at the end of the returned span.

                  • GeometryOffset (integer) --

                    Offset in the leg geometry corresponding to the start of this span.

                  • Incidents (list) --

                    Incidents corresponding to the span. These index into the Incidents in the parent Leg.

                    • (integer) --

                  • Names (list) --

                    Provides an array of names of the vehicle span in available languages.

                    • (dict) --

                      The localized string.

                      • Language (string) --

                        A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                      • Value (string) --

                        The value of the localized string.

                  • Notices (list) --

                    Notices are additional information returned that indicate issues that occurred during route calculation.

                    • (integer) --

                  • RailwayCrossing (string) --

                    Attributes corresponding to a railway crossing. The gate is present at the end of the returned span.

                  • Region (string) --

                    2-3 letter Region code corresponding to the Span. This is either a province or a state.

                  • RoadAttributes (list) --

                    Attributes for the road segment corresponding to the span.

                    • (string) --

                  • RouteNumbers (list) --

                    Designated route name or number corresponding to the span.

                    • (dict) --

                      The route number.

                      • Direction (string) --

                        Directional identifier of the route.

                      • Language (string) --

                        List of languages for instructions corresponding to the route number.

                      • Value (string) --

                        The route number.

                  • ScooterAccess (list) --

                    Access attributes for a scooter corresponding to the span.

                    • (string) --

                  • SpeedLimit (dict) --

                    Speed limit details corresponding to the span.

                    Unit : KilometersPerHour

                    • MaxSpeed (float) --

                      Maximum speed.

                      Unit : KilometersPerHour

                    • Unlimited (boolean) --

                      If the span doesn't have a speed limit like the Autobahn.

                  • TollSystems (list) --

                    Toll systems are authorities that collect payments for the toll.

                    • (integer) --

                  • TruckAccess (list) --

                    Access attributes for a truck corresponding to the span.

                    • (string) --

                  • TruckRoadTypes (list) --

                    Truck road type identifiers. BK1 through BK4 apply only to Sweden. A2,A4,B2,B4,C,D,ET2,ET4 apply only to Mexico.

                    Note

                    There are currently no other supported values as of 26th April 2024.

                    • (integer) --

                  • TypicalDuration (integer) --

                    Duration of the computed span under typical traffic congestion.

                    Unit : seconds

                  • Zones (list) --

                    Zones corresponding to this leg of the route.

                    • (integer) --

              • Summary (dict) --

                Summarized details of the leg.

                • Overview (dict) --

                  Summarized details for the leg including before travel, travel and after travel steps.

                  • BestCaseDuration (integer) --

                    Total duration in free flowing traffic, which is the best case or shortest duration possible to cover the leg.

                    Unit : seconds

                  • Distance (integer) --

                    Distance of the step.

                  • Duration (integer) --

                    Duration of the step.

                    Unit : seconds

                  • TypicalDuration (integer) --

                    Duration of the computed span under typical traffic congestion.

                    Unit : seconds

                • TravelOnly (dict) --

                  Summarized details for the leg including travel steps only. The Distance for the travel only portion of the journey is in meters

                  • BestCaseDuration (integer) --

                    Total duration in free flowing traffic, which is the best case or shortest duration possible to cover the leg.

                    Unit : seconds

                  • Duration (integer) --

                    Duration of the step.

                    Unit : seconds

                  • TypicalDuration (integer) --

                    Duration of the computed span under typical traffic congestion.

                    Unit : seconds

              • Tolls (list) --

                Toll related options.

                • (dict) --

                  Provides details about toll information along a route, including the payment sites, applicable toll rates, toll systems, and the country associated with the toll collection.

                  • Country (string) --

                    The alpha-2 or alpha-3 character code for the country.

                  • PaymentSites (list) --

                    Locations or sites where the toll fare is collected.

                    • (dict) --

                      Locations or sites where the toll fare is collected.

                      • Name (string) --

                        Name of the payment site.

                      • Position (list) --

                        Position defined as [longitude, latitude] .

                        • (float) --

                  • Rates (list) --

                    Toll rates that need to be paid to travel this leg of the route.

                    • (dict) --

                      The toll rate.

                      • ApplicableTimes (string) --

                        Time when the rate is valid.

                      • ConvertedPrice (dict) --

                        Price in the converted currency as specified in the request.

                        • Currency (string) --

                          Currency code corresponding to the price. This is the same as Currency specified in the request.

                        • Estimate (boolean) --

                          If the price is an estimate or an exact value.

                        • PerDuration (integer) --

                          Duration for which the price corresponds to.

                          Unit : seconds

                        • Range (boolean) --

                          If the price is a range or an exact value. If any of the toll fares making up the route is a range, the overall price is also a range.

                        • RangeValue (dict) --

                          Price range with a minimum and maximum value, if a range.

                          • Min (float) --

                            Minimum price.

                          • Max (float) --

                            Maximum price.

                        • Value (float) --

                          Exact price, if not a range.

                      • Id (string) --

                        The Toll rate Id.

                      • LocalPrice (dict) --

                        Price in the local regional currency.

                        • Currency (string) --

                          Currency code corresponding to the price. This is the same as Currency specified in the request.

                        • Estimate (boolean) --

                          If the price is an estimate or an exact value.

                        • PerDuration (integer) --

                          Duration for which the price corresponds to.

                          Unit : seconds

                        • Range (boolean) --

                          If the price is a range or an exact value. If any of the toll fares making up the route is a range, the overall price is also a range.

                        • RangeValue (dict) --

                          Price range with a minimum and maximum value, if a range.

                          • Min (float) --

                            Minimum price.

                          • Max (float) --

                            Maximum price.

                        • Value (float) --

                          Exact price, if not a range.

                      • Name (string) --

                        The name of the toll.

                      • Pass (dict) --

                        Details if the toll rate can be a pass that supports multiple trips.

                        • IncludesReturnTrip (boolean) --

                          If the pass includes the rate for the return leg of the trip.

                        • SeniorPass (boolean) --

                          If the pass is only valid for senior persons.

                        • TransferCount (integer) --

                          If the toll pass can be transferred, and how many times.

                        • TripCount (integer) --

                          Number of trips the pass is valid for.

                        • ValidityPeriod (dict) --

                          Period for which the pass is valid.

                          • Period (string) --

                            Validity period.

                          • PeriodCount (integer) --

                            Counts for the validity period.

                      • PaymentMethods (list) --

                        Accepted payment methods at the toll.

                        • (string) --

                      • Transponders (list) --

                        Transponders for which this toll can be applied.

                        • (dict) --

                          Transponders for which this toll can be applied.

                          • SystemName (string) --

                            Names of the toll system collecting the toll.

                  • Systems (list) --

                    Toll systems are authorities that collect payments for the toll.

                    • (integer) --

              • TollSystems (list) --

                Toll systems are authorities that collect payments for the toll.

                • (dict) --

                  Toll systems are authorities that collect payments for the toll.

                  • Name (string) --

                    The toll system name.

              • TravelSteps (list) --

                Steps of a leg that must be performed before the travel portion of the leg.

                • (dict) --

                  Steps of a leg that correspond to the travel portion of the leg.

                  • ContinueHighwayStepDetails (dict) --

                    Details that are specific to a Continue Highway step.

                    • Intersection (list) --

                      Name of the intersection, if applicable to the step.

                      • (dict) --

                        The localized string.

                        • Language (string) --

                          A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                        • Value (string) --

                          The value of the localized string.

                    • SteeringDirection (string) --

                      Steering direction for the step.

                    • TurnAngle (float) --

                      Angle of the turn.

                    • TurnIntensity (string) --

                      Intensity of the turn.

                  • ContinueStepDetails (dict) --

                    Details that are specific to a Continue step.

                    • Intersection (list) --

                      Name of the intersection, if applicable to the step.

                      • (dict) --

                        The localized string.

                        • Language (string) --

                          A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                        • Value (string) --

                          The value of the localized string.

                  • CurrentRoad (dict) --

                    Details of the current road.

                    • RoadName (list) --

                      Name of the road (localized).

                      • (dict) --

                        The localized string.

                        • Language (string) --

                          A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                        • Value (string) --

                          The value of the localized string.

                    • RouteNumber (list) --

                      Route number of the road.

                      • (dict) --

                        The route number.

                        • Direction (string) --

                          Directional identifier of the route.

                        • Language (string) --

                          List of languages for instructions corresponding to the route number.

                        • Value (string) --

                          The route number.

                    • Towards (list) --

                      Names of destinations that can be reached when traveling on the road.

                      • (dict) --

                        The localized string.

                        • Language (string) --

                          A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                        • Value (string) --

                          The value of the localized string.

                    • Type (string) --

                      The type of road.

                  • Distance (integer) --

                    Distance of the step.

                  • Duration (integer) --

                    Duration of the step.

                    Unit : seconds

                  • EnterHighwayStepDetails (dict) --

                    Details that are specific to a Enter Highway step.

                    • Intersection (list) --

                      Name of the intersection, if applicable to the step.

                      • (dict) --

                        The localized string.

                        • Language (string) --

                          A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                        • Value (string) --

                          The value of the localized string.

                    • SteeringDirection (string) --

                      Steering direction for the step.

                    • TurnAngle (float) --

                      Angle of the turn.

                    • TurnIntensity (string) --

                      Intensity of the turn.

                  • ExitNumber (list) --

                    Exit number of the road exit, if applicable.

                    • (dict) --

                      The localized string.

                      • Language (string) --

                        A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                      • Value (string) --

                        The value of the localized string.

                  • ExitStepDetails (dict) --

                    Details that are specific to a Roundabout Exit step.

                    • Intersection (list) --

                      Name of the intersection, if applicable to the step.

                      • (dict) --

                        The localized string.

                        • Language (string) --

                          A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                        • Value (string) --

                          The value of the localized string.

                    • RelativeExit (integer) --

                      Exit to be taken.

                    • SteeringDirection (string) --

                      Steering direction for the step.

                    • TurnAngle (float) --

                      Angle of the turn.

                    • TurnIntensity (string) --

                      Intensity of the turn.

                  • GeometryOffset (integer) --

                    Offset in the leg geometry corresponding to the start of this step.

                  • Instruction (string) --

                    Brief description of the step in the requested language.

                    Note

                    Only available when the TravelStepType is Default.

                  • KeepStepDetails (dict) --

                    Details that are specific to a Keep step.

                    • Intersection (list) --

                      Name of the intersection, if applicable to the step.

                      • (dict) --

                        The localized string.

                        • Language (string) --

                          A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                        • Value (string) --

                          The value of the localized string.

                    • SteeringDirection (string) --

                      Steering direction for the step.

                    • TurnAngle (float) --

                      Angle of the turn.

                    • TurnIntensity (string) --

                      Intensity of the turn.

                  • NextRoad (dict) --

                    Details of the next road. See RouteRoad for details of sub-attributes.

                    • RoadName (list) --

                      Name of the road (localized).

                      • (dict) --

                        The localized string.

                        • Language (string) --

                          A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                        • Value (string) --

                          The value of the localized string.

                    • RouteNumber (list) --

                      Route number of the road.

                      • (dict) --

                        The route number.

                        • Direction (string) --

                          Directional identifier of the route.

                        • Language (string) --

                          List of languages for instructions corresponding to the route number.

                        • Value (string) --

                          The route number.

                    • Towards (list) --

                      Names of destinations that can be reached when traveling on the road.

                      • (dict) --

                        The localized string.

                        • Language (string) --

                          A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                        • Value (string) --

                          The value of the localized string.

                    • Type (string) --

                      The type of road.

                  • RampStepDetails (dict) --

                    Details that are specific to a Ramp step.

                    • Intersection (list) --

                      Name of the intersection, if applicable to the step.

                      • (dict) --

                        The localized string.

                        • Language (string) --

                          A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                        • Value (string) --

                          The value of the localized string.

                    • SteeringDirection (string) --

                      Steering direction for the step.

                    • TurnAngle (float) --

                      Angle of the turn.

                    • TurnIntensity (string) --

                      Intensity of the turn.

                  • RoundaboutEnterStepDetails (dict) --

                    Details that are specific to a Roundabout Enter step.

                    • Intersection (list) --

                      Name of the intersection, if applicable to the step.

                      • (dict) --

                        The localized string.

                        • Language (string) --

                          A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                        • Value (string) --

                          The value of the localized string.

                    • SteeringDirection (string) --

                      Steering direction for the step.

                    • TurnAngle (float) --

                      Angle of the turn.

                    • TurnIntensity (string) --

                      Intensity of the turn.

                  • RoundaboutExitStepDetails (dict) --

                    Details that are specific to a Roundabout Exit step.

                    • Intersection (list) --

                      Name of the intersection, if applicable to the step.

                      • (dict) --

                        The localized string.

                        • Language (string) --

                          A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                        • Value (string) --

                          The value of the localized string.

                    • RelativeExit (integer) --

                      Exit to be taken.

                    • RoundaboutAngle (float) --

                      Angle of the roundabout.

                    • SteeringDirection (string) --

                      Steering direction for the step.

                  • RoundaboutPassStepDetails (dict) --

                    Details that are specific to a Roundabout Pass step.

                    • Intersection (list) --

                      Name of the intersection, if applicable to the step.

                      • (dict) --

                        The localized string.

                        • Language (string) --

                          A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                        • Value (string) --

                          The value of the localized string.

                    • SteeringDirection (string) --

                      Steering direction for the step.

                    • TurnAngle (float) --

                      Angle of the turn.

                    • TurnIntensity (string) --

                      Intensity of the turn.

                  • Signpost (dict) --

                    Sign post information of the action, applicable only for TurnByTurn steps. See RouteSignpost for details of sub-attributes.

                    • Labels (list) --

                      Labels present on the sign post.

                      • (dict) --

                        Labels presented on the sign post.

                        • RouteNumber (dict) --

                          Route number of the road.

                          • Direction (string) --

                            Directional identifier of the route.

                          • Language (string) --

                            List of languages for instructions corresponding to the route number.

                          • Value (string) --

                            The route number.

                        • Text (dict) --

                          The Signpost text.

                          • Language (string) --

                            A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                          • Value (string) --

                            The value of the localized string.

                  • TurnStepDetails (dict) --

                    Details that are specific to a Turn step.

                    • Intersection (list) --

                      Name of the intersection, if applicable to the step.

                      • (dict) --

                        The localized string.

                        • Language (string) --

                          A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                        • Value (string) --

                          The value of the localized string.

                    • SteeringDirection (string) --

                      Steering direction for the step.

                    • TurnAngle (float) --

                      Angle of the turn.

                    • TurnIntensity (string) --

                      Intensity of the turn.

                  • Type (string) --

                    Type of the step.

                  • UTurnStepDetails (dict) --

                    Details that are specific to a Turn step.

                    • Intersection (list) --

                      Name of the intersection, if applicable to the step.

                      • (dict) --

                        The localized string.

                        • Language (string) --

                          A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

                        • Value (string) --

                          The value of the localized string.

                    • SteeringDirection (string) --

                      Steering direction for the step.

                    • TurnAngle (float) --

                      Angle of the turn.

                    • TurnIntensity (string) --

                      Intensity of the turn.

              • TruckRoadTypes (list) --

                Truck road type identifiers. BK1 through BK4 apply only to Sweden. A2,A4,B2,B4,C,D,ET2,ET4 apply only to Mexico.

                Note

                There are currently no other supported values as of 26th April 2024.

                • (string) --

              • Zones (list) --

                Zones corresponding to this leg of the route.

                • (dict) --

                  The zone.

                  • Category (string) --

                    The zone category.

                  • Name (string) --

                    The name of the zone.

        • MajorRoadLabels (list) --

          Important labels including names and route numbers that differentiate the current route from the alternatives presented.

          • (dict) --

            Important labels including names and route numbers that differentiate the current route from the alternatives presented.

            • RoadName (dict) --

              Name of the road (localized).

              • Language (string) --

                A list of BCP 47 compliant language codes for the results to be rendered in. The request uses the regional default as the fallback if the requested language can't be provided.

              • Value (string) --

                The value of the localized string.

            • RouteNumber (dict) --

              Route number of the road.

              • Direction (string) --

                Directional identifier of the route.

              • Language (string) --

                List of languages for instructions corresponding to the route number.

              • Value (string) --

                The route number.

        • Summary (dict) --

          Summarized details of the leg.

          • Distance (integer) --

            Distance of the route.

          • Duration (integer) --

            Duration of the route.

            Unit : seconds

          • Tolls (dict) --

            Toll summary for the complete route.

            • Total (dict) --

              Total toll summary for the complete route. Total is the only summary available today.

              • Currency (string) --

                Currency code corresponding to the price. This is the same as Currency specified in the request.

              • Estimate (boolean) --

                If the price is an estimate or an exact value.

              • Range (boolean) --

                If the price is a range or an exact value. If any of the toll fares making up the route is a range, the overall price is also a range.

              • RangeValue (dict) --

                Price range with a minimum and maximum value, if a range.

                • Min (float) --

                  Minimum price.

                • Max (float) --

                  Maximum price.

              • Value (float) --

                Exact price, if not a range.

SnapToRoads (new) Link ¶

The SnapToRoads action matches GPS trace to roads most likely traveled on.

See also: AWS API Documentation

Request Syntax

client.snap_to_roads(
    Key='string',
    SnappedGeometryFormat='FlexiblePolyline'|'Simple',
    SnapRadius=123,
    TracePoints=[
        {
            'Heading': 123.0,
            'Position': [
                123.0,
            ],
            'Speed': 123.0,
            'Timestamp': 'string'
        },
    ],
    TravelMode='Car'|'Pedestrian'|'Scooter'|'Truck',
    TravelModeOptions={
        'Truck': {
            'GrossWeight': 123,
            'HazardousCargos': [
                'Combustible'|'Corrosive'|'Explosive'|'Flammable'|'Gas'|'HarmfulToWater'|'Organic'|'Other'|'Poison'|'PoisonousInhalation'|'Radioactive',
            ],
            'Height': 123,
            'Length': 123,
            'Trailer': {
                'TrailerCount': 123
            },
            'TunnelRestrictionCode': 'string',
            'Width': 123
        }
    }
)
type Key

string

param Key

Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.

type SnappedGeometryFormat

string

param SnappedGeometryFormat

Chooses what the returned SnappedGeometry format should be.

Default Value: FlexiblePolyline

type SnapRadius

integer

param SnapRadius

The radius around the provided tracepoint that is considered for snapping.

Unit : meters

Default value: 300

type TracePoints

list

param TracePoints

[REQUIRED]

List of trace points to be snapped onto the road network.

  • (dict) --

    TracePoint indices for which the provided notice code corresponds to.

    • Heading (float) --

      GPS Heading at the position.

    • Position (list) -- [REQUIRED]

      Position defined as [longitude, latitude] .

      • (float) --

    • Speed (float) --

      Speed at the specified trace point .

      Unit : KilometersPerHour

    • Timestamp (string) --

      Timestamp of the event.

type TravelMode

string

param TravelMode

Specifies the mode of transport when calculating a route. Used in estimating the speed of travel and road compatibility.

Default Value: Car

type TravelModeOptions

dict

param TravelModeOptions

Travel mode related options for the provided travel mode.

  • Truck (dict) --

    Travel mode options when the provided travel mode is "Truck".

    • GrossWeight (integer) --

      Gross weight of the vehicle including trailers, and goods at capacity.

      Unit : Kilograms

    • HazardousCargos (list) --

      List of Hazardous cargos contained in the vehicle.

      • (string) --

    • Height (integer) --

      Height of the vehicle.

      Unit : centimeters

    • Length (integer) --

      Length of the vehicle.

      Unit : centimeters

    • Trailer (dict) --

      Trailer options corresponding to the vehicle.

      • TrailerCount (integer) --

        Number of trailers attached to the vehicle.

        Default Value: 0

    • TunnelRestrictionCode (string) --

      The tunnel restriction code.

      Tunnel categories in this list indicate the restrictions which apply to certain tunnels in Great Britain. They relate to the types of dangerous goods that can be transported through them.

      • Tunnel Category B

        • Risk Level : Limited risk

        • Restrictions : Few restrictions

      • Tunnel Category C

        • Risk Level : Medium risk

        • Restrictions : Some restrictions

      • Tunnel Category D

        • Risk Level : High risk

        • Restrictions : Many restrictions occur

      • Tunnel Category E

        • Risk Level : Very high risk

        • Restrictions : Restricted tunnel

    • Width (integer) --

      Width of the vehicle in centimenters.

rtype

dict

returns

Response Syntax

{
    'Notices': [
        {
            'Code': 'TracePointsHeadingIgnored'|'TracePointsIgnored'|'TracePointsMovedByLargeDistance'|'TracePointsNotMatched'|'TracePointsOutOfSequence'|'TracePointsSpeedEstimated'|'TracePointsSpeedIgnored',
            'Title': 'string',
            'TracePointIndexes': [
                123,
            ]
        },
    ],
    'PricingBucket': 'string',
    'SnappedGeometry': {
        'LineString': [
            [
                123.0,
            ],
        ],
        'Polyline': 'string'
    },
    'SnappedGeometryFormat': 'FlexiblePolyline'|'Simple',
    'SnappedTracePoints': [
        {
            'Confidence': 123.0,
            'OriginalPosition': [
                123.0,
            ],
            'SnappedPosition': [
                123.0,
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • Notices (list) --

      Notices are additional information returned that indicate issues that occurred during route calculation.

      • (dict) --

        Notices provide information around factors that may have influenced snapping in a manner atypical to the standard use cases.

        • Code (string) --

          Code corresponding to the issue.

        • Title (string) --

          The notice title.

        • TracePointIndexes (list) --

          TracePoint indices for which the provided notice code corresponds to.

          • (integer) --

    • PricingBucket (string) --

      The pricing bucket for which the query is charged at.

    • SnappedGeometry (dict) --

      The interpolated geometry for the snapped route onto the road network.

      • LineString (list) --

        An ordered list of positions used to plot a route on a map.

        Note

        LineString and Polyline are mutually exclusive properties.

        • (list) --

          • (float) --

      • Polyline (string) --

        An ordered list of positions used to plot a route on a map in a lossy compression format.

        Note

        LineString and Polyline are mutually exclusive properties.

    • SnappedGeometryFormat (string) --

      Specifies the format of the geometry returned for each leg of the route.

    • SnappedTracePoints (list) --

      The trace points snapped onto the road network.

      • (dict) --

        TracePoints snapped onto the road network.

        • Confidence (float) --

          Confidence value for the correctness of this point match.

        • OriginalPosition (list) --

          Position of the TracePoint provided within the request, at the same index.

          • (float) --

        • SnappedPosition (list) --

          Snapped position of the TracePoint provided within the request, at the same index.

          • (float) --

CalculateIsolines (new) Link ¶

Use the CalculateIsolines action to find service areas that can be reached in a given threshold of time, distance.

See also: AWS API Documentation

Request Syntax

client.calculate_isolines(
    Allow={
        'Hot': True|False,
        'Hov': True|False
    },
    ArrivalTime='string',
    Avoid={
        'Areas': [
            {
                'Except': [
                    {
                        'BoundingBox': [
                            123.0,
                        ],
                        'Corridor': {
                            'LineString': [
                                [
                                    123.0,
                                ],
                            ],
                            'Radius': 123
                        },
                        'Polygon': [
                            [
                                [
                                    123.0,
                                ],
                            ],
                        ],
                        'PolylineCorridor': {
                            'Polyline': 'string',
                            'Radius': 123
                        },
                        'PolylinePolygon': [
                            'string',
                        ]
                    },
                ],
                'Geometry': {
                    'BoundingBox': [
                        123.0,
                    ],
                    'Corridor': {
                        'LineString': [
                            [
                                123.0,
                            ],
                        ],
                        'Radius': 123
                    },
                    'Polygon': [
                        [
                            [
                                123.0,
                            ],
                        ],
                    ],
                    'PolylineCorridor': {
                        'Polyline': 'string',
                        'Radius': 123
                    },
                    'PolylinePolygon': [
                        'string',
                    ]
                }
            },
        ],
        'CarShuttleTrains': True|False,
        'ControlledAccessHighways': True|False,
        'DirtRoads': True|False,
        'Ferries': True|False,
        'SeasonalClosure': True|False,
        'TollRoads': True|False,
        'TollTransponders': True|False,
        'TruckRoadTypes': [
            'string',
        ],
        'Tunnels': True|False,
        'UTurns': True|False,
        'ZoneCategories': [
            {
                'Category': 'CongestionPricing'|'Environmental'|'Vignette'
            },
        ]
    },
    DepartNow=True|False,
    DepartureTime='string',
    Destination=[
        123.0,
    ],
    DestinationOptions={
        'AvoidActionsForDistance': 123,
        'Heading': 123.0,
        'Matching': {
            'NameHint': 'string',
            'OnRoadThreshold': 123,
            'Radius': 123,
            'Strategy': 'MatchAny'|'MatchMostSignificantRoad'
        },
        'SideOfStreet': {
            'Position': [
                123.0,
            ],
            'UseWith': 'AnyStreet'|'DividedStreetOnly'
        }
    },
    IsolineGeometryFormat='FlexiblePolyline'|'Simple',
    IsolineGranularity={
        'MaxPoints': 123,
        'MaxResolution': 123
    },
    Key='string',
    OptimizeIsolineFor='AccurateCalculation'|'BalancedCalculation'|'FastCalculation',
    OptimizeRoutingFor='FastestRoute'|'ShortestRoute',
    Origin=[
        123.0,
    ],
    OriginOptions={
        'AvoidActionsForDistance': 123,
        'Heading': 123.0,
        'Matching': {
            'NameHint': 'string',
            'OnRoadThreshold': 123,
            'Radius': 123,
            'Strategy': 'MatchAny'|'MatchMostSignificantRoad'
        },
        'SideOfStreet': {
            'Position': [
                123.0,
            ],
            'UseWith': 'AnyStreet'|'DividedStreetOnly'
        }
    },
    Thresholds={
        'Distance': [
            123,
        ],
        'Time': [
            123,
        ]
    },
    Traffic={
        'FlowEventThresholdOverride': 123,
        'Usage': 'IgnoreTrafficData'|'UseTrafficData'
    },
    TravelMode='Car'|'Pedestrian'|'Scooter'|'Truck',
    TravelModeOptions={
        'Car': {
            'EngineType': 'Electric'|'InternalCombustion'|'PluginHybrid',
            'LicensePlate': {
                'LastCharacter': 'string'
            },
            'MaxSpeed': 123.0,
            'Occupancy': 123
        },
        'Scooter': {
            'EngineType': 'Electric'|'InternalCombustion'|'PluginHybrid',
            'LicensePlate': {
                'LastCharacter': 'string'
            },
            'MaxSpeed': 123.0,
            'Occupancy': 123
        },
        'Truck': {
            'AxleCount': 123,
            'EngineType': 'Electric'|'InternalCombustion'|'PluginHybrid',
            'GrossWeight': 123,
            'HazardousCargos': [
                'Combustible'|'Corrosive'|'Explosive'|'Flammable'|'Gas'|'HarmfulToWater'|'Organic'|'Other'|'Poison'|'PoisonousInhalation'|'Radioactive',
            ],
            'Height': 123,
            'HeightAboveFirstAxle': 123,
            'KpraLength': 123,
            'Length': 123,
            'LicensePlate': {
                'LastCharacter': 'string'
            },
            'MaxSpeed': 123.0,
            'Occupancy': 123,
            'PayloadCapacity': 123,
            'TireCount': 123,
            'Trailer': {
                'AxleCount': 123,
                'TrailerCount': 123
            },
            'TruckType': 'LightTruck'|'StraightTruck'|'Tractor',
            'TunnelRestrictionCode': 'string',
            'WeightPerAxle': 123,
            'WeightPerAxleGroup': {
                'Single': 123,
                'Tandem': 123,
                'Triple': 123,
                'Quad': 123,
                'Quint': 123
            },
            'Width': 123
        }
    }
)
type Allow

dict

param Allow

Features that are allowed while calculating. a route

  • Hot (boolean) --

    Allow Hot (High Occupancy Toll) lanes while calculating the route.

  • Hov (boolean) --

    Allow Hov (High Occupancy vehicle) lanes while calculating the route.

type ArrivalTime

string

param ArrivalTime

Time of arrival at the destination.

Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm

Examples:

2020-04-22T17:57:24Z

2020-04-22T17:57:24+02:00

type Avoid

dict

param Avoid

Features that are avoided while calculating a route. Avoidance is on a best-case basis. If an avoidance can't be satisfied for a particular case, it violates the avoidance and the returned response produces a notice for the violation.

  • Areas (list) --

    Areas to be avoided.

    • (dict) --

      The area to be avoided.

      • Except (list) --

        Exceptions to the provided avoidance geometry, to be included while calculating the route.

        • (dict) --

          The avoidance geometry, to be included while calculating the route.

          • BoundingBox (list) --

            Geometry defined as a bounding box. The first pair represents the X and Y coordinates (longitude and latitude,) of the southwest corner of the bounding box; the second pair represents the X and Y coordinates (longitude and latitude) of the northeast corner.

            • (float) --

          • Corridor (dict) --

            Geometry defined as a corridor - a LineString with a radius that defines the width of the corridor.

            • LineString (list) -- [REQUIRED]

              An ordered list of positions used to plot a route on a map.

              Note

              LineString and Polyline are mutually exclusive properties.

              • (list) --

                • (float) --

            • Radius (integer) -- [REQUIRED]

              Radius that defines the width of the corridor.

          • Polygon (list) --

            A list of Polygon will be excluded for calculating isolines, the list can only contain 1 polygon.

            • (list) --

              • (list) --

                • (float) --

          • PolylineCorridor (dict) --

            Geometry defined as an encoded corridor – a polyline with a radius that defines the width of the corridor. For more information on polyline encoding, see https://github.com/heremaps/flexiblepolyline/blob/master/README.md.

            • Polyline (string) -- [REQUIRED]

              An ordered list of positions used to plot a route on a map in a lossy compression format.

              Note

              LineString and Polyline are mutually exclusive properties.

            • Radius (integer) -- [REQUIRED]

              Considers all roads within the provided radius to match the provided destination to. The roads that are considered are determined by the provided Strategy.

              Unit : Meters

          • PolylinePolygon (list) --

            A list of PolylinePolygon's that are excluded for calculating isolines, the list can only contain 1 polygon. For more information on polyline encoding, see https://github.com/heremaps/flexiblepolyline/blob/master/README.md.

            • (string) --

      • Geometry (dict) -- [REQUIRED]

        Geometry of the area to be avoided.

        • BoundingBox (list) --

          Geometry defined as a bounding box. The first pair represents the X and Y coordinates (longitude and latitude,) of the southwest corner of the bounding box; the second pair represents the X and Y coordinates (longitude and latitude) of the northeast corner.

          • (float) --

        • Corridor (dict) --

          Geometry defined as a corridor - a LineString with a radius that defines the width of the corridor.

          • LineString (list) -- [REQUIRED]

            An ordered list of positions used to plot a route on a map.

            Note

            LineString and Polyline are mutually exclusive properties.

            • (list) --

              • (float) --

          • Radius (integer) -- [REQUIRED]

            Radius that defines the width of the corridor.

        • Polygon (list) --

          A list of Polygon will be excluded for calculating isolines, the list can only contain 1 polygon.

          • (list) --

            • (list) --

              • (float) --

        • PolylineCorridor (dict) --

          Geometry defined as an encoded corridor – a polyline with a radius that defines the width of the corridor. For more information on polyline encoding, see https://github.com/heremaps/flexiblepolyline/blob/master/README.md.

          • Polyline (string) -- [REQUIRED]

            An ordered list of positions used to plot a route on a map in a lossy compression format.

            Note

            LineString and Polyline are mutually exclusive properties.

          • Radius (integer) -- [REQUIRED]

            Considers all roads within the provided radius to match the provided destination to. The roads that are considered are determined by the provided Strategy.

            Unit : Meters

        • PolylinePolygon (list) --

          A list of PolylinePolygon's that are excluded for calculating isolines, the list can only contain 1 polygon. For more information on polyline encoding, see https://github.com/heremaps/flexiblepolyline/blob/master/README.md.

          • (string) --

  • CarShuttleTrains (boolean) --

    Avoid car-shuttle-trains while calculating the route.

  • ControlledAccessHighways (boolean) --

    Avoid controlled access highways while calculating the route.

  • DirtRoads (boolean) --

    Avoid dirt roads while calculating the route.

  • Ferries (boolean) --

    Avoid ferries while calculating the route.

  • SeasonalClosure (boolean) --

    Avoid roads that have seasonal closure while calculating the route.

  • TollRoads (boolean) --

    Avoids roads where the specified toll transponders are the only mode of payment.

  • TollTransponders (boolean) --

    Avoids roads where the specified toll transponders are the only mode of payment.

  • TruckRoadTypes (list) --

    Truck road type identifiers. BK1 through BK4 apply only to Sweden. A2,A4,B2,B4,C,D,ET2,ET4 apply only to Mexico.

    Note

    There are currently no other supported values as of 26th April 2024.

    • (string) --

  • Tunnels (boolean) --

    Avoid tunnels while calculating the route.

  • UTurns (boolean) --

    Avoid U-turns for calculation on highways and motorways.

  • ZoneCategories (list) --

    Zone categories to be avoided.

    • (dict) --

      Zone category to be avoided.

      • Category (string) --

        Zone category to be avoided.

type DepartNow

boolean

param DepartNow

Uses the current time as the time of departure.

type DepartureTime

string

param DepartureTime

Time of departure from thr origin.

Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm

Examples:

2020-04-22T17:57:24Z

2020-04-22T17:57:24+02:00

type Destination

list

param Destination

The final position for the route. In the World Geodetic System (WGS 84) format: [longitude, latitude] .

  • (float) --

type DestinationOptions

dict

param DestinationOptions

Destination related options.

  • AvoidActionsForDistance (integer) --

    Avoids actions for the provided distance. This is typically to consider for users in moving vehicles who may not have sufficient time to make an action at an origin or a destination.

  • Heading (float) --

    GPS Heading at the position.

  • Matching (dict) --

    Options to configure matching the provided position to the road network.

    • NameHint (string) --

      Attempts to match the provided position to a road similar to the provided name.

    • OnRoadThreshold (integer) --

      If the distance to a highway/bridge/tunnel/sliproad is within threshold, the waypoint will be snapped to the highway/bridge/tunnel/sliproad.

      Unit : meters

    • Radius (integer) --

      Considers all roads within the provided radius to match the provided destination to. The roads that are considered are determined by the provided Strategy.

      Unit : Meters

    • Strategy (string) --

      Strategy that defines matching of the position onto the road network. MatchAny considers all roads possible, whereas MatchMostSignificantRoad matches to the most significant road.

  • SideOfStreet (dict) --

    Options to configure matching the provided position to a side of the street.

    • Position (list) -- [REQUIRED]

      Position defined as [longitude, latitude] .

      • (float) --

    • UseWith (string) --

      Strategy that defines when the side of street position should be used. AnyStreet will always use the provided position.

      Default Value: DividedStreetOnly

type IsolineGeometryFormat

string

param IsolineGeometryFormat

The format of the returned IsolineGeometry.

Default Value: FlexiblePolyline

type IsolineGranularity

dict

param IsolineGranularity

Defines the granularity of the returned Isoline

  • MaxPoints (integer) --

    Maximum number of points of returned Isoline.

  • MaxResolution (integer) --

    Maximum resolution of the returned isoline.

    Unit : centimeters

type Key

string

param Key

Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.

type OptimizeIsolineFor

string

param OptimizeIsolineFor

Specifies the optimization criteria for when calculating an isoline. AccurateCalculation generates an isoline of higher granularity that is more precise. FastCalculation generates an isoline faster by reducing the granularity, and in turn the quality of the isoline. BalancedCalculation generates an isoline by balancing between quality and performance.

Default Value: BalancedCalculation

type OptimizeRoutingFor

string

param OptimizeRoutingFor

Specifies the optimization criteria for calculating a route.

Default Value: FastestRoute

type Origin

list

param Origin

The start position for the route.

  • (float) --

type OriginOptions

dict

param OriginOptions

Origin related options.

  • AvoidActionsForDistance (integer) --

    Avoids actions for the provided distance. This is typically to consider for users in moving vehicles who may not have sufficient time to make an action at an origin or a destination.

  • Heading (float) --

    GPS Heading at the position.

  • Matching (dict) --

    Options to configure matching the provided position to the road network.

    • NameHint (string) --

      Attempts to match the provided position to a road similar to the provided name.

    • OnRoadThreshold (integer) --

      If the distance to a highway/bridge/tunnel/sliproad is within threshold, the waypoint will be snapped to the highway/bridge/tunnel/sliproad.

      Unit : meters

    • Radius (integer) --

      Considers all roads within the provided radius to match the provided destination to. The roads that are considered are determined by the provided Strategy.

      Unit : Meters

    • Strategy (string) --

      Strategy that defines matching of the position onto the road network. MatchAny considers all roads possible, whereas MatchMostSignificantRoad matches to the most significant road.

  • SideOfStreet (dict) --

    Options to configure matching the provided position to a side of the street.

    • Position (list) -- [REQUIRED]

      Position defined as [longitude, latitude] .

      • (float) --

    • UseWith (string) --

      Strategy that defines when the side of street position should be used. AnyStreet will always use the provided position.

      Default Value: DividedStreetOnly

type Thresholds

dict

param Thresholds

[REQUIRED]

Threshold to be used for the isoline calculation. Up to 3 thresholds per provided type can be requested.

  • Distance (list) --

    Distance to be used for the isoline calculation.

    • (integer) --

  • Time (list) --

    Time to be used for the isoline calculation.

    • (integer) --

type Traffic

dict

param Traffic

Traffic related options.

  • FlowEventThresholdOverride (integer) --

    Duration for which flow traffic is considered valid. For this period, the flow traffic is used over historical traffic data. Flow traffic refers to congestion, which changes very quickly. Duration in seconds for which flow traffic event would be considered valid. While flow traffic event is valid it will be used over the historical traffic data.

    Unit : seconds

  • Usage (string) --

    Determines if traffic should be used or ignored while calculating the route.

    Default Value: UseTrafficData

type TravelMode

string

param TravelMode

Specifies the mode of transport when calculating a route. Used in estimating the speed of travel and road compatibility.

Note

The mode Scooter also applies to motorcycles, set to Scooter when wanted to calculate options for motorcycles.

Default Value: Car

type TravelModeOptions

dict

param TravelModeOptions

Travel mode related options for the provided travel mode.

  • Car (dict) --

    Travel mode options when the provided travel mode is "Car"

    • EngineType (string) --

      Engine type of the vehicle.

    • LicensePlate (dict) --

      The vehicle License Plate.

      • LastCharacter (string) --

        The last character of the License Plate.

    • MaxSpeed (float) --

      Maximum speed.

      Unit : KilometersPerHour

    • Occupancy (integer) --

      The number of occupants in the vehicle.

      Default Value: 1

  • Scooter (dict) --

    Travel mode options when the provided travel mode is "Scooter"

    • EngineType (string) --

      Engine type of the vehicle.

    • LicensePlate (dict) --

      The vehicle License Plate.

      • LastCharacter (string) --

        The last character of the License Plate.

    • MaxSpeed (float) --

      Maximum speed specified.

      Unit : KilometersPerHour

    • Occupancy (integer) --

      The number of occupants in the vehicle.

      Default Value: 1

  • Truck (dict) --

    Travel mode options when the provided travel mode is "Truck"

    • AxleCount (integer) --

      Total number of axles of the vehicle.

    • EngineType (string) --

      Engine type of the vehicle.

    • GrossWeight (integer) --

      Gross weight of the vehicle including trailers, and goods at capacity.

      Unit : Kilograms

    • HazardousCargos (list) --

      List of Hazardous cargo contained in the vehicle.

      • (string) --

    • Height (integer) --

      Height of the vehicle.

      Unit : centimeters

    • HeightAboveFirstAxle (integer) --

      Height of the vehicle above its first axle.

      Unit : centimeters

    • KpraLength (integer) --

      Kingpin to rear axle length of the vehicle.

      Unit : centimeters

    • Length (integer) --

      Length of the vehicle.

      Unit : centimeters

    • LicensePlate (dict) --

      The vehicle License Plate.

      • LastCharacter (string) --

        The last character of the License Plate.

    • MaxSpeed (float) --

      Maximum speed specified.

      Unit : KilometersPerHour

    • Occupancy (integer) --

      The number of occupants in the vehicle.

      Default Value: 1

    • PayloadCapacity (integer) --

      Payload capacity of the vehicle and trailers attached.

      Unit : kilograms

    • TireCount (integer) --

      Number of tires on the vehicle.

    • Trailer (dict) --

      Trailer options corresponding to the vehicle.

      • AxleCount (integer) --

        Total number of axles of the vehicle.

      • TrailerCount (integer) --

        Number of trailers attached to the vehicle.

        Default Value: 0

    • TruckType (string) --

      Type of the truck.

    • TunnelRestrictionCode (string) --

      The tunnel restriction code.

      Tunnel categories in this list indicate the restrictions which apply to certain tunnels in Great Britain. They relate to the types of dangerous goods that can be transported through them.

      • Tunnel Category B

        • Risk Level : Limited risk

        • Restrictions : Few restrictions

      • Tunnel Category C

        • Risk Level : Medium risk

        • Restrictions : Some restrictions

      • Tunnel Category D

        • Risk Level : High risk

        • Restrictions : Many restrictions occur

      • Tunnel Category E

        • Risk Level : Very high risk

        • Restrictions : Restricted tunnel

    • WeightPerAxle (integer) --

      Heaviest weight per axle irrespective of the axle type or the axle group. Meant for usage in countries where the differences in axle types or axle groups are not distinguished.

      Unit : Kilograms

    • WeightPerAxleGroup (dict) --

      Specifies the total weight for the specified axle group. Meant for usage in countries that have different regulations based on the axle group type.

      Unit : Kilograms

      • Single (integer) --

        Weight for single axle group.

        Unit : Kilograms

      • Tandem (integer) --

        Weight for tandem axle group.

        Unit : Kilograms

      • Triple (integer) --

        Weight for triple axle group.

        Unit : Kilograms

      • Quad (integer) --

        Weight for quad axle group.

        Unit : Kilograms

      • Quint (integer) --

        Weight for quad quint group.

        Unit : Kilograms

    • Width (integer) --

      Width of the vehicle.

      Unit : centimeters

rtype

dict

returns

Response Syntax

{
    'ArrivalTime': 'string',
    'DepartureTime': 'string',
    'IsolineGeometryFormat': 'FlexiblePolyline'|'Simple',
    'Isolines': [
        {
            'Connections': [
                {
                    'FromPolygonIndex': 123,
                    'Geometry': {
                        'LineString': [
                            [
                                123.0,
                            ],
                        ],
                        'Polyline': 'string'
                    },
                    'ToPolygonIndex': 123
                },
            ],
            'DistanceThreshold': 123,
            'Geometries': [
                {
                    'Polygon': [
                        [
                            [
                                123.0,
                            ],
                        ],
                    ],
                    'PolylinePolygon': [
                        'string',
                    ]
                },
            ],
            'TimeThreshold': 123
        },
    ],
    'PricingBucket': 'string',
    'SnappedDestination': [
        123.0,
    ],
    'SnappedOrigin': [
        123.0,
    ]
}

Response Structure

  • (dict) --

    • ArrivalTime (string) --

      Time of arrival at the destination. This parameter is returned only if the Destination parameters was provided in the request.

      Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm

      Examples:

      2020-04-22T17:57:24Z

      2020-04-22T17:57:24+02:00

    • DepartureTime (string) --

      Time of departure from thr origin.

      Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm

      Examples:

      2020-04-22T17:57:24Z

      2020-04-22T17:57:24+02:00

    • IsolineGeometryFormat (string) --

      The format of the returned IsolineGeometry.

      Default Value: FlexiblePolyline

    • Isolines (list) --

      Calculated isolines and associated properties.

      • (dict) --

        Calculated isolines and associated properties.

        • Connections (list) --

          Isolines may contain multiple components, if these components are connected by ferry links. These components are returned as separate polygons while the ferry links are returned as connections.

          • (dict) --

            Isolines may contain multiple components, if these components are connected by ferry links. These components are returned as separate polygons while the ferry links are returned as connections.

            • FromPolygonIndex (integer) --

              Index of the polygon corresponding to the "from" component of the connection. The polygon is available from Isoline[].Geometries .

            • Geometry (dict) --

              The isoline geometry.

              • LineString (list) --

                An ordered list of positions used to plot a route on a map.

                Note

                LineString and Polyline are mutually exclusive properties.

                • (list) --

                  • (float) --

              • Polyline (string) --

                An ordered list of positions used to plot a route on a map in a lossy compression format.

                Note

                LineString and Polyline are mutually exclusive properties.

            • ToPolygonIndex (integer) --

              Index of the polygon corresponding to the "to" component of the connection. The polygon is available from Isoline[].Geometries .

        • DistanceThreshold (integer) --

          Distance threshold corresponding to the calculated Isoline.

        • Geometries (list) --

          Geometries for the Calculated isolines.

          • (dict) --

            Geometry of the connection between different Isoline components.

            • Polygon (list) --

              A list of Isoline Polygons, for each isoline polygon, it contains polygons of the first linear ring (the outer ring) and from 2nd item to the last item (the inner rings).

              • (list) --

                • (list) --

                  • (float) --

            • PolylinePolygon (list) --

              A list of Isoline PolylinePolygon, for each isoline PolylinePolygon, it contains PolylinePolygon of the first linear ring (the outer ring) and from 2nd item to the last item (the inner rings). For more information on polyline encoding, see https://github.com/heremaps/flexiblepolyline/blob/master/README.md.

              • (string) --

        • TimeThreshold (integer) --

          Time threshold corresponding to the calculated isoline.

    • PricingBucket (string) --

      The pricing bucket for which the query is charged at.

    • SnappedDestination (list) --

      Snapped destination that was used for the Isoline calculation.

      • (float) --

    • SnappedOrigin (list) --

      Snapped origin that was used for the Isoline calculation.

      • (float) --

OptimizeWaypoints (new) Link ¶

Calculates the optimal order to travel between a set of waypoints to minimize either the travel time or the distance travelled during the journey, based on road network restrictions and the traffic pattern data.

See also: AWS API Documentation

Request Syntax

client.optimize_waypoints(
    Avoid={
        'Areas': [
            {
                'Geometry': {
                    'BoundingBox': [
                        123.0,
                    ]
                }
            },
        ],
        'CarShuttleTrains': True|False,
        'ControlledAccessHighways': True|False,
        'DirtRoads': True|False,
        'Ferries': True|False,
        'TollRoads': True|False,
        'Tunnels': True|False,
        'UTurns': True|False
    },
    DepartureTime='string',
    Destination=[
        123.0,
    ],
    DestinationOptions={
        'AccessHours': {
            'From': {
                'DayOfWeek': 'Monday'|'Tuesday'|'Wednesday'|'Thursday'|'Friday'|'Saturday'|'Sunday',
                'TimeOfDay': 'string'
            },
            'To': {
                'DayOfWeek': 'Monday'|'Tuesday'|'Wednesday'|'Thursday'|'Friday'|'Saturday'|'Sunday',
                'TimeOfDay': 'string'
            }
        },
        'AppointmentTime': 'string',
        'Heading': 123.0,
        'Id': 'string',
        'ServiceDuration': 123,
        'SideOfStreet': {
            'Position': [
                123.0,
            ],
            'UseWith': 'AnyStreet'|'DividedStreetOnly'
        }
    },
    Driver={
        'RestCycles': {
            'LongCycle': {
                'RestDuration': 123,
                'WorkDuration': 123
            },
            'ShortCycle': {
                'RestDuration': 123,
                'WorkDuration': 123
            }
        },
        'RestProfile': {
            'Profile': 'string'
        },
        'TreatServiceTimeAs': 'Rest'|'Work'
    },
    Exclude={
        'Countries': [
            'string',
        ]
    },
    Key='string',
    OptimizeSequencingFor='FastestRoute'|'ShortestRoute',
    Origin=[
        123.0,
    ],
    OriginOptions={
        'Id': 'string'
    },
    Traffic={
        'Usage': 'IgnoreTrafficData'|'UseTrafficData'
    },
    TravelMode='Car'|'Pedestrian'|'Scooter'|'Truck',
    TravelModeOptions={
        'Pedestrian': {
            'Speed': 123.0
        },
        'Truck': {
            'GrossWeight': 123,
            'HazardousCargos': [
                'Combustible'|'Corrosive'|'Explosive'|'Flammable'|'Gas'|'HarmfulToWater'|'Organic'|'Other'|'Poison'|'PoisonousInhalation'|'Radioactive',
            ],
            'Height': 123,
            'Length': 123,
            'Trailer': {
                'TrailerCount': 123
            },
            'TruckType': 'StraightTruck'|'Tractor',
            'TunnelRestrictionCode': 'string',
            'WeightPerAxle': 123,
            'Width': 123
        }
    },
    Waypoints=[
        {
            'AccessHours': {
                'From': {
                    'DayOfWeek': 'Monday'|'Tuesday'|'Wednesday'|'Thursday'|'Friday'|'Saturday'|'Sunday',
                    'TimeOfDay': 'string'
                },
                'To': {
                    'DayOfWeek': 'Monday'|'Tuesday'|'Wednesday'|'Thursday'|'Friday'|'Saturday'|'Sunday',
                    'TimeOfDay': 'string'
                }
            },
            'AppointmentTime': 'string',
            'Before': [
                123,
            ],
            'Heading': 123.0,
            'Id': 'string',
            'Position': [
                123.0,
            ],
            'ServiceDuration': 123,
            'SideOfStreet': {
                'Position': [
                    123.0,
                ],
                'UseWith': 'AnyStreet'|'DividedStreetOnly'
            }
        },
    ]
)
type Avoid

dict

param Avoid

Features that are avoided while calculating a route. Avoidance is on a best-case basis. If an avoidance can't be satisfied for a particular case, this setting is ignored.

  • Areas (list) --

    Areas to be avoided.

    • (dict) --

      The area to be avoided.

      • Geometry (dict) -- [REQUIRED]

        Geometry of the area to be avoided.

        • BoundingBox (list) --

          Geometry defined as a bounding box. The first pair represents the X and Y coordinates (longitude and latitude,) of the southwest corner of the bounding box; the second pair represents the X and Y coordinates (longitude and latitude) of the northeast corner.

          • (float) --

  • CarShuttleTrains (boolean) --

    Avoidance options for cars-shuttles-trains.

  • ControlledAccessHighways (boolean) --

    Avoid controlled access highways while calculating the route.

  • DirtRoads (boolean) --

    Avoid dirt roads while calculating the route.

  • Ferries (boolean) --

    Avoidance options for ferries.

  • TollRoads (boolean) --

    Avoids roads where the specified toll transponders are the only mode of payment.

  • Tunnels (boolean) --

    Avoid tunnels while calculating the route.

  • UTurns (boolean) --

    Avoid U-turns for calculation on highways and motorways.

type DepartureTime

string

param DepartureTime

Departure time from the waypoint.

Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm

Examples:

2020-04-22T17:57:24Z

2020-04-22T17:57:24+02:00

type Destination

list

param Destination

The final position for the route in the World Geodetic System (WGS 84) format: [longitude, latitude] .

  • (float) --

type DestinationOptions

dict

param DestinationOptions

Destination related options.

  • AccessHours (dict) --

    Access hours corresponding to when a waypoint can be visited.

    • From (dict) -- [REQUIRED]

      Contains the ID of the starting waypoint in this connection.

      • DayOfWeek (string) -- [REQUIRED]

        Day of the week.

      • TimeOfDay (string) -- [REQUIRED]

        Time of the day.

    • To (dict) -- [REQUIRED]

      Contains the ID of the ending waypoint in this connection.

      • DayOfWeek (string) -- [REQUIRED]

        Day of the week.

      • TimeOfDay (string) -- [REQUIRED]

        Time of the day.

  • AppointmentTime (string) --

    Appointment time at the destination.

  • Heading (float) --

    GPS Heading at the position.

  • Id (string) --

    The waypoint Id.

  • ServiceDuration (integer) --

    Service time spent at the destination. At an appointment, the service time should be the appointment duration.

    Unit : seconds

  • SideOfStreet (dict) --

    Options to configure matching the provided position to a side of the street.

    • Position (list) -- [REQUIRED]

      Position defined as [longitude, latitude] .

      • (float) --

    • UseWith (string) --

      Strategy that defines when the side of street position should be used. AnyStreet will always use the provided position.

      Default Value: DividedStreetOnly

type Driver

dict

param Driver

Driver related options.

  • RestCycles (dict) --

    Driver work-rest schedules defined by a short and long cycle. A rest needs to be taken after the short work duration. The short cycle can be repeated until you hit the long work duration, at which point the long rest duration should be taken before restarting.

    • LongCycle (dict) -- [REQUIRED]

      Long cycle for a driver work-rest schedule.

      • RestDuration (integer) -- [REQUIRED]

        Resting phase of the cycle.

        Unit : seconds

      • WorkDuration (integer) -- [REQUIRED]

        Working phase of the cycle.

        Unit : seconds

    • ShortCycle (dict) -- [REQUIRED]

      Short cycle for a driver work-rest schedule

      • RestDuration (integer) -- [REQUIRED]

        Resting phase of the cycle.

        Unit : seconds

      • WorkDuration (integer) -- [REQUIRED]

        Working phase of the cycle.

        Unit : seconds

  • RestProfile (dict) --

    Pre defined rest profiles for a driver schedule. The only currently supported profile is EU.

    • Profile (string) -- [REQUIRED]

      Pre defined rest profiles for a driver schedule. The only currently supported profile is EU.

  • TreatServiceTimeAs (string) --

    If the service time provided at a waypoint/destination should be considered as rest or work. This contributes to the total time breakdown returned within the response.

type Exclude

dict

param Exclude

Features to be strictly excluded while calculating the route.

  • Countries (list) -- [REQUIRED]

    List of countries to be avoided defined by two-letter or three-letter country codes.

    • (string) --

type Key

string

param Key

Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.

type OptimizeSequencingFor

string

param OptimizeSequencingFor

Specifies the optimization criteria for the calculated sequence.

Default Value: FastestRoute .

type Origin

list

param Origin

[REQUIRED]

The start position for the route.

  • (float) --

type OriginOptions

dict

param OriginOptions

Origin related options.

  • Id (string) --

    The Origin Id.

type Traffic

dict

param Traffic

Traffic-related options.

  • Usage (string) --

    Determines if traffic should be used or ignored while calculating the route.

    Default Value: UseTrafficData

type TravelMode

string

param TravelMode

Specifies the mode of transport when calculating a route. Used in estimating the speed of travel and road compatibility.

Default Value: Car

type TravelModeOptions

dict

param TravelModeOptions

Travel mode related options for the provided travel mode.

  • Pedestrian (dict) --

    Travel mode options when the provided travel mode is "Pedestrian"

    • Speed (float) --

      Walking speed.

      Unit : KilometersPerHour

  • Truck (dict) --

    Travel mode options when the provided travel mode is "Truck"

    • GrossWeight (integer) --

      Gross weight of the vehicle including trailers, and goods at capacity.

      Unit : Kilograms

    • HazardousCargos (list) --

      List of Hazardous cargo contained in the vehicle.

      • (string) --

    • Height (integer) --

      Height of the vehicle.

      Unit : centimeters

    • Length (integer) --

      Length of the vehicle.

      Unit : centimeters

    • Trailer (dict) --

      Trailer options corresponding to the vehicle.

      • TrailerCount (integer) --

        Number of trailers attached to the vehicle.

        Default Value: 0

    • TruckType (string) --

      Type of the truck.

    • TunnelRestrictionCode (string) --

      The tunnel restriction code.

      Tunnel categories in this list indicate the restrictions which apply to certain tunnels in Great Britain. They relate to the types of dangerous goods that can be transported through them.

      • Tunnel Category B

        • Risk Level : Limited risk

        • Restrictions : Few restrictions

      • Tunnel Category C

        • Risk Level : Medium risk

        • Restrictions : Some restrictions

      • Tunnel Category D

        • Risk Level : High risk

        • Restrictions : Many restrictions occur

      • Tunnel Category E

        • Risk Level : Very high risk

        • Restrictions : Restricted tunnel

    • WeightPerAxle (integer) --

      Heaviest weight per axle irrespective of the axle type or the axle group. Meant for usage in countries where the differences in axle types or axle groups are not distinguished.

      Unit : Kilograms

    • Width (integer) --

      Width of the vehicle.

      Unit : centimeters

type Waypoints

list

param Waypoints

List of waypoints between the Origin and Destination .

  • (dict) --

    Waypoint between the Origin and Destination.

    • AccessHours (dict) --

      Access hours corresponding to when a waypoint can be visited.

      • From (dict) -- [REQUIRED]

        Contains the ID of the starting waypoint in this connection.

        • DayOfWeek (string) -- [REQUIRED]

          Day of the week.

        • TimeOfDay (string) -- [REQUIRED]

          Time of the day.

      • To (dict) -- [REQUIRED]

        Contains the ID of the ending waypoint in this connection.

        • DayOfWeek (string) -- [REQUIRED]

          Day of the week.

        • TimeOfDay (string) -- [REQUIRED]

          Time of the day.

    • AppointmentTime (string) --

      Appointment time at the waypoint.

    • Before (list) --

      Constraint defining what waypoints are to be visited after this waypoint.

      • (integer) --

    • Heading (float) --

      GPS Heading at the position.

    • Id (string) --

      The waypoint Id.

    • Position (list) -- [REQUIRED]

      Position defined as [longitude, latitude] .

      • (float) --

    • ServiceDuration (integer) --

      Service time spent at the waypoint. At an appointment, the service time should be the appointment duration.

      Unit : seconds

    • SideOfStreet (dict) --

      Options to configure matching the provided position to a side of the street.

      • Position (list) -- [REQUIRED]

        Position defined as [longitude, latitude] .

        • (float) --

      • UseWith (string) --

        Strategy that defines when the side of street position should be used. AnyStreet will always use the provided position.

        Default Value: DividedStreetOnly

rtype

dict

returns

Response Syntax

{
    'Connections': [
        {
            'Distance': 123,
            'From': 'string',
            'RestDuration': 123,
            'To': 'string',
            'TravelDuration': 123,
            'WaitDuration': 123
        },
    ],
    'Distance': 123,
    'Duration': 123,
    'ImpedingWaypoints': [
        {
            'FailedConstraints': [
                {
                    'Constraint': 'AccessHours'|'AppointmentTime'|'Before'|'Heading'|'ServiceDuration'|'SideOfStreet',
                    'Reason': 'string'
                },
            ],
            'Id': 'string',
            'Position': [
                123.0,
            ]
        },
    ],
    'OptimizedWaypoints': [
        {
            'ArrivalTime': 'string',
            'DepartureTime': 'string',
            'Id': 'string',
            'Position': [
                123.0,
            ]
        },
    ],
    'PricingBucket': 'string',
    'TimeBreakdown': {
        'RestDuration': 123,
        'ServiceDuration': 123,
        'TravelDuration': 123,
        'WaitDuration': 123
    }
}

Response Structure

  • (dict) --

    • Connections (list) --

      Details about the connection from one waypoint to the next, within the optimized sequence.

      • (dict) --

        This contains information such as distance and duration from one waypoint to the next waypoint in the sequence.

        • Distance (integer) --

          Distance of the step.

        • From (string) --

          contains the ID of the starting waypoint in this connection.

        • RestDuration (integer) --

          Resting time before the driver can continue driving.

        • To (string) --

          Contains the ID of the ending waypoint in this connection.

        • TravelDuration (integer) --

          Total duration.

          Unit : seconds

        • WaitDuration (integer) --

          Duration of a wait step.

          Unit : seconds

    • Distance (integer) --

      Overall distance to travel the whole sequence.

    • Duration (integer) --

      Overall duration to travel the whole sequence.

      Unit : seconds

    • ImpedingWaypoints (list) --

      Returns waypoints that caused the optimization problem to fail, and the constraints that were unsatisfied leading to the failure.

      • (dict) --

        The impeding waypoint.

        • FailedConstraints (list) --

          Failed constraints for an impeding waypoint.

          • (dict) --

            The failed constraint.

            • Constraint (string) --

              The failed constraint.

            • Reason (string) --

              Reason for the failed constraint.

        • Id (string) --

          The waypoint Id.

        • Position (list) --

          Position defined as [longitude, latitude] .

          • (float) --

    • OptimizedWaypoints (list) --

      Waypoints in the order of the optimized sequence.

      • (dict) --

        The optimized waypoint.

        • ArrivalTime (string) --

          Estimated time of arrival at the destination.

          Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm

          Examples:

          2020-04-22T17:57:24Z

          2020-04-22T17:57:24+02:00

        • DepartureTime (string) --

          Estimated time of departure from thr origin.

          Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm

          Examples:

          2020-04-22T17:57:24Z

          2020-04-22T17:57:24+02:00

        • Id (string) --

          The waypoint Id.

        • Position (list) --

          Position defined as [longitude, latitude] .

          • (float) --

    • PricingBucket (string) --

      The pricing bucket for which the query is charged at.

    • TimeBreakdown (dict) --

      Time breakdown for the sequence.

      • RestDuration (integer) --

        Resting phase of the cycle.

        Unit : seconds

      • ServiceDuration (integer) --

        Service time spent at the destination. At an appointment, the service time should be the appointment duration.

        Unit : seconds

      • TravelDuration (integer) --

        Traveling phase of the cycle.

        Unit : seconds

      • WaitDuration (integer) --

        Waiting phase of the cycle.

        Unit : seconds

CalculateRouteMatrix (new) Link ¶

Calculates route matrix containing the results for all pairs of Origins to Destinations. Each row corresponds to one entry in Origins. Each entry in the row corresponds to the route from that entry in Origins to an entry in Destinations positions.

See also: AWS API Documentation

Request Syntax

client.calculate_route_matrix(
    Allow={
        'Hot': True|False,
        'Hov': True|False
    },
    Avoid={
        'Areas': [
            {
                'Geometry': {
                    'BoundingBox': [
                        123.0,
                    ],
                    'Polygon': [
                        [
                            [
                                123.0,
                            ],
                        ],
                    ],
                    'PolylinePolygon': [
                        'string',
                    ]
                }
            },
        ],
        'CarShuttleTrains': True|False,
        'ControlledAccessHighways': True|False,
        'DirtRoads': True|False,
        'Ferries': True|False,
        'TollRoads': True|False,
        'TollTransponders': True|False,
        'TruckRoadTypes': [
            'string',
        ],
        'Tunnels': True|False,
        'UTurns': True|False,
        'ZoneCategories': [
            {
                'Category': 'CongestionPricing'|'Environmental'|'Vignette'
            },
        ]
    },
    DepartNow=True|False,
    DepartureTime='string',
    Destinations=[
        {
            'Options': {
                'AvoidActionsForDistance': 123,
                'Heading': 123.0,
                'Matching': {
                    'NameHint': 'string',
                    'OnRoadThreshold': 123,
                    'Radius': 123,
                    'Strategy': 'MatchAny'|'MatchMostSignificantRoad'
                },
                'SideOfStreet': {
                    'Position': [
                        123.0,
                    ],
                    'UseWith': 'AnyStreet'|'DividedStreetOnly'
                }
            },
            'Position': [
                123.0,
            ]
        },
    ],
    Exclude={
        'Countries': [
            'string',
        ]
    },
    Key='string',
    OptimizeRoutingFor='FastestRoute'|'ShortestRoute',
    Origins=[
        {
            'Options': {
                'AvoidActionsForDistance': 123,
                'Heading': 123.0,
                'Matching': {
                    'NameHint': 'string',
                    'OnRoadThreshold': 123,
                    'Radius': 123,
                    'Strategy': 'MatchAny'|'MatchMostSignificantRoad'
                },
                'SideOfStreet': {
                    'Position': [
                        123.0,
                    ],
                    'UseWith': 'AnyStreet'|'DividedStreetOnly'
                }
            },
            'Position': [
                123.0,
            ]
        },
    ],
    RoutingBoundary={
        'Geometry': {
            'AutoCircle': {
                'Margin': 123,
                'MaxRadius': 123
            },
            'Circle': {
                'Center': [
                    123.0,
                ],
                'Radius': 123.0
            },
            'BoundingBox': [
                123.0,
            ],
            'Polygon': [
                [
                    [
                        123.0,
                    ],
                ],
            ]
        },
        'Unbounded': True|False
    },
    Traffic={
        'FlowEventThresholdOverride': 123,
        'Usage': 'IgnoreTrafficData'|'UseTrafficData'
    },
    TravelMode='Car'|'Pedestrian'|'Scooter'|'Truck',
    TravelModeOptions={
        'Car': {
            'LicensePlate': {
                'LastCharacter': 'string'
            },
            'MaxSpeed': 123.0,
            'Occupancy': 123
        },
        'Scooter': {
            'LicensePlate': {
                'LastCharacter': 'string'
            },
            'MaxSpeed': 123.0,
            'Occupancy': 123
        },
        'Truck': {
            'AxleCount': 123,
            'GrossWeight': 123,
            'HazardousCargos': [
                'Combustible'|'Corrosive'|'Explosive'|'Flammable'|'Gas'|'HarmfulToWater'|'Organic'|'Other'|'Poison'|'PoisonousInhalation'|'Radioactive',
            ],
            'Height': 123,
            'KpraLength': 123,
            'Length': 123,
            'LicensePlate': {
                'LastCharacter': 'string'
            },
            'MaxSpeed': 123.0,
            'Occupancy': 123,
            'PayloadCapacity': 123,
            'Trailer': {
                'TrailerCount': 123
            },
            'TruckType': 'LightTruck'|'StraightTruck'|'Tractor',
            'TunnelRestrictionCode': 'string',
            'WeightPerAxle': 123,
            'WeightPerAxleGroup': {
                'Single': 123,
                'Tandem': 123,
                'Triple': 123,
                'Quad': 123,
                'Quint': 123
            },
            'Width': 123
        }
    }
)
type Allow

dict

param Allow

Features that are allowed while calculating. a route

  • Hot (boolean) --

    Allow Hot (High Occupancy Toll) lanes while calculating the route.

  • Hov (boolean) --

    Allow Hov (High Occupancy vehicle) lanes while calculating the route.

type Avoid

dict

param Avoid

Features that are avoided while calculating a route. Avoidance is on a best-case basis. If an avoidance can't be satisfied for a particular case, it violates the avoidance and the returned response produces a notice for the violation.

  • Areas (list) --

    Areas to be avoided.

    • (dict) --

      Area to be avoided.

      • Geometry (dict) -- [REQUIRED]

        Geometry of the area to be avoided.

        • BoundingBox (list) --

          Geometry defined as a bounding box. The first pair represents the X and Y coordinates (longitude and latitude,) of the southwest corner of the bounding box; the second pair represents the X and Y coordinates (longitude and latitude) of the northeast corner.

          • (float) --

        • Polygon (list) --

          Geometry defined as a polygon with only one linear ring.

          • (list) --

            • (list) --

              • (float) --

        • PolylinePolygon (list) --

          A list of Isoline PolylinePolygon, for each isoline PolylinePolygon, it contains PolylinePolygon of the first linear ring (the outer ring) and from second item to the last item (the inner rings). For more information on polyline encoding, see https://github.com/heremaps/flexiblepolyline/blob/master/README.md.

          • (string) --

  • CarShuttleTrains (boolean) --

    Avoid car-shuttle-trains while calculating the route.

  • ControlledAccessHighways (boolean) --

    Avoid controlled access highways while calculating the route.

  • DirtRoads (boolean) --

    Avoid dirt roads while calculating the route.

  • Ferries (boolean) --

    Avoid ferries while calculating the route.

  • TollRoads (boolean) --

    Avoids roads where the specified toll transponders are the only mode of payment.

  • TollTransponders (boolean) --

    Avoids roads where the specified toll transponders are the only mode of payment.

  • TruckRoadTypes (list) --

    Truck road type identifiers. BK1 through BK4 apply only to Sweden. A2,A4,B2,B4,C,D,ET2,ET4 apply only to Mexico.

    Note

    There are currently no other supported values as of 26th April 2024.

    • (string) --

  • Tunnels (boolean) --

    Avoid tunnels while calculating the route.

  • UTurns (boolean) --

    Avoid U-turns for calculation on highways and motorways.

  • ZoneCategories (list) --

    Zone categories to be avoided.

    • (dict) --

      Zone categories to be avoided.

      • Category (string) --

        Zone category to be avoided.

type DepartNow

boolean

param DepartNow

Uses the current time as the time of departure.

type DepartureTime

string

param DepartureTime

Time of departure from thr origin.

Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm

Examples:

2020-04-22T17:57:24Z

2020-04-22T17:57:24+02:00

type Destinations

list

param Destinations

[REQUIRED]

List of destinations for the route.

  • (dict) --

    The route destination.

    • Options (dict) --

      Destination related options.

      • AvoidActionsForDistance (integer) --

        Avoids actions for the provided distance. This is typically to consider for users in moving vehicles who may not have sufficient time to make an action at an origin or a destination.

      • Heading (float) --

        GPS Heading at the position.

      • Matching (dict) --

        Options to configure matching the provided position to the road network.

        • NameHint (string) --

          Attempts to match the provided position to a road similar to the provided name.

        • OnRoadThreshold (integer) --

          If the distance to a highway/bridge/tunnel/sliproad is within threshold, the waypoint will be snapped to the highway/bridge/tunnel/sliproad.

          Unit : meters

        • Radius (integer) --

          Considers all roads within the provided radius to match the provided destination to. The roads that are considered are determined by the provided Strategy.

          Unit : Meters

        • Strategy (string) --

          Strategy that defines matching of the position onto the road network. MatchAny considers all roads possible, whereas MatchMostSignificantRoad matches to the most significant road.

      • SideOfStreet (dict) --

        Options to configure matching the provided position to a side of the street.

        • Position (list) -- [REQUIRED]

          Position defined as [longitude, latitude] .

          • (float) --

        • UseWith (string) --

          Strategy that defines when the side of street position should be used. AnyStreet will always use the provided position.

          Default Value: DividedStreetOnly

    • Position (list) -- [REQUIRED]

      Position defined as [longitude, latitude] .

      • (float) --

type Exclude

dict

param Exclude

Features to be strictly excluded while calculating the route.

  • Countries (list) -- [REQUIRED]

    List of countries to be avoided defined by two-letter or three-letter country codes.

    • (string) --

type Key

string

param Key

Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.

type OptimizeRoutingFor

string

param OptimizeRoutingFor

Specifies the optimization criteria for calculating a route.

Default Value: FastestRoute

type Origins

list

param Origins

[REQUIRED]

The position in longitude and latitude for the origin.

  • (dict) --

    The start position for the route.

    • Options (dict) --

      Origin related options.

      • AvoidActionsForDistance (integer) --

        Avoids actions for the provided distance. This is typically to consider for users in moving vehicles who may not have sufficient time to make an action at an origin or a destination.

      • Heading (float) --

        GPS Heading at the position.

      • Matching (dict) --

        Options to configure matching the provided position to the road network.

        • NameHint (string) --

          Attempts to match the provided position to a road similar to the provided name.

        • OnRoadThreshold (integer) --

          If the distance to a highway/bridge/tunnel/sliproad is within threshold, the waypoint will be snapped to the highway/bridge/tunnel/sliproad.

          Unit : meters

        • Radius (integer) --

          Considers all roads within the provided radius to match the provided destination to. The roads that are considered are determined by the provided Strategy.

          Unit : Meters

        • Strategy (string) --

          Strategy that defines matching of the position onto the road network. MatchAny considers all roads possible, whereas MatchMostSignificantRoad matches to the most significant road.

      • SideOfStreet (dict) --

        Options to configure matching the provided position to a side of the street.

        • Position (list) -- [REQUIRED]

          Position defined as [longitude, latitude] .

          • (float) --

        • UseWith (string) --

          Strategy that defines when the side of street position should be used. AnyStreet will always use the provided position.

          Default Value: DividedStreetOnly

    • Position (list) -- [REQUIRED]

      Position defined as [longitude, latitude] .

      • (float) --

type RoutingBoundary

dict

param RoutingBoundary

[REQUIRED]

Boundary within which the matrix is to be calculated. All data, origins and destinations outside the boundary are considered invalid.

Note

When request routing boundary was set as AutoCircle, the response routing boundary will return Circle derived from the AutoCircle settings.

  • Geometry (dict) --

    Geometry of the area to be avoided.

    • AutoCircle (dict) --

      Provides the circle that was used while calculating the route.

      • Margin (integer) --

        The margin provided for the calculation.

      • MaxRadius (integer) --

        The maximum size of the radius provided for the calculation.

    • Circle (dict) --

      Geometry defined as a circle. When request routing boundary was set as AutoCircle , the response routing boundary will return Circle derived from the AutoCircle settings.

      • Center (list) -- [REQUIRED]

        Center of the Circle defined in longitude and latitude coordinates.

        Example: [-123.1174, 49.2847] represents the position with longitude -123.1174 and latitude 49.2847 .

        • (float) --

      • Radius (float) -- [REQUIRED]

        Radius of the Circle.

        Unit : meters

    • BoundingBox (list) --

      Geometry defined as a bounding box. The first pair represents the X and Y coordinates (longitude and latitude,) of the southwest corner of the bounding box; the second pair represents the X and Y coordinates (longitude and latitude) of the northeast corner.

      • (float) --

    • Polygon (list) --

      Geometry defined as a polygon with only one linear ring.

      • (list) --

        • (list) --

          • (float) --

  • Unbounded (boolean) --

    No restrictions in terms of a routing boundary, and is typically used for longer routes.

type Traffic

dict

param Traffic

Traffic related options.

  • FlowEventThresholdOverride (integer) --

    Duration for which flow traffic is considered valid. For this period, the flow traffic is used over historical traffic data. Flow traffic refers to congestion, which changes very quickly. Duration in seconds for which flow traffic event would be considered valid. While flow traffic event is valid it will be used over the historical traffic data.

  • Usage (string) --

    Determines if traffic should be used or ignored while calculating the route.

    Default Value: UseTrafficData

type TravelMode

string

param TravelMode

Specifies the mode of transport when calculating a route. Used in estimating the speed of travel and road compatibility.

Default Value: Car

type TravelModeOptions

dict

param TravelModeOptions

Travel mode related options for the provided travel mode.

  • Car (dict) --

    Travel mode options when the provided travel mode is "Car"

    • LicensePlate (dict) --

      The vehicle License Plate.

      • LastCharacter (string) --

        The last character of the License Plate.

    • MaxSpeed (float) --

      Maximum speed

      Unit : KilometersPerHour

    • Occupancy (integer) --

      The number of occupants in the vehicle.

      Default Value: 1

  • Scooter (dict) --

    Travel mode options when the provided travel mode is "Scooter"

    • LicensePlate (dict) --

      The vehicle License Plate.

      • LastCharacter (string) --

        The last character of the License Plate.

    • MaxSpeed (float) --

      Maximum speed.

      Unit : KilometersPerHour

    • Occupancy (integer) --

      The number of occupants in the vehicle.

      Default Value: 1

  • Truck (dict) --

    Travel mode options when the provided travel mode is "Truck"

    • AxleCount (integer) --

      Total number of axles of the vehicle.

    • GrossWeight (integer) --

      Gross weight of the vehicle including trailers, and goods at capacity.

      Unit : Kilograms

    • HazardousCargos (list) --

      List of Hazardous cargo contained in the vehicle.

      • (string) --

    • Height (integer) --

      Height of the vehicle.

      Unit : centimeters

    • KpraLength (integer) --

      Kingpin to rear axle length of the vehicle

      Unit : centimeters

    • Length (integer) --

      Length of the vehicle.

      Unit : centimeters

    • LicensePlate (dict) --

      The vehicle License Plate.

      • LastCharacter (string) --

        The last character of the License Plate.

    • MaxSpeed (float) --

      Maximum speed

      Unit : KilometersPerHour

    • Occupancy (integer) --

      The number of occupants in the vehicle.

      Default Value: 1

    • PayloadCapacity (integer) --

      Payload capacity of the vehicle and trailers attached.

      Unit : kilograms

    • Trailer (dict) --

      Trailer options corresponding to the vehicle.

      • TrailerCount (integer) --

        Number of trailers attached to the vehicle.

        Default Value: 0

    • TruckType (string) --

      Type of the truck.

    • TunnelRestrictionCode (string) --

      The tunnel restriction code.

      Tunnel categories in this list indicate the restrictions which apply to certain tunnels in Great Britain. They relate to the types of dangerous goods that can be transported through them.

      • Tunnel Category B

        • Risk Level : Limited risk

        • Restrictions : Few restrictions

      • Tunnel Category C

        • Risk Level : Medium risk

        • Restrictions : Some restrictions

      • Tunnel Category D

        • Risk Level : High risk

        • Restrictions : Many restrictions occur

      • Tunnel Category E

        • Risk Level : Very high risk

        • Restrictions : Restricted tunnel

    • WeightPerAxle (integer) --

      Heaviest weight per axle irrespective of the axle type or the axle group. Meant for usage in countries where the differences in axle types or axle groups are not distinguished.

      Unit : Kilograms

    • WeightPerAxleGroup (dict) --

      Specifies the total weight for the specified axle group. Meant for usage in countries that have different regulations based on the axle group type.

      • Single (integer) --

        Weight for single axle group.

        Unit : Kilograms

      • Tandem (integer) --

        Weight for tandem axle group.

        Unit : Kilograms

      • Triple (integer) --

        Weight for triple axle group.

        Unit : Kilograms

      • Quad (integer) --

        Weight for quad axle group.

        Unit : Kilograms

      • Quint (integer) --

        Weight for quad quint group.

        Unit : Kilograms

    • Width (integer) --

      Width of the vehicle.

      Unit : centimeters

rtype

dict

returns

Response Syntax

{
    'ErrorCount': 123,
    'PricingBucket': 'string',
    'RouteMatrix': [
        [
            {
                'Distance': 123,
                'Duration': 123,
                'Error': 'NoMatch'|'NoMatchDestination'|'NoMatchOrigin'|'NoRoute'|'OutOfBounds'|'OutOfBoundsDestination'|'OutOfBoundsOrigin'|'Other'|'Violation'
            },
        ],
    ],
    'RoutingBoundary': {
        'Geometry': {
            'AutoCircle': {
                'Margin': 123,
                'MaxRadius': 123
            },
            'Circle': {
                'Center': [
                    123.0,
                ],
                'Radius': 123.0
            },
            'BoundingBox': [
                123.0,
            ],
            'Polygon': [
                [
                    [
                        123.0,
                    ],
                ],
            ]
        },
        'Unbounded': True|False
    }
}

Response Structure

  • (dict) --

    • ErrorCount (integer) --

      The count of error results in the route matrix. If this number is 0, all routes were calculated successfully.

    • PricingBucket (string) --

      The pricing bucket for which the query is charged at.

    • RouteMatrix (list) --

      The calculated route matrix containing the results for all pairs of Origins to Destination positions. Each row corresponds to one entry in Origins. Each entry in the row corresponds to the route from that entry in Origins to an entry in Destination positions.

      • (list) --

        • (dict) --

          The calculated route matrix containing the results for all pairs of Origins to Destination positions. Each row corresponds to one entry in Origins. Each entry in the row corresponds to the route from that entry in Origins to an entry in Destination positions.

          • Distance (integer) --

            The total distance of travel for the route.

          • Duration (integer) --

            The expected duration of travel for the route.

            Unit : seconds

          • Error (string) --

            Error code that occurred during calculation of the route.

    • RoutingBoundary (dict) --

      Boundary within which the matrix is to be calculated. All data, origins and destinations outside the boundary are considered invalid.

      Note

      When request routing boundary was set as AutoCircle, the response routing boundary will return Circle derived from the AutoCircle settings.

      • Geometry (dict) --

        Geometry of the area to be avoided.

        • AutoCircle (dict) --

          Provides the circle that was used while calculating the route.

          • Margin (integer) --

            The margin provided for the calculation.

          • MaxRadius (integer) --

            The maximum size of the radius provided for the calculation.

        • Circle (dict) --

          Geometry defined as a circle. When request routing boundary was set as AutoCircle , the response routing boundary will return Circle derived from the AutoCircle settings.

          • Center (list) --

            Center of the Circle defined in longitude and latitude coordinates.

            Example: [-123.1174, 49.2847] represents the position with longitude -123.1174 and latitude 49.2847 .

            • (float) --

          • Radius (float) --

            Radius of the Circle.

            Unit : meters

        • BoundingBox (list) --

          Geometry defined as a bounding box. The first pair represents the X and Y coordinates (longitude and latitude,) of the southwest corner of the bounding box; the second pair represents the X and Y coordinates (longitude and latitude) of the northeast corner.

          • (float) --

        • Polygon (list) --

          Geometry defined as a polygon with only one linear ring.

          • (list) --

            • (list) --

              • (float) --

      • Unbounded (boolean) --

        No restrictions in terms of a routing boundary, and is typically used for longer routes.