SDK for PHP V3

Client: Aws\GeoRoutes\GeoRoutesClient
Service ID: geo-routes
Version: 2020-11-19

This page describes the parameters and results for the operations of the Amazon Location Service Routes V2 (2020-11-19), and shows how to use the Aws\GeoRoutes\GeoRoutesClient object to call the described operations. This documentation is specific to the 2020-11-19 API version of the service.

Operation Summary

Each of the following operations can be created from a client using $client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

CalculateIsolines ( array $params = [] )
Calculates areas that can be reached within specified time or distance thresholds from a given point.
CalculateRouteMatrix ( array $params = [] )
Use CalculateRouteMatrix to compute results for all pairs of Origins to Destinations.
CalculateRoutes ( array $params = [] )
CalculateRoutes computes routes given the following required parameters: Origin and Destination.
OptimizeWaypoints ( array $params = [] )
OptimizeWaypoints 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.
SnapToRoads ( array $params = [] )
SnapToRoads matches GPS trace to roads most likely traveled on.

Operations

CalculateIsolines

$result = $client->calculateIsolines([/* ... */]);
$promise = $client->calculateIsolinesAsync([/* ... */]);

Calculates areas that can be reached within specified time or distance thresholds from a given point. For example, you can use this operation to determine the area within a 30-minute drive of a store location, find neighborhoods within walking distance of a school, or identify delivery zones based on drive time.

Isolines (also known as isochrones for time-based calculations) are useful for various applications including:

  • Service area visualization - Show customers the area you can serve within promised delivery times

  • Site selection - Analyze potential business locations based on population within travel distance

  • Site selection - Determine areas that can be reached within specified response times

Route preferences such as avoiding toll roads or ferries are treated as preferences rather than absolute restrictions. If a viable route cannot be calculated while honoring all preferences, some may be ignored.

For more information, see Calculate isolines in the Amazon Location Service Developer Guide.

Parameter Syntax

$result = $client->calculateIsolines([
    'Allow' => [
        'Hot' => true || false,
        'Hov' => true || false,
    ],
    'ArrivalTime' => '<string>',
    'Avoid' => [
        'Areas' => [
            [
                'Except' => [
                    [
                        'BoundingBox' => [<float>, ...],
                        'Corridor' => [
                            'LineString' => [ // REQUIRED
                                [<float>, ...],
                                // ...
                            ],
                            'Radius' => <integer>, // REQUIRED
                        ],
                        'Polygon' => [
                            [
                                [<float>, ...],
                                // ...
                            ],
                            // ...
                        ],
                        'PolylineCorridor' => [
                            'Polyline' => '<string>', // REQUIRED
                            'Radius' => <integer>, // REQUIRED
                        ],
                        'PolylinePolygon' => ['<string>', ...],
                    ],
                    // ...
                ],
                'Geometry' => [ // REQUIRED
                    'BoundingBox' => [<float>, ...],
                    'Corridor' => [
                        'LineString' => [ // REQUIRED
                            [<float>, ...],
                            // ...
                        ],
                        'Radius' => <integer>, // REQUIRED
                    ],
                    'Polygon' => [
                        [
                            [<float>, ...],
                            // ...
                        ],
                        // ...
                    ],
                    'PolylineCorridor' => [
                        'Polyline' => '<string>', // REQUIRED
                        'Radius' => <integer>, // REQUIRED
                    ],
                    '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' => [<float>, ...],
    'DestinationOptions' => [
        'AvoidActionsForDistance' => <integer>,
        'Heading' => <float>,
        'Matching' => [
            'NameHint' => '<string>',
            'OnRoadThreshold' => <integer>,
            'Radius' => <integer>,
            'Strategy' => 'MatchAny|MatchMostSignificantRoad',
        ],
        'SideOfStreet' => [
            'Position' => [<float>, ...], // REQUIRED
            'UseWith' => 'AnyStreet|DividedStreetOnly',
        ],
    ],
    'IsolineGeometryFormat' => 'FlexiblePolyline|Simple',
    'IsolineGranularity' => [
        'MaxPoints' => <integer>,
        'MaxResolution' => <integer>,
    ],
    'Key' => '<string>',
    'OptimizeIsolineFor' => 'AccurateCalculation|BalancedCalculation|FastCalculation',
    'OptimizeRoutingFor' => 'FastestRoute|ShortestRoute',
    'Origin' => [<float>, ...],
    'OriginOptions' => [
        'AvoidActionsForDistance' => <integer>,
        'Heading' => <float>,
        'Matching' => [
            'NameHint' => '<string>',
            'OnRoadThreshold' => <integer>,
            'Radius' => <integer>,
            'Strategy' => 'MatchAny|MatchMostSignificantRoad',
        ],
        'SideOfStreet' => [
            'Position' => [<float>, ...], // REQUIRED
            'UseWith' => 'AnyStreet|DividedStreetOnly',
        ],
    ],
    'Thresholds' => [ // REQUIRED
        'Distance' => [<integer>, ...],
        'Time' => [<integer>, ...],
    ],
    'Traffic' => [
        'FlowEventThresholdOverride' => <integer>,
        'Usage' => 'IgnoreTrafficData|UseTrafficData',
    ],
    'TravelMode' => 'Car|Pedestrian|Scooter|Truck',
    'TravelModeOptions' => [
        'Car' => [
            'EngineType' => 'Electric|InternalCombustion|PluginHybrid',
            'LicensePlate' => [
                'LastCharacter' => '<string>',
            ],
            'MaxSpeed' => <float>,
            'Occupancy' => <integer>,
        ],
        'Scooter' => [
            'EngineType' => 'Electric|InternalCombustion|PluginHybrid',
            'LicensePlate' => [
                'LastCharacter' => '<string>',
            ],
            'MaxSpeed' => <float>,
            'Occupancy' => <integer>,
        ],
        'Truck' => [
            'AxleCount' => <integer>,
            'EngineType' => 'Electric|InternalCombustion|PluginHybrid',
            'GrossWeight' => <integer>,
            'HazardousCargos' => ['<string>', ...],
            'Height' => <integer>,
            'HeightAboveFirstAxle' => <integer>,
            'KpraLength' => <integer>,
            'Length' => <integer>,
            'LicensePlate' => [
                'LastCharacter' => '<string>',
            ],
            'MaxSpeed' => <float>,
            'Occupancy' => <integer>,
            'PayloadCapacity' => <integer>,
            'TireCount' => <integer>,
            'Trailer' => [
                'AxleCount' => <integer>,
                'TrailerCount' => <integer>,
            ],
            'TruckType' => 'LightTruck|StraightTruck|Tractor',
            'TunnelRestrictionCode' => '<string>',
            'WeightPerAxle' => <integer>,
            'WeightPerAxleGroup' => [
                'Quad' => <integer>,
                'Quint' => <integer>,
                'Single' => <integer>,
                'Tandem' => <integer>,
                'Triple' => <integer>,
            ],
            'Width' => <integer>,
        ],
    ],
]);

Parameter Details

Members
Allow
Type: IsolineAllowOptions structure

Enables special road types or features that should be considered for routing even if they might be restricted by default for the selected travel mode. These include high-occupancy vehicle and toll lanes.

ArrivalTime
Type: string

Determine areas from which Destination can be reached by this time, taking into account predicted traffic conditions and working backward to account for congestion patterns. This attribute cannot be used together with DepartureTime or DepartNow. Specified as an ISO-8601 timestamp with timezone offset.

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

Avoid
Type: IsolineAvoidanceOptions structure

Specifies road types, features, or areas to avoid (if possible) when calculating reachable areas. These are treated as preferences rather than strict constraints—if a route cannot be calculated without using an avoided feature, that avoidance preference may be ignored.

DepartNow
Type: boolean

When true, uses the current time as the departure time and takes current traffic conditions into account. This attribute cannot be used together with DepartureTime or ArrivalTime.

DepartureTime
Type: string

Determine areas that can be reached when departing at this time, taking into account predicted traffic conditions. This attribute cannot be used together with ArrivalTime or DepartNow. Specified as an ISO-8601 timestamp with timezone offset.

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

Destination
Type: Array of doubles

An optional destination point, specified as [longitude, latitude] coordinates. When provided, the service calculates areas from which this destination can be reached within the specified thresholds. This reverses the usual isoline calculation to show areas that could reach your location, rather than areas you could reach from your location. Either Origin or Destination must be provided.

DestinationOptions
Type: IsolineDestinationOptions structure

Options that control how the destination point is matched to the road network and how routes can approach it. These options help improve travel time accuracy by accounting for real-world access to the destination.

IsolineGeometryFormat
Type: string

The format of the returned IsolineGeometry.

Default value:FlexiblePolyline

IsolineGranularity
Type: IsolineGranularityOptions structure

Controls the detail level of the generated isolines. Higher granularity produces smoother shapes but requires more processing time and results in larger responses.

Key
Type: string

An Amazon Location Service API Key with access to this action. If omitted, the request must be signed using Signature Version 4.

OptimizeIsolineFor
Type: string

Controls the trade-off between calculation speed and isoline precision. Choose FastCalculation for quicker results with less detail, AccurateCalculation for more precise results, or BalancedCalculation for a middle ground.

Default value: BalancedCalculation

OptimizeRoutingFor
Type: string

Determines whether routes prioritize shortest travel time (FastestRoute) or shortest physical distance (ShortestRoute) when calculating reachable areas.

Default value: FastestRoute

Origin
Type: Array of doubles

The starting point for isoline calculations, specified as [longitude, latitude] coordinates. For example, this could be a store location, service center, or any point from which you want to calculate reachable areas. Either Origin or Destination must be provided.

OriginOptions
Type: IsolineOriginOptions structure

Options that control how the origin point is matched to the road network and how routes can depart from it. These options help improve travel time accuracy by accounting for real-world access from the origin.

Thresholds
Required: Yes
Type: IsolineThresholds structure

The distance or time thresholds used to determine reachable areas. You can specify up to five thresholds (which all must be the same type) to calculate multiple isolines in a single request. For example, to determine the areas that are reachable within 10 and 20 minutes of the origin, specify time thresholds of 600 and 1200 seconds.

You incur a calculation charge for each threshold. Using a large number of thresholds in a request can lead to unexpected charges. For more information, see Routes pricing in the Amazon Location Service Developer Guide.

Traffic
Type: IsolineTrafficOptions structure

Configures how real-time and historical traffic data affects isoline calculations. Traffic patterns can significantly impact reachable areas, especially during peak hours.

TravelMode
Type: string

The mode of transportation to use for calculations. This affects which road types or features can be used, estimated speed, and the traffic levels that are applied.

  • Car—Standard passenger vehicle routing using roads accessible to cars

  • Pedestrian—Walking routes using pedestrian paths, sidewalks, and crossings

  • Scooter—Light two-wheeled vehicle routing using roads and paths accessible to scooters

  • Truck—Commercial truck routing considering vehicle dimensions, weight restrictions, and hazardous material regulations

The mode Scooter also applies to motorcycles; set this to Scooter when calculating isolines for motorcycles.

Default value: Car

TravelModeOptions
Type: IsolineTravelModeOptions structure

Additional attributes that refine how reachable areas are calculated based on specific vehicle characteristics. These options help produce more accurate results by accounting for real-world constraints and capabilities.

For example:

  • For trucks (Truck), specify dimensions, weight limits, and hazardous cargo restrictions to ensure isolines only include roads that can physically and legally accommodate the vehicle

  • For cars (Car), set maximum speed capabilities or indicate high-occupancy vehicle eligibility to better estimate reachable areas

  • For scooters (Scooter), specify engine type and speed limitations to more accurately model their travel capabilities

Without these options, calculations use default assumptions that may not match your specific use case.

Result Syntax

[
    'ArrivalTime' => '<string>',
    'DepartureTime' => '<string>',
    'IsolineGeometryFormat' => 'FlexiblePolyline|Simple',
    'Isolines' => [
        [
            'Connections' => [
                [
                    'FromPolygonIndex' => <integer>,
                    'Geometry' => [
                        'LineString' => [
                            [<float>, ...],
                            // ...
                        ],
                        'Polyline' => '<string>',
                    ],
                    'ToPolygonIndex' => <integer>,
                ],
                // ...
            ],
            'DistanceThreshold' => <integer>,
            'Geometries' => [
                [
                    'Polygon' => [
                        [
                            [<float>, ...],
                            // ...
                        ],
                        // ...
                    ],
                    'PolylinePolygon' => ['<string>', ...],
                ],
                // ...
            ],
            'TimeThreshold' => <integer>,
        ],
        // ...
    ],
    'PricingBucket' => '<string>',
    'SnappedDestination' => [<float>, ...],
    'SnappedOrigin' => [<float>, ...],
]

Result Details

Members
ArrivalTime
Type: string

Time of arrival at the destination, used for traffic calculations. This attribute is returned only if the Destination and ArrivalTime attributes were 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
Type: string

Time of departure from the origin, used for traffic calculations. This attribute is returned when Origin was provided in the request and either a specific departure time was requested (DepartureTime) or DepartNow was set to true.

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
Required: Yes
Type: string

The format of the returned geometries, matching the format specified in the request. Either FlexiblePolyline for compact encoding or Simple for GeoJSON-compatible coordinates.

Default value:FlexiblePolyline

Isolines
Required: Yes
Type: Array of Isoline structures

Reachable areas, or isolines, for each threshold specified in the request.

PricingBucket
Required: Yes
Type: string

The pricing bucket applied to this calculation. Different buckets apply based on the travel mode and thresholds used.

SnappedDestination
Type: Array of doubles

The actual point on the road network used for calculations, which may differ from the requested destination if Destination was not directly on a road.

SnappedOrigin
Type: Array of doubles

The actual point on the road network used for calculations, which may differ from the requested origin if Origin was not directly on a road.

Errors

InternalServerException:

The request processing has failed because of an unknown error, exception or failure.

AccessDeniedException:

You don't have sufficient access to perform this action.

ValidationException:

The input fails to satisfy the constraints specified by an AWS service.

ThrottlingException:

The request was denied due to request throttling.

CalculateRouteMatrix

$result = $client->calculateRouteMatrix([/* ... */]);
$promise = $client->calculateRouteMatrixAsync([/* ... */]);

Use CalculateRouteMatrix to compute 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.

For more information, see Calculate route matrix in the Amazon Location Service Developer Guide.

Parameter Syntax

$result = $client->calculateRouteMatrix([
    'Allow' => [
        'Hot' => true || false,
        'Hov' => true || false,
    ],
    'Avoid' => [
        'Areas' => [
            [
                'Geometry' => [ // REQUIRED
                    'BoundingBox' => [<float>, ...],
                    'Polygon' => [
                        [
                            [<float>, ...],
                            // ...
                        ],
                        // ...
                    ],
                    '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' => [ // REQUIRED
        [
            'Options' => [
                'AvoidActionsForDistance' => <integer>,
                'Heading' => <float>,
                'Matching' => [
                    'NameHint' => '<string>',
                    'OnRoadThreshold' => <integer>,
                    'Radius' => <integer>,
                    'Strategy' => 'MatchAny|MatchMostSignificantRoad',
                ],
                'SideOfStreet' => [
                    'Position' => [<float>, ...], // REQUIRED
                    'UseWith' => 'AnyStreet|DividedStreetOnly',
                ],
            ],
            'Position' => [<float>, ...], // REQUIRED
        ],
        // ...
    ],
    'Exclude' => [
        'Countries' => ['<string>', ...], // REQUIRED
    ],
    'Key' => '<string>',
    'OptimizeRoutingFor' => 'FastestRoute|ShortestRoute',
    'Origins' => [ // REQUIRED
        [
            'Options' => [
                'AvoidActionsForDistance' => <integer>,
                'Heading' => <float>,
                'Matching' => [
                    'NameHint' => '<string>',
                    'OnRoadThreshold' => <integer>,
                    'Radius' => <integer>,
                    'Strategy' => 'MatchAny|MatchMostSignificantRoad',
                ],
                'SideOfStreet' => [
                    'Position' => [<float>, ...], // REQUIRED
                    'UseWith' => 'AnyStreet|DividedStreetOnly',
                ],
            ],
            'Position' => [<float>, ...], // REQUIRED
        ],
        // ...
    ],
    'RoutingBoundary' => [
        'Geometry' => [
            'AutoCircle' => [
                'Margin' => <integer>,
                'MaxRadius' => <integer>,
            ],
            'BoundingBox' => [<float>, ...],
            'Circle' => [
                'Center' => [<float>, ...], // REQUIRED
                'Radius' => <float>, // REQUIRED
            ],
            'Polygon' => [
                [
                    [<float>, ...],
                    // ...
                ],
                // ...
            ],
        ],
        'Unbounded' => true || false,
    ],
    'Traffic' => [
        'FlowEventThresholdOverride' => <integer>,
        'Usage' => 'IgnoreTrafficData|UseTrafficData',
    ],
    'TravelMode' => 'Car|Pedestrian|Scooter|Truck',
    'TravelModeOptions' => [
        'Car' => [
            'LicensePlate' => [
                'LastCharacter' => '<string>',
            ],
            'MaxSpeed' => <float>,
            'Occupancy' => <integer>,
        ],
        'Scooter' => [
            'LicensePlate' => [
                'LastCharacter' => '<string>',
            ],
            'MaxSpeed' => <float>,
            'Occupancy' => <integer>,
        ],
        'Truck' => [
            'AxleCount' => <integer>,
            'GrossWeight' => <integer>,
            'HazardousCargos' => ['<string>', ...],
            'Height' => <integer>,
            'KpraLength' => <integer>,
            'Length' => <integer>,
            'LicensePlate' => [
                'LastCharacter' => '<string>',
            ],
            'MaxSpeed' => <float>,
            'Occupancy' => <integer>,
            'PayloadCapacity' => <integer>,
            'Trailer' => [
                'TrailerCount' => <integer>,
            ],
            'TruckType' => 'LightTruck|StraightTruck|Tractor',
            'TunnelRestrictionCode' => '<string>',
            'WeightPerAxle' => <integer>,
            'WeightPerAxleGroup' => [
                'Quad' => <integer>,
                'Quint' => <integer>,
                'Single' => <integer>,
                'Tandem' => <integer>,
                'Triple' => <integer>,
            ],
            'Width' => <integer>,
        ],
    ],
]);

Parameter Details

Members
Allow
Type: RouteMatrixAllowOptions structure

Features that are allowed while calculating a route.

Avoid
Type: RouteMatrixAvoidanceOptions structure

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. For GrabMaps customers, ap-southeast-1 and ap-southeast-5 regions support only TollRoads, Ferries, and ControlledAccessHighways.

DepartNow
Type: boolean

Uses the current time as the time of departure.

DepartureTime
Type: string

Time of departure from the 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

Destinations
Required: Yes
Type: Array of RouteMatrixDestination structures

List of destinations for the route.

Route calculations are billed for each origin and destination pair. If you use a large matrix of origins and destinations, your costs will increase accordingly. For more information, see Routes pricing in the Amazon Location Service Developer Guide.

Exclude
Type: RouteMatrixExclusionOptions structure

Features to be strictly excluded while calculating the route. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

Key
Type: string

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

OptimizeRoutingFor
Type: string

Controls the trade-off between finding the shortest travel time (FastestRoute) and the shortest distance (ShortestRoute) when calculating reachable areas.

Default value: FastestRoute

Origins
Required: Yes
Type: Array of RouteMatrixOrigin structures

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

Route calculations are billed for each origin and destination pair. Using a large amount of Origins in a request can lead you to incur unexpected charges. For more information, see Routes pricing in the Amazon Location Service Developer Guide.

RoutingBoundary
Type: RouteMatrixBoundary structure

Boundary within which the matrix is to be calculated. All data, origins and destinations outside the boundary are considered invalid. For GrabMaps customers, ap-southeast-1 and ap-southeast-5 regions support only Unbounded set to true.

Default value: Unbounded set to true

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

Traffic
Type: RouteMatrixTrafficOptions structure

Traffic related options. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

TravelMode
Type: string

Specifies the mode of transport when calculating a route. Used in estimating the speed of travel and road compatibility. For GrabMaps customers, ap-southeast-1 and ap-southeast-5 regions support only Car, Pedestrian, and Scooter.

Default value: Car

TravelModeOptions

Travel mode related options for the provided travel mode. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

Result Syntax

[
    'ErrorCount' => <integer>,
    'PricingBucket' => '<string>',
    'RouteMatrix' => [
        [
            [
                'Distance' => <integer>,
                'Duration' => <integer>,
                'Error' => 'NoMatch|NoMatchDestination|NoMatchOrigin|NoRoute|OutOfBounds|OutOfBoundsDestination|OutOfBoundsOrigin|Other|Violation',
            ],
            // ...
        ],
        // ...
    ],
    'RoutingBoundary' => [
        'Geometry' => [
            'AutoCircle' => [
                'Margin' => <integer>,
                'MaxRadius' => <integer>,
            ],
            'BoundingBox' => [<float>, ...],
            'Circle' => [
                'Center' => [<float>, ...],
                'Radius' => <float>,
            ],
            'Polygon' => [
                [
                    [<float>, ...],
                    // ...
                ],
                // ...
            ],
        ],
        'Unbounded' => true || false,
    ],
]

Result Details

Members
ErrorCount
Required: Yes
Type: int

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

PricingBucket
Required: Yes
Type: string

The pricing bucket for which the query is charged at.

RouteMatrix
Required: Yes
Type: Array of RouteMatrixEntry structuress

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.

RoutingBoundary
Required: Yes
Type: RouteMatrixBoundary structure

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

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

Errors

InternalServerException:

The request processing has failed because of an unknown error, exception or failure.

AccessDeniedException:

You don't have sufficient access to perform this action.

ValidationException:

The input fails to satisfy the constraints specified by an AWS service.

ThrottlingException:

The request was denied due to request throttling.

CalculateRoutes

$result = $client->calculateRoutes([/* ... */]);
$promise = $client->calculateRoutesAsync([/* ... */]);

CalculateRoutes computes routes given the following required parameters: Origin and Destination.

For more information, see Calculate routes in the Amazon Location Service Developer Guide.

Parameter Syntax

$result = $client->calculateRoutes([
    'Allow' => [
        'Hot' => true || false,
        'Hov' => true || false,
    ],
    'ArrivalTime' => '<string>',
    'Avoid' => [
        'Areas' => [
            [
                'Except' => [
                    [
                        'BoundingBox' => [<float>, ...],
                        'Corridor' => [
                            'LineString' => [ // REQUIRED
                                [<float>, ...],
                                // ...
                            ],
                            'Radius' => <integer>, // REQUIRED
                        ],
                        'Polygon' => [
                            [
                                [<float>, ...],
                                // ...
                            ],
                            // ...
                        ],
                        'PolylineCorridor' => [
                            'Polyline' => '<string>', // REQUIRED
                            'Radius' => <integer>, // REQUIRED
                        ],
                        'PolylinePolygon' => ['<string>', ...],
                    ],
                    // ...
                ],
                'Geometry' => [ // REQUIRED
                    'BoundingBox' => [<float>, ...],
                    'Corridor' => [
                        'LineString' => [ // REQUIRED
                            [<float>, ...],
                            // ...
                        ],
                        'Radius' => <integer>, // REQUIRED
                    ],
                    'Polygon' => [
                        [
                            [<float>, ...],
                            // ...
                        ],
                        // ...
                    ],
                    'PolylineCorridor' => [
                        'Polyline' => '<string>', // REQUIRED
                        'Radius' => <integer>, // REQUIRED
                    ],
                    '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', // REQUIRED
            ],
            // ...
        ],
    ],
    'DepartNow' => true || false,
    'DepartureTime' => '<string>',
    'Destination' => [<float>, ...], // REQUIRED
    'DestinationOptions' => [
        'AvoidActionsForDistance' => <integer>,
        'AvoidUTurns' => true || false,
        'Heading' => <float>,
        'Matching' => [
            'NameHint' => '<string>',
            'OnRoadThreshold' => <integer>,
            'Radius' => <integer>,
            'Strategy' => 'MatchAny|MatchMostSignificantRoad',
        ],
        'SideOfStreet' => [
            'Position' => [<float>, ...], // REQUIRED
            'UseWith' => 'AnyStreet|DividedStreetOnly',
        ],
        'StopDuration' => <integer>,
    ],
    'Driver' => [
        'Schedule' => [
            [
                'DriveDuration' => <integer>, // REQUIRED
                'RestDuration' => <integer>, // REQUIRED
            ],
            // ...
        ],
    ],
    'Exclude' => [
        'Countries' => ['<string>', ...], // REQUIRED
    ],
    'InstructionsMeasurementSystem' => 'Metric|Imperial',
    'Key' => '<string>',
    'Languages' => ['<string>', ...],
    'LegAdditionalFeatures' => ['<string>', ...],
    'LegGeometryFormat' => 'FlexiblePolyline|Simple',
    'MaxAlternatives' => <integer>,
    'OptimizeRoutingFor' => 'FastestRoute|ShortestRoute',
    'Origin' => [<float>, ...], // REQUIRED
    'OriginOptions' => [
        'AvoidActionsForDistance' => <integer>,
        'AvoidUTurns' => true || false,
        'Heading' => <float>,
        'Matching' => [
            'NameHint' => '<string>',
            'OnRoadThreshold' => <integer>,
            'Radius' => <integer>,
            'Strategy' => 'MatchAny|MatchMostSignificantRoad',
        ],
        'SideOfStreet' => [
            'Position' => [<float>, ...], // REQUIRED
            'UseWith' => 'AnyStreet|DividedStreetOnly',
        ],
    ],
    'SpanAdditionalFeatures' => ['<string>', ...],
    'Tolls' => [
        'AllTransponders' => true || false,
        'AllVignettes' => true || false,
        'Currency' => '<string>',
        'EmissionType' => [
            'Co2EmissionClass' => '<string>',
            'Type' => '<string>', // REQUIRED
        ],
        'VehicleCategory' => 'Minibus',
    ],
    'Traffic' => [
        'FlowEventThresholdOverride' => <integer>,
        'Usage' => 'IgnoreTrafficData|UseTrafficData',
    ],
    'TravelMode' => 'Car|Pedestrian|Scooter|Truck',
    'TravelModeOptions' => [
        'Car' => [
            'EngineType' => 'Electric|InternalCombustion|PluginHybrid',
            'LicensePlate' => [
                'LastCharacter' => '<string>',
            ],
            'MaxSpeed' => <float>,
            'Occupancy' => <integer>,
        ],
        'Pedestrian' => [
            'Speed' => <float>,
        ],
        'Scooter' => [
            'EngineType' => 'Electric|InternalCombustion|PluginHybrid',
            'LicensePlate' => [
                'LastCharacter' => '<string>',
            ],
            'MaxSpeed' => <float>,
            'Occupancy' => <integer>,
        ],
        'Truck' => [
            'AxleCount' => <integer>,
            'EngineType' => 'Electric|InternalCombustion|PluginHybrid',
            'GrossWeight' => <integer>,
            'HazardousCargos' => ['<string>', ...],
            'Height' => <integer>,
            'HeightAboveFirstAxle' => <integer>,
            'KpraLength' => <integer>,
            'Length' => <integer>,
            'LicensePlate' => [
                'LastCharacter' => '<string>',
            ],
            'MaxSpeed' => <float>,
            'Occupancy' => <integer>,
            'PayloadCapacity' => <integer>,
            'TireCount' => <integer>,
            'Trailer' => [
                'AxleCount' => <integer>,
                'TrailerCount' => <integer>,
            ],
            'TruckType' => 'LightTruck|StraightTruck|Tractor',
            'TunnelRestrictionCode' => '<string>',
            'WeightPerAxle' => <integer>,
            'WeightPerAxleGroup' => [
                'Quad' => <integer>,
                'Quint' => <integer>,
                'Single' => <integer>,
                'Tandem' => <integer>,
                'Triple' => <integer>,
            ],
            'Width' => <integer>,
        ],
    ],
    'TravelStepType' => 'Default|TurnByTurn',
    'Waypoints' => [
        [
            'AvoidActionsForDistance' => <integer>,
            'AvoidUTurns' => true || false,
            'Heading' => <float>,
            'Matching' => [
                'NameHint' => '<string>',
                'OnRoadThreshold' => <integer>,
                'Radius' => <integer>,
                'Strategy' => 'MatchAny|MatchMostSignificantRoad',
            ],
            'PassThrough' => true || false,
            'Position' => [<float>, ...], // REQUIRED
            'SideOfStreet' => [
                'Position' => [<float>, ...], // REQUIRED
                'UseWith' => 'AnyStreet|DividedStreetOnly',
            ],
            'StopDuration' => <integer>,
        ],
        // ...
    ],
]);

Parameter Details

Members
Allow
Type: RouteAllowOptions structure

Features that are allowed while calculating a route. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

ArrivalTime
Type: string

Time of arrival at the destination. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

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

Avoid
Type: RouteAvoidanceOptions structure

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. For GrabMaps customers, ap-southeast-1 and ap-southeast-5 regions support only ControlledAccessHighways, Ferries, and TollRoads

DepartNow
Type: boolean

Uses the current time as the time of departure.

DepartureTime
Type: string

Time of departure from the 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

Destination
Required: Yes
Type: Array of doubles

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

DestinationOptions
Type: RouteDestinationOptions structure

Destination related options. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

Driver
Type: RouteDriverOptions structure

Driver related options. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

Exclude
Type: RouteExclusionOptions structure

Features to be strictly excluded while calculating the route. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

InstructionsMeasurementSystem
Type: string

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

Key
Type: string

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

Languages
Type: Array of strings

List of languages for instructions within steps in the response. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

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

LegAdditionalFeatures
Type: Array of strings

A list of optional additional parameters such as timezone that can be requested for each result. For GrabMaps customers, ap-southeast-1 and ap-southeast-5 regions support only PassThroughWaypoints, Summary, and TravelStepInstructions

  • 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.

LegGeometryFormat
Type: string

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 https://github.com/aws-geospatial/polyline.

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

MaxAlternatives
Type: int

Maximum number of alternative routes to be provided in the response, if available. For GrabMaps customers, ap-southeast-1 and ap-southeast-5 regions support only up to 3 alternative routes.

OptimizeRoutingFor
Type: string

Controls the trade-off between achieving the shortest travel time (FastestRoute) and achieving the shortest physical distance ((ShortestRoute) when calculating each route in the matrix.

Default value: FastestRoute

Origin
Required: Yes
Type: Array of doubles

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

OriginOptions
Type: RouteOriginOptions structure

Specifies how the origin point should be matched to the road network and any routing constraints that apply when the traveler is departing the origin. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

SpanAdditionalFeatures
Type: Array of strings

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. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

Tolls
Type: RouteTollOptions structure

Toll related options. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

Traffic
Type: RouteTrafficOptions structure

Traffic related options. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

TravelMode
Type: string

Specifies the mode of transport when calculating a route. Used in estimating the speed of travel and road compatibility. For GrabMaps customers, ap-southeast-1 and ap-southeast-5 regions support only Car, Pedestrian, and Scooter values.

Default value: Car

TravelModeOptions
Type: RouteTravelModeOptions structure

Travel mode related options for the provided travel mode. For GrabMaps customers, ap-southeast-1 and ap-southeast-5 regions support only Car and Pedestrian travel mode options.

TravelStepType
Type: string

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 navigation system. For GrabMaps customers, ap-southeast-1 and ap-southeast-5 regions Default does not return any steps.

Waypoints
Type: Array of RouteWaypoint structures

List of waypoints between the Origin and Destination. For GrabMaps customers, ap-southeast-1 and ap-southeast-5 regions max length is 100.

Max length: 23

Result Syntax

[
    'LegGeometryFormat' => 'FlexiblePolyline|Simple',
    'Notices' => [
        [
            'Code' => 'MainLanguageNotFound|Other|TravelTimeExceedsDriverWorkHours',
            'Impact' => 'High|Low',
        ],
        // ...
    ],
    'PricingBucket' => '<string>',
    'Routes' => [
        [
            'Legs' => [
                [
                    'FerryLegDetails' => [
                        'AfterTravelSteps' => [
                            [
                                'Duration' => <integer>,
                                'Instruction' => '<string>',
                                'Type' => 'Deboard',
                            ],
                            // ...
                        ],
                        'Arrival' => [
                            'Place' => [
                                'Name' => '<string>',
                                'OriginalPosition' => [<float>, ...],
                                'Position' => [<float>, ...],
                                'WaypointIndex' => <integer>,
                            ],
                            'Time' => '<string>',
                        ],
                        'BeforeTravelSteps' => [
                            [
                                'Duration' => <integer>,
                                'Instruction' => '<string>',
                                'Type' => 'Board',
                            ],
                            // ...
                        ],
                        'Departure' => [
                            'Place' => [
                                'Name' => '<string>',
                                'OriginalPosition' => [<float>, ...],
                                'Position' => [<float>, ...],
                                'WaypointIndex' => <integer>,
                            ],
                            'Time' => '<string>',
                        ],
                        'Notices' => [
                            [
                                'Code' => 'AccuratePolylineUnavailable|NoSchedule|Other|ViolatedAvoidFerry|ViolatedAvoidRailFerry|SeasonalClosure|PotentialViolatedVehicleRestrictionUsage',
                                'Impact' => 'High|Low',
                            ],
                            // ...
                        ],
                        'PassThroughWaypoints' => [
                            [
                                'GeometryOffset' => <integer>,
                                'Place' => [
                                    'OriginalPosition' => [<float>, ...],
                                    'Position' => [<float>, ...],
                                    'WaypointIndex' => <integer>,
                                ],
                            ],
                            // ...
                        ],
                        'RouteName' => '<string>',
                        'Spans' => [
                            [
                                'Country' => '<string>',
                                'Distance' => <integer>,
                                'Duration' => <integer>,
                                'GeometryOffset' => <integer>,
                                'Names' => [
                                    [
                                        'Language' => '<string>',
                                        'Value' => '<string>',
                                    ],
                                    // ...
                                ],
                                'Region' => '<string>',
                            ],
                            // ...
                        ],
                        'Summary' => [
                            'Overview' => [
                                'Distance' => <integer>,
                                'Duration' => <integer>,
                            ],
                            'TravelOnly' => [
                                'Duration' => <integer>,
                            ],
                        ],
                        'TravelSteps' => [
                            [
                                'Distance' => <integer>,
                                'Duration' => <integer>,
                                'GeometryOffset' => <integer>,
                                'Instruction' => '<string>',
                                'Type' => 'Depart|Continue|Arrive',
                            ],
                            // ...
                        ],
                    ],
                    'Geometry' => [
                        'LineString' => [
                            [<float>, ...],
                            // ...
                        ],
                        'Polyline' => '<string>',
                    ],
                    'Language' => '<string>',
                    'PedestrianLegDetails' => [
                        'Arrival' => [
                            'Place' => [
                                'Name' => '<string>',
                                'OriginalPosition' => [<float>, ...],
                                'Position' => [<float>, ...],
                                'SideOfStreet' => 'Left|Right',
                                'WaypointIndex' => <integer>,
                            ],
                            'Time' => '<string>',
                        ],
                        'Departure' => [
                            'Place' => [
                                'Name' => '<string>',
                                'OriginalPosition' => [<float>, ...],
                                'Position' => [<float>, ...],
                                'SideOfStreet' => 'Left|Right',
                                'WaypointIndex' => <integer>,
                            ],
                            'Time' => '<string>',
                        ],
                        'Notices' => [
                            [
                                'Code' => 'AccuratePolylineUnavailable|Other|ViolatedAvoidDirtRoad|ViolatedAvoidTunnel|ViolatedPedestrianOption',
                                'Impact' => 'High|Low',
                            ],
                            // ...
                        ],
                        'PassThroughWaypoints' => [
                            [
                                'GeometryOffset' => <integer>,
                                'Place' => [
                                    'OriginalPosition' => [<float>, ...],
                                    'Position' => [<float>, ...],
                                    'WaypointIndex' => <integer>,
                                ],
                            ],
                            // ...
                        ],
                        'Spans' => [
                            [
                                'BestCaseDuration' => <integer>,
                                'Country' => '<string>',
                                'Distance' => <integer>,
                                'Duration' => <integer>,
                                'DynamicSpeed' => [
                                    'BestCaseSpeed' => <float>,
                                    'TurnDuration' => <integer>,
                                    'TypicalSpeed' => <float>,
                                ],
                                'FunctionalClassification' => <integer>,
                                'GeometryOffset' => <integer>,
                                'Incidents' => [<integer>, ...],
                                'Names' => [
                                    [
                                        'Language' => '<string>',
                                        'Value' => '<string>',
                                    ],
                                    // ...
                                ],
                                'PedestrianAccess' => ['<string>', ...],
                                'Region' => '<string>',
                                'RoadAttributes' => ['<string>', ...],
                                'RouteNumbers' => [
                                    [
                                        'Direction' => 'East|North|South|West',
                                        'Language' => '<string>',
                                        'Value' => '<string>',
                                    ],
                                    // ...
                                ],
                                'SpeedLimit' => [
                                    'MaxSpeed' => <float>,
                                    'Unlimited' => true || false,
                                ],
                                'TypicalDuration' => <integer>,
                            ],
                            // ...
                        ],
                        'Summary' => [
                            'Overview' => [
                                'Distance' => <integer>,
                                'Duration' => <integer>,
                            ],
                            'TravelOnly' => [
                                'Duration' => <integer>,
                            ],
                        ],
                        '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' => <integer>,
                                'Duration' => <integer>,
                                'ExitNumber' => [
                                    [
                                        'Language' => '<string>',
                                        'Value' => '<string>',
                                    ],
                                    // ...
                                ],
                                'GeometryOffset' => <integer>,
                                'Instruction' => '<string>',
                                'KeepStepDetails' => [
                                    'Intersection' => [
                                        [
                                            'Language' => '<string>',
                                            'Value' => '<string>',
                                        ],
                                        // ...
                                    ],
                                    'SteeringDirection' => 'Left|Right|Straight',
                                    'TurnAngle' => <float>,
                                    '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' => <float>,
                                    'TurnIntensity' => 'Sharp|Slight|Typical',
                                ],
                                'RoundaboutExitStepDetails' => [
                                    'Intersection' => [
                                        [
                                            'Language' => '<string>',
                                            'Value' => '<string>',
                                        ],
                                        // ...
                                    ],
                                    'RelativeExit' => <integer>,
                                    'RoundaboutAngle' => <float>,
                                    'SteeringDirection' => 'Left|Right|Straight',
                                ],
                                'RoundaboutPassStepDetails' => [
                                    'Intersection' => [
                                        [
                                            'Language' => '<string>',
                                            'Value' => '<string>',
                                        ],
                                        // ...
                                    ],
                                    'SteeringDirection' => 'Left|Right|Straight',
                                    'TurnAngle' => <float>,
                                    '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' => <float>,
                                    'TurnIntensity' => 'Sharp|Slight|Typical',
                                ],
                                'Type' => 'Arrive|Continue|Depart|Keep|RoundaboutEnter|RoundaboutExit|RoundaboutPass|Turn',
                            ],
                            // ...
                        ],
                    ],
                    'TravelMode' => 'Car|Ferry|Pedestrian|Scooter|Truck|CarShuttleTrain',
                    'Type' => 'Ferry|Pedestrian|Vehicle',
                    'VehicleLegDetails' => [
                        'Arrival' => [
                            'Place' => [
                                'Name' => '<string>',
                                'OriginalPosition' => [<float>, ...],
                                'Position' => [<float>, ...],
                                'SideOfStreet' => 'Left|Right',
                                'WaypointIndex' => <integer>,
                            ],
                            'Time' => '<string>',
                        ],
                        'Departure' => [
                            'Place' => [
                                'Name' => '<string>',
                                'OriginalPosition' => [<float>, ...],
                                'Position' => [<float>, ...],
                                'SideOfStreet' => 'Left|Right',
                                'WaypointIndex' => <integer>,
                            ],
                            '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' => [
                                                'Max' => <integer>,
                                                'Min' => <integer>,
                                            ],
                                            'HazardousCargos' => ['<string>', ...],
                                            'MaxHeight' => <integer>,
                                            'MaxKpraLength' => <integer>,
                                            'MaxLength' => <integer>,
                                            'MaxPayloadCapacity' => <integer>,
                                            'MaxWeight' => [
                                                'Type' => 'Current|Gross|Unknown',
                                                'Value' => <integer>,
                                            ],
                                            'MaxWeightPerAxle' => <integer>,
                                            'MaxWeightPerAxleGroup' => [
                                                'Quad' => <integer>,
                                                'Quint' => <integer>,
                                                'Single' => <integer>,
                                                'Tandem' => <integer>,
                                                'Triple' => <integer>,
                                            ],
                                            'MaxWidth' => <integer>,
                                            'Occupancy' => [
                                                'Max' => <integer>,
                                                'Min' => <integer>,
                                            ],
                                            'RestrictedTimes' => '<string>',
                                            'TimeDependent' => true || false,
                                            'TrailerCount' => [
                                                'Max' => <integer>,
                                                'Min' => <integer>,
                                            ],
                                            'TravelMode' => true || false,
                                            'TruckRoadType' => '<string>',
                                            'TruckType' => 'LightTruck|StraightTruck|Tractor',
                                            'TunnelRestrictionCode' => '<string>',
                                        ],
                                    ],
                                    // ...
                                ],
                                'Impact' => 'High|Low',
                            ],
                            // ...
                        ],
                        'PassThroughWaypoints' => [
                            [
                                'GeometryOffset' => <integer>,
                                'Place' => [
                                    'OriginalPosition' => [<float>, ...],
                                    'Position' => [<float>, ...],
                                    'WaypointIndex' => <integer>,
                                ],
                            ],
                            // ...
                        ],
                        'Spans' => [
                            [
                                'BestCaseDuration' => <integer>,
                                'CarAccess' => ['<string>', ...],
                                'Country' => '<string>',
                                'Distance' => <integer>,
                                'Duration' => <integer>,
                                'DynamicSpeed' => [
                                    'BestCaseSpeed' => <float>,
                                    'TurnDuration' => <integer>,
                                    'TypicalSpeed' => <float>,
                                ],
                                'FunctionalClassification' => <integer>,
                                'Gate' => 'Emergency|KeyAccess|PermissionRequired',
                                'GeometryOffset' => <integer>,
                                'Incidents' => [<integer>, ...],
                                'Names' => [
                                    [
                                        'Language' => '<string>',
                                        'Value' => '<string>',
                                    ],
                                    // ...
                                ],
                                'Notices' => [<integer>, ...],
                                'RailwayCrossing' => 'Protected|Unprotected',
                                'Region' => '<string>',
                                'RoadAttributes' => ['<string>', ...],
                                'RouteNumbers' => [
                                    [
                                        'Direction' => 'East|North|South|West',
                                        'Language' => '<string>',
                                        'Value' => '<string>',
                                    ],
                                    // ...
                                ],
                                'ScooterAccess' => ['<string>', ...],
                                'SpeedLimit' => [
                                    'MaxSpeed' => <float>,
                                    'Unlimited' => true || false,
                                ],
                                'TollSystems' => [<integer>, ...],
                                'TruckAccess' => ['<string>', ...],
                                'TruckRoadTypes' => [<integer>, ...],
                                'TypicalDuration' => <integer>,
                                'Zones' => [<integer>, ...],
                            ],
                            // ...
                        ],
                        'Summary' => [
                            'Overview' => [
                                'BestCaseDuration' => <integer>,
                                'Distance' => <integer>,
                                'Duration' => <integer>,
                                'TypicalDuration' => <integer>,
                            ],
                            'TravelOnly' => [
                                'BestCaseDuration' => <integer>,
                                'Duration' => <integer>,
                                'TypicalDuration' => <integer>,
                            ],
                        ],
                        'TollSystems' => [
                            [
                                'Name' => '<string>',
                            ],
                            // ...
                        ],
                        'Tolls' => [
                            [
                                'Country' => '<string>',
                                'PaymentSites' => [
                                    [
                                        'Name' => '<string>',
                                        'Position' => [<float>, ...],
                                    ],
                                    // ...
                                ],
                                'Rates' => [
                                    [
                                        'ApplicableTimes' => '<string>',
                                        'ConvertedPrice' => [
                                            'Currency' => '<string>',
                                            'Estimate' => true || false,
                                            'PerDuration' => <integer>,
                                            'Range' => true || false,
                                            'RangeValue' => [
                                                'Max' => <float>,
                                                'Min' => <float>,
                                            ],
                                            'Value' => <float>,
                                        ],
                                        'Id' => '<string>',
                                        'LocalPrice' => [
                                            'Currency' => '<string>',
                                            'Estimate' => true || false,
                                            'PerDuration' => <integer>,
                                            'Range' => true || false,
                                            'RangeValue' => [
                                                'Max' => <float>,
                                                'Min' => <float>,
                                            ],
                                            'Value' => <float>,
                                        ],
                                        'Name' => '<string>',
                                        'Pass' => [
                                            'IncludesReturnTrip' => true || false,
                                            'SeniorPass' => true || false,
                                            'TransferCount' => <integer>,
                                            'TripCount' => <integer>,
                                            'ValidityPeriod' => [
                                                'Period' => 'Annual|Days|ExtendedAnnual|Minutes|Months',
                                                'PeriodCount' => <integer>,
                                            ],
                                        ],
                                        'PaymentMethods' => ['<string>', ...],
                                        'Transponders' => [
                                            [
                                                'SystemName' => '<string>',
                                            ],
                                            // ...
                                        ],
                                    ],
                                    // ...
                                ],
                                'Systems' => [<integer>, ...],
                            ],
                            // ...
                        ],
                        'TravelSteps' => [
                            [
                                'ContinueHighwayStepDetails' => [
                                    'Intersection' => [
                                        [
                                            'Language' => '<string>',
                                            'Value' => '<string>',
                                        ],
                                        // ...
                                    ],
                                    'SteeringDirection' => 'Left|Right|Straight',
                                    'TurnAngle' => <float>,
                                    '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' => <integer>,
                                'Duration' => <integer>,
                                'EnterHighwayStepDetails' => [
                                    'Intersection' => [
                                        [
                                            'Language' => '<string>',
                                            'Value' => '<string>',
                                        ],
                                        // ...
                                    ],
                                    'SteeringDirection' => 'Left|Right|Straight',
                                    'TurnAngle' => <float>,
                                    'TurnIntensity' => 'Sharp|Slight|Typical',
                                ],
                                'ExitNumber' => [
                                    [
                                        'Language' => '<string>',
                                        'Value' => '<string>',
                                    ],
                                    // ...
                                ],
                                'ExitStepDetails' => [
                                    'Intersection' => [
                                        [
                                            'Language' => '<string>',
                                            'Value' => '<string>',
                                        ],
                                        // ...
                                    ],
                                    'RelativeExit' => <integer>,
                                    'SteeringDirection' => 'Left|Right|Straight',
                                    'TurnAngle' => <float>,
                                    'TurnIntensity' => 'Sharp|Slight|Typical',
                                ],
                                'GeometryOffset' => <integer>,
                                'Instruction' => '<string>',
                                'KeepStepDetails' => [
                                    'Intersection' => [
                                        [
                                            'Language' => '<string>',
                                            'Value' => '<string>',
                                        ],
                                        // ...
                                    ],
                                    'SteeringDirection' => 'Left|Right|Straight',
                                    'TurnAngle' => <float>,
                                    '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' => <float>,
                                    'TurnIntensity' => 'Sharp|Slight|Typical',
                                ],
                                'RoundaboutEnterStepDetails' => [
                                    'Intersection' => [
                                        [
                                            'Language' => '<string>',
                                            'Value' => '<string>',
                                        ],
                                        // ...
                                    ],
                                    'SteeringDirection' => 'Left|Right|Straight',
                                    'TurnAngle' => <float>,
                                    'TurnIntensity' => 'Sharp|Slight|Typical',
                                ],
                                'RoundaboutExitStepDetails' => [
                                    'Intersection' => [
                                        [
                                            'Language' => '<string>',
                                            'Value' => '<string>',
                                        ],
                                        // ...
                                    ],
                                    'RelativeExit' => <integer>,
                                    'RoundaboutAngle' => <float>,
                                    'SteeringDirection' => 'Left|Right|Straight',
                                ],
                                'RoundaboutPassStepDetails' => [
                                    'Intersection' => [
                                        [
                                            'Language' => '<string>',
                                            'Value' => '<string>',
                                        ],
                                        // ...
                                    ],
                                    'SteeringDirection' => 'Left|Right|Straight',
                                    'TurnAngle' => <float>,
                                    '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' => <float>,
                                    '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' => <float>,
                                    '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' => <integer>,
                'Duration' => <integer>,
                'Tolls' => [
                    'Total' => [
                        'Currency' => '<string>',
                        'Estimate' => true || false,
                        'Range' => true || false,
                        'RangeValue' => [
                            'Max' => <float>,
                            'Min' => <float>,
                        ],
                        'Value' => <float>,
                    ],
                ],
            ],
        ],
        // ...
    ],
]

Result Details

Members
LegGeometryFormat
Required: Yes
Type: string

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

Notices
Required: Yes
Type: Array of RouteResponseNotice structures

Notices are additional information returned that indicate issues that occurred during route calculation. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

PricingBucket
Required: Yes
Type: string

The pricing bucket for which the query is charged at.

Routes
Required: Yes
Type: Array of Route structures

The path from the origin to the destination.

Errors

InternalServerException:

The request processing has failed because of an unknown error, exception or failure.

AccessDeniedException:

You don't have sufficient access to perform this action.

ValidationException:

The input fails to satisfy the constraints specified by an AWS service.

ThrottlingException:

The request was denied due to request throttling.

OptimizeWaypoints

$result = $client->optimizeWaypoints([/* ... */]);
$promise = $client->optimizeWaypointsAsync([/* ... */]);

OptimizeWaypoints 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.

For more information, see Optimize waypoints in the Amazon Location Service Developer Guide.

Parameter Syntax

$result = $client->optimizeWaypoints([
    'Avoid' => [
        'Areas' => [
            [
                'Geometry' => [ // REQUIRED
                    'BoundingBox' => [<float>, ...],
                ],
            ],
            // ...
        ],
        'CarShuttleTrains' => true || false,
        'ControlledAccessHighways' => true || false,
        'DirtRoads' => true || false,
        'Ferries' => true || false,
        'TollRoads' => true || false,
        'Tunnels' => true || false,
        'UTurns' => true || false,
    ],
    'Clustering' => [
        'Algorithm' => 'DrivingDistance|TopologySegment', // REQUIRED
        'DrivingDistanceOptions' => [
            'DrivingDistance' => <integer>, // REQUIRED
        ],
    ],
    'DepartureTime' => '<string>',
    'Destination' => [<float>, ...],
    'DestinationOptions' => [
        'AccessHours' => [
            'From' => [ // REQUIRED
                'DayOfWeek' => 'Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday', // REQUIRED
                'TimeOfDay' => '<string>', // REQUIRED
            ],
            'To' => [ // REQUIRED
                'DayOfWeek' => 'Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday', // REQUIRED
                'TimeOfDay' => '<string>', // REQUIRED
            ],
        ],
        'AppointmentTime' => '<string>',
        'Heading' => <float>,
        'Id' => '<string>',
        'ServiceDuration' => <integer>,
        'SideOfStreet' => [
            'Position' => [<float>, ...], // REQUIRED
            'UseWith' => 'AnyStreet|DividedStreetOnly',
        ],
    ],
    'Driver' => [
        'RestCycles' => [
            'LongCycle' => [ // REQUIRED
                'RestDuration' => <integer>, // REQUIRED
                'WorkDuration' => <integer>, // REQUIRED
            ],
            'ShortCycle' => [ // REQUIRED
                'RestDuration' => <integer>, // REQUIRED
                'WorkDuration' => <integer>, // REQUIRED
            ],
        ],
        'RestProfile' => [
            'Profile' => '<string>', // REQUIRED
        ],
        'TreatServiceTimeAs' => 'Rest|Work',
    ],
    'Exclude' => [
        'Countries' => ['<string>', ...], // REQUIRED
    ],
    'Key' => '<string>',
    'OptimizeSequencingFor' => 'FastestRoute|ShortestRoute',
    'Origin' => [<float>, ...], // REQUIRED
    'OriginOptions' => [
        'Id' => '<string>',
    ],
    'Traffic' => [
        'Usage' => 'IgnoreTrafficData|UseTrafficData',
    ],
    'TravelMode' => 'Car|Pedestrian|Scooter|Truck',
    'TravelModeOptions' => [
        'Pedestrian' => [
            'Speed' => <float>,
        ],
        'Truck' => [
            'GrossWeight' => <integer>,
            'HazardousCargos' => ['<string>', ...],
            'Height' => <integer>,
            'Length' => <integer>,
            'Trailer' => [
                'TrailerCount' => <integer>,
            ],
            'TruckType' => 'StraightTruck|Tractor',
            'TunnelRestrictionCode' => '<string>',
            'WeightPerAxle' => <integer>,
            'Width' => <integer>,
        ],
    ],
    'Waypoints' => [
        [
            'AccessHours' => [
                'From' => [ // REQUIRED
                    'DayOfWeek' => 'Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday', // REQUIRED
                    'TimeOfDay' => '<string>', // REQUIRED
                ],
                'To' => [ // REQUIRED
                    'DayOfWeek' => 'Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday', // REQUIRED
                    'TimeOfDay' => '<string>', // REQUIRED
                ],
            ],
            'AppointmentTime' => '<string>',
            'Before' => [<integer>, ...],
            'Heading' => <float>,
            'Id' => '<string>',
            'Position' => [<float>, ...], // REQUIRED
            'ServiceDuration' => <integer>,
            'SideOfStreet' => [
                'Position' => [<float>, ...], // REQUIRED
                'UseWith' => 'AnyStreet|DividedStreetOnly',
            ],
        ],
        // ...
    ],
]);

Parameter Details

Members
Avoid

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

Clustering

Clustering allows you to specify how nearby waypoints can be clustered to improve the optimized sequence.

DepartureTime
Type: string

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

Destination
Type: Array of doubles

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

DestinationOptions

Destination related options.

Driver

Driver related options.

Exclude

Features to be strictly excluded while calculating the route.

Key
Type: string

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

OptimizeSequencingFor
Type: string

Specifies the optimization criteria for the calculated sequence.

Default value: FastestRoute.

Origin
Required: Yes
Type: Array of doubles

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

OriginOptions

Origin related options.

Traffic

Traffic-related options.

TravelMode
Type: string

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

Default value: Car

TravelModeOptions

Travel mode related options for the provided travel mode.

Waypoints
Type: Array of WaypointOptimizationWaypoint structures

List of waypoints between the Origin and Destination.

Result Syntax

[
    'Connections' => [
        [
            'Distance' => <integer>,
            'From' => '<string>',
            'RestDuration' => <integer>,
            'To' => '<string>',
            'TravelDuration' => <integer>,
            'WaitDuration' => <integer>,
        ],
        // ...
    ],
    'Distance' => <integer>,
    'Duration' => <integer>,
    'ImpedingWaypoints' => [
        [
            'FailedConstraints' => [
                [
                    'Constraint' => 'AccessHours|AppointmentTime|Before|Heading|ServiceDuration|SideOfStreet',
                    'Reason' => '<string>',
                ],
                // ...
            ],
            'Id' => '<string>',
            'Position' => [<float>, ...],
        ],
        // ...
    ],
    'OptimizedWaypoints' => [
        [
            'ArrivalTime' => '<string>',
            'ClusterIndex' => <integer>,
            'DepartureTime' => '<string>',
            'Id' => '<string>',
            'Position' => [<float>, ...],
        ],
        // ...
    ],
    'PricingBucket' => '<string>',
    'TimeBreakdown' => [
        'RestDuration' => <integer>,
        'ServiceDuration' => <integer>,
        'TravelDuration' => <integer>,
        'WaitDuration' => <integer>,
    ],
]

Result Details

Members
Connections
Required: Yes
Type: Array of WaypointOptimizationConnection structures

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

Distance
Required: Yes
Type: long (int|float)

Overall distance to travel the whole sequence.

Duration
Required: Yes
Type: long (int|float)

Overall duration to travel the whole sequence.

Unit: seconds

ImpedingWaypoints
Required: Yes
Type: Array of WaypointOptimizationImpedingWaypoint structures

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

OptimizedWaypoints
Required: Yes
Type: Array of WaypointOptimizationOptimizedWaypoint structures

Waypoints in the order of the optimized sequence.

PricingBucket
Required: Yes
Type: string

The pricing bucket for which the query is charged at.

TimeBreakdown
Required: Yes
Type: WaypointOptimizationTimeBreakdown structure

Time breakdown for the sequence.

Errors

InternalServerException:

The request processing has failed because of an unknown error, exception or failure.

AccessDeniedException:

You don't have sufficient access to perform this action.

ValidationException:

The input fails to satisfy the constraints specified by an AWS service.

ThrottlingException:

The request was denied due to request throttling.

SnapToRoads

$result = $client->snapToRoads([/* ... */]);
$promise = $client->snapToRoadsAsync([/* ... */]);

SnapToRoads matches GPS trace to roads most likely traveled on.

For more information, see Snap to Roads in the Amazon Location Service Developer Guide.

Parameter Syntax

$result = $client->snapToRoads([
    'Key' => '<string>',
    'SnapRadius' => <integer>,
    'SnappedGeometryFormat' => 'FlexiblePolyline|Simple',
    'TracePoints' => [ // REQUIRED
        [
            'Heading' => <float>,
            'Position' => [<float>, ...], // REQUIRED
            'Speed' => <float>,
            'Timestamp' => '<string>',
        ],
        // ...
    ],
    'TravelMode' => 'Car|Pedestrian|Scooter|Truck',
    'TravelModeOptions' => [
        'Truck' => [
            'GrossWeight' => <integer>,
            'HazardousCargos' => ['<string>', ...],
            'Height' => <integer>,
            'Length' => <integer>,
            'Trailer' => [
                'TrailerCount' => <integer>,
            ],
            'TunnelRestrictionCode' => '<string>',
            'Width' => <integer>,
        ],
    ],
]);

Parameter Details

Members
Key
Type: string

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

SnapRadius
Type: long (int|float)

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

Unit: meters

Default value: 300

SnappedGeometryFormat
Type: string

Chooses what the returned SnappedGeometry format should be.

Default value: FlexiblePolyline

TracePoints
Required: Yes
Type: Array of RoadSnapTracePoint structures

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

TravelMode
Type: string

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

Default value: Car

TravelModeOptions
Type: RoadSnapTravelModeOptions structure

Travel mode related options for the provided travel mode.

Result Syntax

[
    'Notices' => [
        [
            'Code' => 'TracePointsHeadingIgnored|TracePointsIgnored|TracePointsMovedByLargeDistance|TracePointsNotMatched|TracePointsOutOfSequence|TracePointsSpeedEstimated|TracePointsSpeedIgnored',
            'Title' => '<string>',
            'TracePointIndexes' => [<integer>, ...],
        ],
        // ...
    ],
    'PricingBucket' => '<string>',
    'SnappedGeometry' => [
        'LineString' => [
            [<float>, ...],
            // ...
        ],
        'Polyline' => '<string>',
    ],
    'SnappedGeometryFormat' => 'FlexiblePolyline|Simple',
    'SnappedTracePoints' => [
        [
            'Confidence' => <float>,
            'OriginalPosition' => [<float>, ...],
            'SnappedPosition' => [<float>, ...],
        ],
        // ...
    ],
]

Result Details

Members
Notices
Required: Yes
Type: Array of RoadSnapNotice structures

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

PricingBucket
Required: Yes
Type: string

The pricing bucket for which the query is charged at.

SnappedGeometry
Type: RoadSnapSnappedGeometry structure

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

SnappedGeometryFormat
Required: Yes
Type: string

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

SnappedTracePoints
Required: Yes
Type: Array of RoadSnapSnappedTracePoint structures

The trace points snapped onto the road network.

Errors

InternalServerException:

The request processing has failed because of an unknown error, exception or failure.

AccessDeniedException:

You don't have sufficient access to perform this action.

ValidationException:

The input fails to satisfy the constraints specified by an AWS service.

ThrottlingException:

The request was denied due to request throttling.

Shapes

AccessDeniedException

Description

You don't have sufficient access to perform this action.

Members
Message
Required: Yes
Type: string

Circle

Description

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.

Members
Center
Required: Yes
Type: Array of doubles

Center of the Circle in World Geodetic System (WGS 84) format: [longitude, latitude].

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

Radius
Required: Yes
Type: double

Radius of the Circle.

Unit: meters

Corridor

Description

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

Members
LineString
Required: Yes
Type: Array of floatss

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

LineString and Polyline are mutually exclusive properties.

Radius
Required: Yes
Type: int

Radius that defines the width of the corridor.

InternalServerException

Description

The request processing has failed because of an unknown error, exception or failure.

Members
Message
Required: Yes
Type: string

Isoline

Description

Represents a single reachable area calculated for a specific threshold.

Members
Connections
Required: Yes
Type: Array of IsolineConnection structures

Lines connecting separate parts of the reachable area that can be reached within the same threshold. These occur when areas are reachable but not contiguous, such as when separated by water or unroutable areas. When present, these lines represent actual transportation network segments (such as ferry routes or bridges) that connect the separated areas.

DistanceThreshold
Type: long (int|float)

The travel distance in meters used to calculate this isoline, if distance-based thresholds were specified in the request.

Geometries
Required: Yes
Type: Array of IsolineShapeGeometry structures

The shapes that define the reachable area, provided in the requested geometry format.

TimeThreshold
Type: long (int|float)

The travel time in seconds used to calculate this isoline, if time-based thresholds were specified in the request.

IsolineAllowOptions

Description

Special road types or features that should be considered available for routing. For example, this attribute can be used to allow the use of HOV (high-occupancy vehicle) or HOT (high-occupancy toll) lanes, even if they would otherwise not be.

Members
Hot
Type: boolean

When true, allows the use of HOT (high-occupancy toll) lanes, which may affect travel times and reachable areas.

Default value: false

Hov
Type: boolean

When true, allows the use of HOV (high-occupancy vehicle) lanes, which may affect travel times and reachable areas.

Default value: false

IsolineAvoidanceArea

Description

Defines an area to avoid when calculating routes. Consists of a primary geometry to avoid, with the ability to specify exception areas within that geometry where travel is permitted.

Members
Except
Type: Array of IsolineAvoidanceAreaGeometry structures

Areas within the primary avoidance geometry where travel is allowed. For example, you might want to avoid a neighborhood but allow travel on a major road that passes through it.

Geometry
Required: Yes
Type: IsolineAvoidanceAreaGeometry structure

The primary area to avoid, specified using a bounding box, corridor, polygon, or polyline corridor.

IsolineAvoidanceAreaGeometry

Description

Defines an area to avoid during calculations using one of several supported geometry types. The service will prefer routes that avoid these areas when possible.

Members
BoundingBox
Type: Array of doubles

A rectangular area defined by its southwest and northeast corners: [min longitude, min latitude, max longitude, max latitude].

Corridor
Type: Corridor structure

A buffer zone around a line, defined by a series of coordinates and a radius in meters.

Polygon
Type: Array of lists

A polygon defined by a list of coordinate rings. The first ring defines the outer boundary; subsequent rings will be ignored.

PolylineCorridor
Type: PolylineCorridor structure

A buffer zone around a compressed polyline, defined by an encoded polyline string and a radius in meters. For more information on polyline encoding, see https://github.com/aws-geospatial/polyline.

PolylinePolygon
Type: Array of strings

A polygon defined by encoded polyline strings. The first string defines the outer boundary; subsequent strings will be ignored. For more information on polyline encoding, see https://github.com/aws-geospatial/polyline.

IsolineAvoidanceOptions

Description

Specifies features of the road network to avoid when calculating reachable areas. These preferences guide route calculations but may be overridden when no reasonable alternative exists. For example, if avoiding toll roads would make an area unreachable, toll roads may still be used.

Avoidance options include physical features (like ferries and tunnels), road characteristics (like dirt roads and highways), and regulated areas (like congestion zones). They can be combined to match specific routing needs, such as avoiding both toll roads and ferries.

Members
Areas
Type: Array of IsolineAvoidanceArea structures

Specifies geographic areas to avoid where possible. Routes may still pass through these areas if no reasonable alternative exists.

CarShuttleTrains
Type: boolean

Indicates a preference to avoid car shuttle trains (auto trains) where possible. These may still be included if no reasonable alternative route exists.

ControlledAccessHighways
Type: boolean

Indicates a preference to avoid controlled-access highways (such as interstate highways or motorways) where possible. If a viable route cannot be calculated using only local roads, controlled-access highways may still be included.

DirtRoads
Type: boolean

Indicates a preference to avoid unpaved or dirt roads where possible. Routes may still include dirt roads if no reasonable paved alternative exists.

Ferries
Type: boolean

Indicates a preference to avoid ferries where possible. If a viable route cannot be calculated without using ferries, they may still be included.

SeasonalClosure
Type: boolean

Indicates a preference to avoid roads that may be subject to seasonal closures where possible. These roads may still be included if no reasonable year-round alternative exists.

TollRoads
Type: boolean

Indicates a preference to avoid toll roads where possible. If a viable route cannot be calculated without using toll roads, they may still be included.

TollTransponders
Type: boolean

Indicates a preference to avoid roads that require electronic toll collection transponders where possible. These roads may still be included if no viable alternative route exists.

TruckRoadTypes
Type: Array of strings

For truck travel modes, indicates specific road classification types in Sweden ( BK1 through BK4) and Mexico (A2, A4, B2, B4, C, D, ET2, ET4) to avoid where possible. These road types may still be used if no reasonable alternative exists.

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

Tunnels
Type: boolean

Indicates a preference to avoid tunnels where possible. If a viable route cannot be calculated without using tunnels, they may still be included.

UTurns
Type: boolean

Indicates a preference to avoid U-turns where possible. U-turns may still be included if necessary to reach certain areas or when no reasonable alternative exists.

ZoneCategories
Type: Array of IsolineAvoidanceZoneCategory structures

Indicates types of regulated zones (such as congestion pricing or environmental zones) to avoid where possible. Routes may still pass through these zones if no reasonable alternative exists.

IsolineAvoidanceZoneCategory

Description

Types of regulated zones that may affect routing.

Members
Category
Type: string

The type of regulated zone: CongestionPricing for toll zones based on traffic levels, Environmental for low-emission zones, or Vignette for areas requiring special permits or stickers.

IsolineCarOptions

Description

Vehicle characteristics and preferences that affect routing for passenger cars. This includes vehicle type, occupancy, and speed restrictions that may influence which roads can be used and expected travel times.

Members
EngineType
Type: string

The type of engine powering the vehicle, which may affect route calculation due to road restrictions or vehicle characteristics.

  • INTERNAL_COMBUSTION—Standard gasoline or diesel engine.

  • ELECTRIC—Battery electric vehicle.

  • PLUGIN_HYBRID—Combination of electric and internal combustion engines with plug-in charging capability.

LicensePlate
Type: IsolineVehicleLicensePlate structure

License plate information used in regions where road access or routing restrictions are based on license plate numbers.

MaxSpeed
Type: double

The maximum speed of the vehicle in kilometers per hour. When specified, routes will not include roads with higher speed limits. Valid values range from 3.6 km/h (1 m/s) to 252 km/h (70 m/s).

Unit: kilometers per hour

Occupancy
Type: int

The number of occupants in the vehicle. This can affect route calculations by enabling the use of high-occupancy vehicle (HOV) lanes where minimum occupancy requirements are met.

Default value: 1

IsolineConnection

Description

Represents a segment of the transportation network that connects separate parts of a reachable area. These connections show how discontinuous areas are linked, such as by ferry routes or bridges crossing unroutable terrain.

Members
FromPolygonIndex
Required: Yes
Type: int

The index of the starting polygon in the isoline's Geometries list.

Geometry
Required: Yes
Type: IsolineConnectionGeometry structure

The shape of the connection, representing the actual path through the transportation network that links the polygons.

ToPolygonIndex
Required: Yes
Type: int

The index of the ending polygon in the isoline's Geometries list.

IsolineConnectionGeometry

Description

Represents the geometry of connections between non-contiguous parts of an isoline. These connections can be provided in either coordinate pairs (LineString) or encoded (Polyline) format, matching the format specified in the request.

Members
LineString
Type: Array of floatss

A series of [longitude, latitude] coordinate pairs defining the connection path when Simple geometry format is requested. These coordinates can be directly used as the coordinates array in a GeoJSON LineString without transformation.

LineString and Polyline are mutually exclusive properties.

Polyline
Type: string

An encoded representation of the connection path when FlexiblePolyline geometry format is requested. This provides a more compact representation suitable for transmission and storage. To convert to GeoJSON, first decode to obtain coordinate pairs, then use those coordinates as the coordinates array in a GeoJSON LineString.

LineString and Polyline are mutually exclusive properties.

IsolineDestinationOptions

Description

Options that control how the destination point is interpreted and matched to the road network when calculating reachable areas. This affects which roads are considered accessible near the destination and how the final approach is calculated.

Members
AvoidActionsForDistance
Type: long (int|float)

The distance in meters from the destination point within which certain routing actions (such as U-turns or left turns across traffic) are restricted. This helps generate more practical routes by avoiding potentially dangerous maneuvers near the endpoint.

Heading
Type: double

The initial direction of travel in degrees (0-360, where 0 is north). This can affect which road segments are considered accessible from the starting point.

Matching
Type: IsolineMatchingOptions structure

Controls how the destination point is matched to the road network, including search radius and name-based matching preferences.

SideOfStreet
Type: IsolineSideOfStreetOptions structure

Specifies which side of the street should be considered accessible, which is important when building entrances or parking access points are only reachable from one side of the road.

IsolineGranularityOptions

Description

Controls the detail level and smoothness of generated isolines. More detailed isolines provide better visual representation of reachable areas but require more processing time and result in larger responses.

Members
MaxPoints
Type: int

The maximum number of points used to define each isoline. Higher values create smoother, more detailed shapes.

MaxResolution
Type: long (int|float)

The maximum distance in meters between points along the isoline. Smaller values create more detailed shapes.

Unit: meters

IsolineMatchingOptions

Description

Controls how origin and destination points are matched to the road network when they don't fall exactly on a road. Matching options help ensure realistic routing by connecting points to appropriate roads.

Members
NameHint
Type: string

The expected street name near the point. Helps disambiguate matching when multiple roads are within range.

OnRoadThreshold
Type: long (int|float)

The maximum distance in meters that a point can be from a road while still being considered "on" that road. Points further than this distance require explicit matching.

Unit: meters

Radius
Type: long (int|float)

The maximum distance in meters to search for roads to match to. Points with no roads within this radius will fail to match. The roads that are considered within this radius are determined by the specified Strategy

Unit: meters

Strategy
Type: string

Determines how points are matched to the road network. MatchAny finds the nearest viable road segment, while MatchMostSignificantRoad prioritizes major roads.

IsolineOriginOptions

Description

Options that control how the origin point is interpreted when calculating reachable areas. These options affect which roads are considered accessible from the starting point and how initial routing decisions are made.

Members
AvoidActionsForDistance
Type: long (int|float)

The distance in meters from the origin point within which certain routing actions (such as U-turns or left turns across traffic) are restricted. This helps generate more practical routes by avoiding potentially dangerous maneuvers near the starting point.

Heading
Type: double

Initial direction of travel in degrees (0-360, where 0 is north). This affects which road segments are considered accessible from the starting point and is particularly useful when the origin is on a divided road or at a complex intersection.

Matching
Type: IsolineMatchingOptions structure

Controls how the origin point is matched to the road network, including search radius and matching strategy.

SideOfStreet
Type: IsolineSideOfStreetOptions structure

Controls which side of the street is considered accessible from the origin point, particularly important for divided roads where building entrances or parking access may only be available from one direction.

IsolineScooterOptions

Description

Vehicle characteristics that affect which roads and paths can be used when calculating reachable areas for scooters. This includes areas such as bike lanes, shared paths, and roads where scooters are permitted.

Members
EngineType
Type: string

The type of engine powering the vehicle, which may affect route calculation due to road restrictions or vehicle characteristics.

  • INTERNAL_COMBUSTION—Standard gasoline or diesel engine.

  • ELECTRIC—Battery electric vehicle.

  • PLUGIN_HYBRID—Combination of electric and internal combustion engines with plug-in charging capability.

LicensePlate
Type: IsolineVehicleLicensePlate structure

License plate information used in regions where road access or routing restrictions are based on license plate numbers.

MaxSpeed
Type: double

The maximum speed of the vehicle in kilometers per hour. When specified, routes will not include roads with higher speed limits. Valid values range from 3.6 km/h (1 m/s) to 252 km/h (70 m/s).

Unit: kilometers per hour

Occupancy
Type: int

The number of occupants in the vehicle. This can affect route calculations by enabling the use of high-occupancy vehicle (HOV) lanes where minimum occupancy requirements are met.

Default value: 1

IsolineShapeGeometry

Description

Represents the shape of a reachable area. The geometry can be provided either as coordinate pairs (Polygon) or in encoded format (PolylinePolygon), matching the format specified in the request.

Members
Polygon
Type: Array of lists

A series of coordinate rings defining the reachable area when Simple geometry format is requested. Each ring is a list of [longitude, latitude] coordinate pairs. The first ring defines the outer boundary; subsequent rings define holes representing unreachable areas.

Polygon and PolylinePolygon are mutually exclusive properties.

PolylinePolygon
Type: Array of strings

An encoded representation of the reachable area when FlexiblePolyline geometry format is requested. Provides a compact representation suitable for transmission and storage. The first string defines the outer boundary; subsequent strings define holes representing unreachable areas. For more information on polyline encoding, see https://github.com/aws-geospatial/polyline.

Polygon and PolylinePolygon are mutually exclusive properties.

IsolineSideOfStreetOptions

Description

Controls how points are matched to specific sides of streets. This is important when the side of the street matters for accessibility - for example, when building entrances or parking lot access points can only be reached from one side of a divided road.

Members
Position
Required: Yes
Type: Array of doubles

The [longitude, latitude] coordinates of the point that should be matched to a specific side of the street.

UseWith
Type: string

Controls whether side-of-street matching is applied to any street (AnyStreet) or only to divided roads (DividedStreetOnly). This is important when the exact side of the street matters - for example, if a building entrance is only accessible from one side of a divided highway, or if a parking lot can only be entered from northbound lanes. Without correct side-of-street matching, travel time estimates may be inaccurate because they don't account for necessary U-turns or detours to reach the correct side.

Default value: DividedStreetOnly

IsolineThresholds

Description

Specifies the time or distance limits used to calculate reachable areas. You can provide up to five thresholds for a single type to generate multiple isolines in a single request. For example, you might request areas reachable within 5, 10, and 15 minutes, or within 1, 2, and 5 kilometers.

Members
Distance
Type: Array of long (int|float)s

List of travel distances in meters. For example, [1000, 2000, 5000] would calculate areas reachable within 1, 2, and 5 kilometers.

Time
Type: Array of long (int|float)s

List of travel times in seconds. For example, [300, 600, 900] would calculate areas reachable within 5, 10, and 15 minutes.

IsolineTrafficOptions

Description

Controls how real-time and historical traffic data is used when calculating reachable areas. This affects both the size and shape of isolines by accounting for expected travel speeds based on congestion patterns.

Members
FlowEventThresholdOverride
Type: long (int|float)

The duration in seconds that real-time congestion data is considered valid before reverting to historical traffic patterns. This helps balance between using current conditions and more predictable historical data when calculating travel times.

Unit: seconds

Usage
Type: string

Controls whether traffic data is used in calculations. UseTrafficData considers both real-time congestion and historical patterns, while IgnoreTrafficData calculates routes based solely on road types and speed limits. Using traffic data provides more accurate real-world estimates but may produce different results at different times of day.

Default value: UseTrafficData

IsolineTrailerOptions

Description

Additional specifications when the vehicle includes one or more trailers.

Members
AxleCount
Type: int

The total number of axles across all trailers. Used for weight distribution calculations and road restrictions.

TrailerCount
Type: int

The number of trailers being pulled. Affects which roads can be used based on local regulations.

Default value: 0

IsolineTravelModeOptions

Description

Mode-specific routing options that further refine how reachable areas are calculated. Options are only considered when they match the selected travel mode.

Members
Car
Type: IsolineCarOptions structure

Options specific to passenger vehicle routing (Car, such as vehicle characteristics and license plate restrictions.

Scooter
Type: IsolineScooterOptions structure

Options specific to scooter routing (Scooter, such as vehicle characteristics and license plate restrictions.

When using the Scooter travel mode, controlled-access highways are automatically avoided unless explicitly allowed.

Truck
Type: IsolineTruckOptions structure

Options specific to commercial truck routing (Truck, including vehicle dimensions, weight limits, and hazardous cargo specifications.

IsolineTruckOptions

Description

Vehicle characteristics and restrictions that affect which roads can be used when calculating reachable areas for trucks. These details ensure that routes respect physical limitations and legal requirements.

These apply when the provided travel mode is Truck

Members
AxleCount
Type: int

The total number of axles on the vehicle. Required for certain road restrictions and weight limit calculations.

EngineType
Type: string

The type of engine powering the vehicle, which may affect route calculation due to road restrictions or vehicle characteristics.

  • INTERNAL_COMBUSTION—Standard gasoline or diesel engine.

  • ELECTRIC—Battery electric vehicle.

  • PLUGIN_HYBRID—Combination of electric and internal combustion engines with plug-in charging capability.

GrossWeight
Type: long (int|float)

The gross vehicle weight (the maximum weight a vehicle can safely operate at, as specified by the manufacturer) in kilograms. Used to avoid roads with weight restrictions and ensure compliance with maximum allowed vehicle weight regulations.

Unit: kilograms

HazardousCargos
Type: Array of strings

Types of hazardous materials being transported. This affects which roads and tunnels can be used based on local regulations.

  • Combustible—Materials that can burn readily

  • Corrosive—Materials that can destroy or irreversibly damage other substances

  • Explosive—Materials that can produce an explosion by chemical reaction

  • Flammable—Materials that can easily ignite

  • Gas—Hazardous materials in gaseous form

  • HarmfulToWater—Materials that pose a risk to water sources if released

  • Organic—Hazardous organic compounds

  • Other—Hazardous materials not covered by other categories

  • Poison—Toxic materials

  • PoisonousInhalation—Materials that are toxic when inhaled

  • Radioactive—Materials that emit ionizing radiation

Height
Type: long (int|float)

The vehicle height in centimeters. Used to avoid routes with low bridges or other height restrictions.

Unit: centimeters

HeightAboveFirstAxle
Type: long (int|float)

The height in centimeters measured from the ground to the highest point above the first axle. Used for specific bridge and tunnel clearance restrictions.

Unit: centimeters

KpraLength
Type: long (int|float)

The kingpin to rear axle (KPRA) length in centimeters. Used to determine if the vehicle can safely navigate turns and intersections.

Unit: centimeters

Length
Type: long (int|float)

The total vehicle length in centimeters. Used to avoid roads with length restrictions and determine if the vehicle can safely navigate turns.

Unit: centimeters

LicensePlate
Type: IsolineVehicleLicensePlate structure

License plate information used in regions where road access or routing restrictions are based on license plate numbers.

MaxSpeed
Type: double

The maximum speed in kilometers per hour at which the vehicle can or is permitted to travel. This affects travel time calculations and may result in different reachable areas compared to using default speed limits. Value must be between 3.6 and 252 kilometers per hour.

Unit: kilometers per hour

Occupancy
Type: int

The number of occupants in the vehicle. This can affect route calculations by enabling the use of high-occupancy vehicle (HOV) lanes where minimum occupancy requirements are met.

Default value: 1

PayloadCapacity
Type: long (int|float)

The maximum cargo weight in kilograms that the vehicle (including attached trailers) is rated to carry.

Unit: kilograms

TireCount
Type: int

The total number of tires on the vehicle.

Trailer
Type: IsolineTrailerOptions structure

Optional specifications for attached trailers. When provided, trailer characteristics affect route calculations to ensure compliance with trailer-specific restrictions such as length limits, weight distribution requirements, and access restrictions for multi-trailer configurations.

TruckType
Type: string

The type of truck: LightTruck for smaller delivery vehicles, StraightTruck for rigid body trucks, or Tractor for tractor-trailer combinations.

TunnelRestrictionCode
Type: 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
Type: long (int|float)

The heaviest weight per axle in kilograms, regardless of axle type or grouping. Used for roads with axle-weight restrictions in regions where regulations don't distinguish between different axle configurations.

Unit: kilograms

WeightPerAxleGroup
Type: WeightPerAxleGroup structure

Specifies the total weight for different axle group configurations. Used in regions where regulations set different weight limits based on axle group types.

Unit: kilograms

Width
Type: long (int|float)

The vehicle width in centimeters. Used to avoid routes with width restrictions.

Unit: centimeters

IsolineVehicleLicensePlate

Description

License plate information used in regions where road access or routing restrictions are based on license plate numbers.

Members
LastCharacter
Type: string

The last character of the vehicle's license plate. Used to determine road access restrictions in regions with license plate-based traffic management systems.

LocalizedString

Description

The localized string.

Members
Language
Type: 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
Required: Yes
Type: string

The value of the localized string.

PolylineCorridor

Description

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

Members
Polyline
Required: Yes
Type: string

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

LineString and Polyline are mutually exclusive properties.

Radius
Required: Yes
Type: int

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

RoadSnapNotice

Description

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

Members
Code
Required: Yes
Type: string

Code corresponding to the issue.

Title
Required: Yes
Type: string

The notice title.

TracePointIndexes
Required: Yes
Type: Array of ints

TracePoint indices for which the provided notice code corresponds to.

RoadSnapSnappedGeometry

Description

Interpolated geometry for the snapped route that is overlay-able onto a map.

Members
LineString
Type: Array of floatss

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

LineString and Polyline are mutually exclusive properties.

Polyline
Type: string

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

LineString and Polyline are mutually exclusive properties.

RoadSnapSnappedTracePoint

Description

TracePoints snapped onto the road network.

Members
Confidence
Required: Yes
Type: double

Confidence value for the correctness of this point match.

OriginalPosition
Required: Yes
Type: Array of doubles

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

SnappedPosition
Required: Yes
Type: Array of doubles

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

RoadSnapTracePoint

Description

TracePoint indices for which the provided notice code corresponds to.

Members
Heading
Type: double

GPS Heading at the position.

Position
Required: Yes
Type: Array of doubles

Position in World Geodetic System (WGS 84) format: [longitude, latitude].

Speed
Type: double

Speed at the specified trace point .

Unit: kilometers per hour

Timestamp
Type: string

Timestamp of the event.

RoadSnapTrailerOptions

Description

Trailer options corresponding to the vehicle.

Members
TrailerCount
Type: int

Number of trailers attached to the vehicle.

Default value: 0

RoadSnapTravelModeOptions

Description

Travel mode related options for the provided travel mode.

Members
Truck
Type: RoadSnapTruckOptions structure

Travel mode options when the provided travel mode is Truck.

RoadSnapTruckOptions

Description

Travel mode options when the provided travel mode is Truck.

Members
GrossWeight
Type: long (int|float)

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

Unit: kilograms

HazardousCargos
Type: Array of strings

List of Hazardous cargos contained in the vehicle.

Height
Type: long (int|float)

Height of the vehicle.

Unit: centimeters

Length
Type: long (int|float)

Length of the vehicle.

Unit: centimeters

Trailer
Type: RoadSnapTrailerOptions structure

Trailer options corresponding to the vehicle.

TunnelRestrictionCode
Type: 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
Type: long (int|float)

Width of the vehicle in centimeters.

Route

Description

The route.

Members
Legs
Required: Yes
Type: Array of RouteLeg structures

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.

MajorRoadLabels
Required: Yes
Type: Array of RouteMajorRoadLabel structures

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

Summary
Type: RouteSummary structure

Summarized details of the leg.

RouteAllowOptions

Description

Features that are allowed while calculating a route.

Members
Hot
Type: boolean

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

Default value: false

Hov
Type: boolean

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

Default value: false

RouteAvoidanceArea

Description

Areas to be avoided.

Members
Except
Type: Array of RouteAvoidanceAreaGeometry structures

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

Geometry
Required: Yes
Type: RouteAvoidanceAreaGeometry structure

Geometry of the area to be avoided.

RouteAvoidanceAreaGeometry

Description

Geometry of the area to be avoided.

Members
BoundingBox
Type: Array of doubles

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.

Corridor
Type: Corridor structure

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

Polygon
Type: Array of lists

Geometry defined as a polygon with only one linear ring.

PolylineCorridor
Type: PolylineCorridor structure

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

PolylinePolygon
Type: Array of strings

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/aws-geospatial/polyline.

RouteAvoidanceOptions

Description

Specifies options for areas to avoid when calculating the route. This is a best-effort avoidance setting, meaning the router will try to honor the avoidance preferences but may still include restricted areas if no feasible alternative route exists. If avoidance options are not followed, the response will indicate that the avoidance criteria were violated.

Members
Areas
Type: Array of RouteAvoidanceArea structures

Areas to be avoided. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

CarShuttleTrains
Type: boolean

Avoid car-shuttle-trains while calculating the route. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

ControlledAccessHighways
Type: boolean

Avoid controlled access highways while calculating the route.

DirtRoads
Type: boolean

Avoid dirt roads while calculating the route. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

Ferries
Type: boolean

Avoid ferries while calculating the route.

SeasonalClosure
Type: boolean

Avoid roads that have seasonal closure while calculating the route. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

TollRoads
Type: boolean

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

TollTransponders
Type: boolean

Avoids roads where the specified toll transponders are the only mode of payment. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

TruckRoadTypes
Type: Array of strings

Truck road type identifiers. BK1 through BK4 apply only to Sweden. A2,A4,B2,B4,C,D,ET2,ET4 apply only to Mexico. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

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

Tunnels
Type: boolean

Avoid tunnels while calculating the route. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

UTurns
Type: boolean

Avoid U-turns for calculation on highways and motorways. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

ZoneCategories
Type: Array of RouteAvoidanceZoneCategory structures

Zone categories to be avoided. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

RouteAvoidanceZoneCategory

Description

Zone categories to be avoided. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

Members
Category
Required: Yes
Type: string

Zone category to be avoided.

RouteCarOptions

Description

Travel mode options when the provided travel mode is Car. For GrabMaps customers, ap-southeast-1 and ap-southeast-5 regions support only LicensePlate options.

Members
EngineType
Type: string

Engine type of the vehicle. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

LicensePlate
Type: RouteVehicleLicensePlate structure

The vehicle License Plate.

MaxSpeed
Type: double

Maximum speed specified. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

Unit: kilometers per hour

Occupancy
Type: int

The number of occupants in the vehicle. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

Default value: 1

RouteContinueHighwayStepDetails

Description

Details related to the continue highway step.

Members
Intersection
Required: Yes
Type: Array of LocalizedString structures

Name of the intersection, if applicable to the step.

SteeringDirection
Type: string

Steering direction for the step.

TurnAngle
Type: double

Angle of the turn.

TurnIntensity
Type: string

Intensity of the turn.

RouteContinueStepDetails

Description

Details related to the continue step.

Members
Intersection
Required: Yes
Type: Array of LocalizedString structures

Name of the intersection, if applicable to the step.

RouteDestinationOptions

Description

Options related to the destination.

Members
AvoidActionsForDistance
Type: long (int|float)

The distance in meters from the destination point within which certain routing actions (such as U-turns or left turns across traffic) are restricted. This helps generate more practical routes by avoiding potentially dangerous maneuvers near the endpoint.

AvoidUTurns
Type: boolean

Avoid U-turns for calculation on highways and motorways.

Heading
Type: double

GPS Heading at the position.

Matching
Type: RouteMatchingOptions structure

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

SideOfStreet
Type: RouteSideOfStreetOptions structure

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

StopDuration
Type: long (int|float)

Duration of the stop.

Unit: seconds

RouteDriverOptions

Description

Driver related options.

Members
Schedule
Type: Array of RouteDriverScheduleInterval structures

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

RouteDriverScheduleInterval

Description

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

Members
DriveDuration
Required: Yes
Type: long (int|float)

Maximum allowed driving time before stopping to rest.

Unit: seconds

RestDuration
Required: Yes
Type: long (int|float)

Resting time before the driver can continue driving.

Unit: seconds

RouteEmissionType

Description

Type of the emission.

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

Members
Co2EmissionClass
Type: string

The CO 2 emission classes.

Type
Required: Yes
Type: string

Type of the emission.

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

RouteEnterHighwayStepDetails

Description

Details related to the enter highway step.

Members
Intersection
Required: Yes
Type: Array of LocalizedString structures

Name of the intersection, if applicable to the step.

SteeringDirection
Type: string

Steering direction for the step.

TurnAngle
Type: double

Angle of the turn.

TurnIntensity
Type: string

Intensity of the turn.

RouteExclusionOptions

Description

Specifies strict exclusion options for the route calculation. This setting mandates that the router will avoid any routes that include the specified options, rather than merely attempting to minimize them.

Members
Countries
Required: Yes
Type: Array of strings

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

RouteExitStepDetails

Description

Details related to the exit step.

Members
Intersection
Required: Yes
Type: Array of LocalizedString structures

Name of the intersection, if applicable to the step.

RelativeExit
Type: int

Exit to be taken.

SteeringDirection
Type: string

Steering direction for the step.

TurnAngle
Type: double

Angle of the turn.

TurnIntensity
Type: string

Intensity of the turn.

RouteFerryAfterTravelStep

Description

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

Members
Duration
Required: Yes
Type: long (int|float)

Duration of the step.

Unit: seconds

Instruction
Type: string

Brief description of the step in the requested language.

Only available when the TravelStepType is Default.

Type
Required: Yes
Type: string

Type of the step.

RouteFerryArrival

Description

Details corresponding to the arrival for the leg.

Members
Place
Required: Yes
Type: RouteFerryPlace structure

The place details.

Time
Type: string

The time.

RouteFerryBeforeTravelStep

Description

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

Members
Duration
Required: Yes
Type: long (int|float)

Duration of the step.

Unit: seconds

Instruction
Type: string

Brief description of the step in the requested language.

Only available when the TravelStepType is Default.

Type
Required: Yes
Type: string

Type of the step.

RouteFerryDeparture

Description

Details corresponding to the departure for the leg.

Members
Place
Required: Yes
Type: RouteFerryPlace structure

The place details.

Time
Type: string

The time.

RouteFerryLegDetails

Description

FerryLegDetails is populated when the Leg type is Ferry, and provides additional information that is specific to ferry travel.

Members
AfterTravelSteps
Required: Yes
Type: Array of RouteFerryAfterTravelStep structures

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

Arrival
Required: Yes
Type: RouteFerryArrival structure

Details corresponding to the arrival for the leg.

BeforeTravelSteps
Required: Yes
Type: Array of RouteFerryBeforeTravelStep structures

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

Departure
Required: Yes
Type: RouteFerryDeparture structure

Details corresponding to the departure for the leg.

Notices
Required: Yes
Type: Array of RouteFerryNotice structures

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

PassThroughWaypoints
Required: Yes
Type: Array of RoutePassThroughWaypoint structures

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

RouteName
Type: string

Route name of the ferry line.

Spans
Required: Yes
Type: Array of RouteFerrySpan structures

Spans that were computed for the requested SpanAdditionalFeatures.

Summary
Type: RouteFerrySummary structure

Summarized details of the leg.

TravelSteps
Required: Yes
Type: Array of RouteFerryTravelStep structures

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

RouteFerryNotice

Description

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

Members
Code
Required: Yes
Type: string

Code corresponding to the issue.

Impact
Type: 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.

RouteFerryOverviewSummary

Description

Summarized details of the leg.

Members
Distance
Required: Yes
Type: long (int|float)

Distance of the step.

Duration
Required: Yes
Type: long (int|float)

Duration of the step.

Unit: seconds

RouteFerryPlace

Description

Position provided in the request.

Members
Name
Type: string

The name of the place.

OriginalPosition
Type: Array of doubles

Position provided in the request.

Position
Required: Yes
Type: Array of doubles

Position in World Geodetic System (WGS 84) format: [longitude, latitude].

WaypointIndex
Type: int

Index of the waypoint in the request.

RouteFerrySpan

Description

Span computed for the requested SpanAdditionalFeatures.

Members
Country
Type: string

3 letter Country code corresponding to the Span.

Distance
Type: long (int|float)

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

Unit: meters

Duration
Type: long (int|float)

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
Type: int

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

Names
Type: Array of LocalizedString structures

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

Region
Type: string

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

RouteFerrySummary

Description

Summarized details for the leg including travel steps only. The Distance for the travel only portion of the journey is the same as the Distance within the Overview summary.

Members
Overview
Type: RouteFerryOverviewSummary structure

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

TravelOnly
Type: RouteFerryTravelOnlySummary structure

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

RouteFerryTravelOnlySummary

Description

Summarized details for the leg including travel steps only. The Distance for the travel only portion of the journey is the same as the Distance within the Overview summary.

Members
Duration
Required: Yes
Type: long (int|float)

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

Unit: seconds

RouteFerryTravelStep

Description

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

Members
Distance
Type: long (int|float)

Distance of the step.

Duration
Required: Yes
Type: long (int|float)

Duration of the step.

Unit: seconds

GeometryOffset
Type: int

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

Instruction
Type: string

Brief description of the step in the requested language.

Only available when the TravelStepType is Default.

Type
Required: Yes
Type: string

Type of the step.

RouteKeepStepDetails

Description

Details that are specific to a Keep step.

Members
Intersection
Required: Yes
Type: Array of LocalizedString structures

Name of the intersection, if applicable to the step.

SteeringDirection
Type: string

Steering direction for the step.

TurnAngle
Type: double

Angle of the turn.

TurnIntensity
Type: string

Intensity of the turn.

RouteLeg

Description

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.

Members
FerryLegDetails
Type: RouteFerryLegDetails structure

FerryLegDetails is populated when the Leg type is Ferry, and provides additional information that is specific to ferry travel. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

Geometry
Required: Yes
Type: RouteLegGeometry structure

Geometry of the area to be avoided.

Language
Type: string

List of languages for instructions within steps in the response. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

PedestrianLegDetails
Type: RoutePedestrianLegDetails structure

Details related to the pedestrian leg.

TravelMode
Required: Yes
Type: string

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

Default value: Car

Type
Required: Yes
Type: string

Type of the leg.

VehicleLegDetails
Type: RouteVehicleLegDetails structure

Details related to the vehicle leg.

RouteLegGeometry

Description

The returned Route leg geometry.

Members
LineString
Type: Array of floatss

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

LineString and Polyline are mutually exclusive properties.

Polyline
Type: string

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

LineString and Polyline are mutually exclusive properties.

RouteMajorRoadLabel

Description

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

Members
RoadName
Type: LocalizedString structure

Name of the road (localized).

RouteNumber
Type: RouteNumber structure

Route number of the road.

RouteMatchingOptions

Description

Options related to route matching.

Members
NameHint
Type: string

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

OnRoadThreshold
Type: long (int|float)

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
Type: long (int|float)

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
Type: 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.

RouteMatrixAllowOptions

Description

Allow Options related to the route matrix.

Members
Hot
Type: boolean

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

Default value: false

Hov
Type: boolean

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

Default value: false

RouteMatrixAutoCircle

Description

Provides the circle that was used while calculating the route.

Members
Margin
Type: long (int|float)

The margin provided for the calculation.

MaxRadius
Type: long (int|float)

The maximum size of the radius provided for the calculation.

RouteMatrixAvoidanceArea

Description

Area to be avoided.

Members
Geometry
Required: Yes
Type: RouteMatrixAvoidanceAreaGeometry structure

Geometry of the area to be avoided.

RouteMatrixAvoidanceAreaGeometry

Description

Geometry of the area to be avoided.

Members
BoundingBox
Type: Array of doubles

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.

Polygon
Type: Array of lists

Geometry defined as a polygon with only one linear ring.

PolylinePolygon
Type: Array of strings

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/aws-geospatial/polyline.

RouteMatrixAvoidanceOptions

Description

Specifies options for areas to avoid when calculating the route. This is a best-effort avoidance setting, meaning the router will try to honor the avoidance preferences but may still include restricted areas if no feasible alternative route exists. If avoidance options are not followed, the response will indicate that the avoidance criteria were violated.

Members
Areas
Type: Array of RouteMatrixAvoidanceArea structures

Areas to be avoided.

CarShuttleTrains
Type: boolean

Avoid car-shuttle-trains while calculating the route.

ControlledAccessHighways
Type: boolean

Avoid controlled access highways while calculating the route.

DirtRoads
Type: boolean

Avoid dirt roads while calculating the route.

Ferries
Type: boolean

Avoid ferries while calculating the route.

TollRoads
Type: boolean

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

TollTransponders
Type: boolean

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

TruckRoadTypes
Type: Array of strings

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

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

Tunnels
Type: boolean

Avoid tunnels while calculating the route.

UTurns
Type: boolean

Avoid U-turns for calculation on highways and motorways.

ZoneCategories
Type: Array of RouteMatrixAvoidanceZoneCategory structures

Zone categories to be avoided.

RouteMatrixAvoidanceZoneCategory

Description

Zone categories to be avoided.

Members
Category
Type: string

Zone category to be avoided.

RouteMatrixBoundary

Description

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

Members
Geometry
Type: RouteMatrixBoundaryGeometry structure

Geometry of the area to be avoided.

Unbounded
Type: boolean

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

RouteMatrixBoundaryGeometry

Description

Geometry of the routing boundary.

Members
AutoCircle
Type: RouteMatrixAutoCircle structure

Provides the circle that was used while calculating the route.

BoundingBox
Type: Array of doubles

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.

Circle
Type: Circle structure

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.

Polygon
Type: Array of lists

Geometry defined as a polygon with only one linear ring.

RouteMatrixCarOptions

Description

Travel mode options when the provided travel mode is Car.

Members
LicensePlate

The vehicle License Plate.

MaxSpeed
Type: double

Maximum speed

Unit: kilometers per hour

Occupancy
Type: int

The number of occupants in the vehicle.

Default value: 1

RouteMatrixDestination

Description

The route destination.

Members
Options

Destination related options. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

Position
Required: Yes
Type: Array of doubles

Position in World Geodetic System (WGS 84) format: [longitude, latitude].

RouteMatrixDestinationOptions

Description

Options related to the destination.

Members
AvoidActionsForDistance
Type: long (int|float)

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
Type: double

GPS Heading at the position.

Matching
Type: RouteMatrixMatchingOptions structure

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

SideOfStreet

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

RouteMatrixEntry

Description

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.

Members
Distance
Required: Yes
Type: long (int|float)

The total distance of travel for the route.

Duration
Required: Yes
Type: long (int|float)

The expected duration of travel for the route.

Unit: seconds

Error
Type: string

Error code that occurred during calculation of the route.

RouteMatrixExclusionOptions

Description

Specifies strict exclusion options for the route calculation. This setting mandates that the router will avoid any routes that include the specified options, rather than merely attempting to minimize them.

Members
Countries
Required: Yes
Type: Array of strings

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

RouteMatrixMatchingOptions

Description

Matching options.

Members
NameHint
Type: string

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

OnRoadThreshold
Type: long (int|float)

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
Type: long (int|float)

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
Type: 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.

RouteMatrixOrigin

Description

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

Members
Options
Type: RouteMatrixOriginOptions structure

Origin related options. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

Position
Required: Yes
Type: Array of doubles

Position in World Geodetic System (WGS 84) format: [longitude, latitude].

RouteMatrixOriginOptions

Description

Origin related options.

Members
AvoidActionsForDistance
Type: long (int|float)

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
Type: double

GPS Heading at the position.

Matching
Type: RouteMatrixMatchingOptions structure

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

SideOfStreet

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

RouteMatrixScooterOptions

Description

Travel mode options when the provided travel mode is Scooter.

Members
LicensePlate

The vehicle License Plate.

MaxSpeed
Type: double

Maximum speed.

Unit: kilometers per hour

Occupancy
Type: int

The number of occupants in the vehicle.

Default value: 1

RouteMatrixSideOfStreetOptions

Description

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

Members
Position
Required: Yes
Type: Array of doubles

Position in World Geodetic System (WGS 84) format: [longitude, latitude].

UseWith
Type: string

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

Default value: DividedStreetOnly

RouteMatrixTrafficOptions

Description

Traffic related options.

Members
FlowEventThresholdOverride
Type: long (int|float)

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
Type: string

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

Default value: UseTrafficData

RouteMatrixTrailerOptions

Description

Trailer options corresponding to the vehicle.

Members
TrailerCount
Type: int

Number of trailers attached to the vehicle.

Default value: 0

RouteMatrixTravelModeOptions

Description

Travel mode related options for the provided travel mode.

Members
Car
Type: RouteMatrixCarOptions structure

Travel mode options when the provided travel mode is Car.

Scooter
Type: RouteMatrixScooterOptions structure

Travel mode options when the provided travel mode is Scooter.

When travel mode is set to Scooter, then the avoidance option ControlledAccessHighways defaults to true.

Truck
Type: RouteMatrixTruckOptions structure

Travel mode options when the provided travel mode is Truck.

RouteMatrixTruckOptions

Description

Travel mode options when the provided travel mode is Truck.

Members
AxleCount
Type: int

Total number of axles of the vehicle.

GrossWeight
Type: long (int|float)

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

Unit: kilograms

HazardousCargos
Type: Array of strings

List of Hazardous cargo contained in the vehicle.

Height
Type: long (int|float)

Height of the vehicle.

Unit: centimeters

KpraLength
Type: long (int|float)

Kingpin to rear axle length of the vehicle

Unit: centimeters

Length
Type: long (int|float)

Length of the vehicle.

Unit: centimeters

LicensePlate

The vehicle License Plate.

MaxSpeed
Type: double

Maximum speed

Unit: kilometers per hour

Occupancy
Type: int

The number of occupants in the vehicle.

Default value: 1

PayloadCapacity
Type: long (int|float)

Payload capacity of the vehicle and trailers attached.

Unit: kilograms

Trailer
Type: RouteMatrixTrailerOptions structure

Trailer options corresponding to the vehicle.

TruckType
Type: string

The type of truck: LightTruck for smaller delivery vehicles, StraightTruck for rigid body trucks, or Tractor for tractor-trailer combinations.

TunnelRestrictionCode
Type: 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
Type: long (int|float)

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
Type: WeightPerAxleGroup structure

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

Width
Type: long (int|float)

Width of the vehicle.

Unit: centimeters

RouteMatrixVehicleLicensePlate

Description

The vehicle License Plate.

Members
LastCharacter
Type: string

The last character of the License Plate.

RouteNoticeDetailRange

Description

Notice Detail that is a range.

Members
Max
Type: int

Maximum value for the range.

Min
Type: int

Minimum value for the range.

RouteNumber

Description

The route number.

Members
Direction
Type: string

Directional identifier of the route.

Language
Type: string

List of languages for instructions corresponding to the route number.

Value
Required: Yes
Type: string

The route number.

RouteOriginOptions

Description

Origin related options.

Members
AvoidActionsForDistance
Type: long (int|float)

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
Type: boolean

Avoid U-turns for calculation on highways and motorways.

Heading
Type: double

GPS Heading at the position.

Matching
Type: RouteMatchingOptions structure

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

SideOfStreet
Type: RouteSideOfStreetOptions structure

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

RoutePassThroughPlace

Description

The place where the waypoint is passed through and not treated as a stop.

Members
OriginalPosition
Type: Array of doubles

Position provided in the request.

Position
Required: Yes
Type: Array of doubles

Position in World Geodetic System (WGS 84) format: [longitude, latitude].

WaypointIndex
Type: int

Index of the waypoint in the request.

RoutePassThroughWaypoint

Description

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

Members
GeometryOffset
Type: int

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

Place
Required: Yes
Type: RoutePassThroughPlace structure

The place details.

RoutePedestrianArrival

Description

Details corresponding to the arrival for a leg.

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

Members
Place
Required: Yes
Type: RoutePedestrianPlace structure

The place details.

Time
Type: string

The time.

RoutePedestrianDeparture

Description

Details corresponding to the departure for a leg.

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

Members
Place
Required: Yes
Type: RoutePedestrianPlace structure

The place details.

Time
Type: string

The time.

RoutePedestrianLegDetails

Description

Details that are specific to a pedestrian leg.

Members
Arrival
Required: Yes
Type: RoutePedestrianArrival structure

Details corresponding to the arrival for the leg.

Departure
Required: Yes
Type: RoutePedestrianDeparture structure

Details corresponding to the departure for the leg.

Notices
Required: Yes
Type: Array of RoutePedestrianNotice structures

Notices are additional information returned that indicate issues that occurred during route calculation. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

PassThroughWaypoints
Required: Yes
Type: Array of RoutePassThroughWaypoint structures

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

Spans
Required: Yes
Type: Array of RoutePedestrianSpan structures

Spans that were computed for the requested SpanAdditionalFeatures. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

Summary
Type: RoutePedestrianSummary structure

Summarized details of the leg.

TravelSteps
Required: Yes
Type: Array of RoutePedestrianTravelStep structures

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

RoutePedestrianNotice

Description

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

Members
Code
Required: Yes
Type: string

Code corresponding to the issue.

Impact
Type: 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.

RoutePedestrianOptions

Description

Options related to the pedestrian. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

Members
Speed
Type: double

Walking speed in Kilometers per hour.

RoutePedestrianOverviewSummary

Description

Provides a summary of a pedestrian route step.

Members
Distance
Required: Yes
Type: long (int|float)

Distance of the step.

Duration
Required: Yes
Type: long (int|float)

Duration of the step.

RoutePedestrianPlace

Description

Place details corresponding to the arrival or departure.

Members
Name
Type: string

The name of the place.

OriginalPosition
Type: Array of doubles

Position provided in the request.

Position
Required: Yes
Type: Array of doubles

Position in World Geodetic System (WGS 84) format: [longitude, latitude].

SideOfStreet
Type: string

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

WaypointIndex
Type: int

Index of the waypoint in the request.

RoutePedestrianSpan

Description

Span computed for the requested SpanAdditionalFeatures.

Members
BestCaseDuration
Type: long (int|float)

Duration of the computed span without traffic congestion.

Unit: seconds

Country
Type: string

3 letter Country code corresponding to the Span.

Distance
Type: long (int|float)

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

Duration
Type: long (int|float)

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

Dynamic speed details corresponding to the span.

Unit: kilometers per hour

FunctionalClassification
Type: int

A numerical value indicating the functional classification of the road segment corresponding to the span.

Classification values are part of the hierarchical network that helps determine a logical and efficient route, and have the following definitions:

  1. Roads that allow for high volume, maximum speed traffic movement between and through major metropolitan areas.

  2. Roads that are used to channel traffic to functional class 1 roads for travel between and through cities in the shortest amount of time.

  3. Roads that intersect functional class 2 roads and provide a high volume of traffic movement at a lower level of mobility than functional class 2 roads.

  4. Roads that provide for a high volume of traffic movement at moderate speeds between neighborhoods.

  5. Roads with volume and traffic movement below the level of any other functional class.

GeometryOffset
Type: int

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

Incidents
Type: Array of ints

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

Names
Type: Array of LocalizedString structures

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

PedestrianAccess
Type: Array of strings

Access attributes for a pedestrian corresponding to the span.

Region
Type: string

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

RoadAttributes
Type: Array of strings

Attributes for the road segment corresponding to the span.

RouteNumbers
Type: Array of RouteNumber structures

Designated route name or number corresponding to the span.

SpeedLimit
Type: RouteSpanSpeedLimitDetails structure

Speed limit details corresponding to the span.

Unit: kilometers per hour

TypicalDuration
Type: long (int|float)

Duration of the computed span under typical traffic congestion.

Unit: seconds

RoutePedestrianSummary

Description

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

Members
Overview

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

TravelOnly

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

RoutePedestrianTravelOnlySummary

Description

Summarized details for the leg including travel steps.

Members
Duration
Required: Yes
Type: long (int|float)

Duration of the step.

Unit: seconds

RoutePedestrianTravelStep

Description

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

Members
ContinueStepDetails
Type: RouteContinueStepDetails structure

Details related to the continue step.

CurrentRoad
Type: RouteRoad structure

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

Distance
Type: long (int|float)

Distance of the step.

Duration
Required: Yes
Type: long (int|float)

Duration of the step.

Unit: seconds

ExitNumber
Type: Array of LocalizedString structures

Exit number of the road exit, if applicable.

GeometryOffset
Type: int

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

Instruction
Type: string

Brief description of the step in the requested language.

Only available when the TravelStepType is Default.

KeepStepDetails
Type: RouteKeepStepDetails structure

Details that are specific to a Keep step.

NextRoad
Type: RouteRoad structure

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

RoundaboutEnterStepDetails

Details that are specific to a Roundabout Enter step.

RoundaboutExitStepDetails

Details that are specific to a Roundabout Exit step.

RoundaboutPassStepDetails

Details that are specific to a Roundabout Pass step.

Signpost
Type: RouteSignpost structure

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

TurnStepDetails
Type: RouteTurnStepDetails structure

Details that are specific to a turn step.

Type
Required: Yes
Type: string

Type of the step.

RouteRampStepDetails

Description

Details that are specific to a ramp step.

Members
Intersection
Required: Yes
Type: Array of LocalizedString structures

Name of the intersection, if applicable to the step.

SteeringDirection
Type: string

Steering direction for the step.

TurnAngle
Type: double

Angle of the turn.

TurnIntensity
Type: string

Intensity of the turn.

RouteResponseNotice

Description

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

Members
Code
Required: Yes
Type: string

Code corresponding to the issue.

Impact
Type: 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.

RouteRoad

Description

The road on the route.

Members
RoadName
Required: Yes
Type: Array of LocalizedString structures

Name of the road (localized).

RouteNumber
Required: Yes
Type: Array of RouteNumber structures

Route number of the road.

Towards
Required: Yes
Type: Array of LocalizedString structures

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

Type
Type: string

The type of road.

RouteRoundaboutEnterStepDetails

Description

Details about the roundabout leg.

Members
Intersection
Required: Yes
Type: Array of LocalizedString structures

Name of the intersection, if applicable to the step.

SteeringDirection
Type: string

Steering direction for the step.

TurnAngle
Type: double

Angle of the turn.

TurnIntensity
Type: string

Intensity of the turn.

RouteRoundaboutExitStepDetails

Description

Details about the roundabout step.

Members
Intersection
Required: Yes
Type: Array of LocalizedString structures

Name of the intersection, if applicable to the step.

RelativeExit
Type: int

Exit to be taken.

RoundaboutAngle
Type: double

Angle of the roundabout.

SteeringDirection
Type: string

Steering direction for the step.

RouteRoundaboutPassStepDetails

Description

Details about the step.

Members
Intersection
Required: Yes
Type: Array of LocalizedString structures

Name of the intersection, if applicable to the step.

SteeringDirection
Type: string

Steering direction for the step.

TurnAngle
Type: double

Angle of the turn.

TurnIntensity
Type: string

Intensity of the turn.

RouteScooterOptions

Description

Travel mode options when the provided travel mode is Scooter. For GrabMaps customers, ap-southeast-1 and ap-southeast-5 regions support only LicensePlate options.

Members
EngineType
Type: string

Engine type of the vehicle. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

LicensePlate
Type: RouteVehicleLicensePlate structure

The vehicle License Plate.

MaxSpeed
Type: double

Maximum speed Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

Unit: kilometers per hour

Occupancy
Type: int

The number of occupants in the vehicle. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

Default value: 1

RouteSideOfStreetOptions

Description

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

Members
Position
Required: Yes
Type: Array of doubles

Position in World Geodetic System (WGS 84) format: [longitude, latitude].

UseWith
Type: string

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

Default value: DividedStreetOnly

RouteSignpost

Description

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

Members
Labels
Required: Yes
Type: Array of RouteSignpostLabel structures

Labels present on the sign post.

RouteSignpostLabel

Description

Labels presented on the sign post.

Members
RouteNumber
Type: RouteNumber structure

Route number of the road.

Text
Type: LocalizedString structure

The Signpost text.

RouteSpanDynamicSpeedDetails

Description

Details about the dynamic speed.

Unit: kilometers per hour

Members
BestCaseSpeed
Type: double

Estimated speed while traversing the span without traffic congestion.

Unit: kilometers per hour

TurnDuration
Type: long (int|float)

Estimated time to turn from this span into the next.

Unit: seconds

TypicalSpeed
Type: double

Estimated speed while traversing the span under typical traffic congestion.

Unit: kilometers per hour

RouteSpanSpeedLimitDetails

Description

Details about the speed limit corresponding to the span.

Unit: kilometers per hour

Members
MaxSpeed
Type: double

Maximum speed.

Unit: kilometers per hour

Unlimited
Type: boolean

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

RouteSummary

Description

Summarized details for the leg including travel steps only. The Distance for the travel only portion of the journey is the same as the Distance within the Overview summary.

Members
Distance
Type: long (int|float)

Distance of the route.

Duration
Type: long (int|float)

Duration of the route.

Unit: seconds

Tolls
Type: RouteTollSummary structure

Toll summary for the complete route.

RouteToll

Description

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.

Members
Country
Type: string

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

PaymentSites
Required: Yes
Type: Array of RouteTollPaymentSite structures

Locations or sites where the toll fare is collected.

Rates
Required: Yes
Type: Array of RouteTollRate structures

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

Systems
Required: Yes
Type: Array of ints

Toll systems are authorities that collect payments for the toll.

RouteTollOptions

Description

Options related to Tolls on a route.

Members
AllTransponders
Type: 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
Type: 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
Type: string

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

EmissionType
Type: RouteEmissionType structure

Emission type of the vehicle for toll cost calculation.

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

VehicleCategory
Type: string

Vehicle category for toll cost calculation.

RouteTollPass

Description

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

Members
IncludesReturnTrip
Type: boolean

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

SeniorPass
Type: boolean

If the pass is only valid for senior persons.

TransferCount
Type: int

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

TripCount
Type: int

Number of trips the pass is valid for.

ValidityPeriod
Type: RouteTollPassValidityPeriod structure

Period for which the pass is valid.

RouteTollPassValidityPeriod

Description

Period for which the pass is valid.

Members
Period
Required: Yes
Type: string

Validity period.

PeriodCount
Type: int

Counts for the validity period.

RouteTollPaymentSite

Description

Locations or sites where the toll fare is collected.

Members
Name
Type: string

Name of the payment site.

Position
Required: Yes
Type: Array of doubles

Position in World Geodetic System (WGS 84) format: [longitude, latitude].

RouteTollPrice

Description

The toll price.

Members
Currency
Required: Yes
Type: string

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

Estimate
Required: Yes
Type: boolean

If the price is an estimate or an exact value.

PerDuration
Type: long (int|float)

Duration for which the price corresponds to.

Unit: seconds

Range
Required: Yes
Type: 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
Type: RouteTollPriceValueRange structure

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

Value
Required: Yes
Type: double

Exact price, if not a range.

RouteTollPriceSummary

Description

Summary of the route and toll price.

Members
Currency
Required: Yes
Type: string

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

Estimate
Required: Yes
Type: boolean

If the price is an estimate or an exact value.

Range
Required: Yes
Type: 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
Type: RouteTollPriceValueRange structure

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

Value
Required: Yes
Type: double

Exact price, if not a range.

RouteTollPriceValueRange

Description

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

Members
Max
Required: Yes
Type: double

Maximum price.

Min
Required: Yes
Type: double

Minimum price.

RouteTollRate

Description

The toll rate.

Members
ApplicableTimes
Type: string

Time when the rate is valid.

ConvertedPrice
Type: RouteTollPrice structure

Price in the converted currency as specified in the request.

Id
Required: Yes
Type: string

The Toll rate Id.

LocalPrice
Required: Yes
Type: RouteTollPrice structure

Price in the local regional currency.

Name
Required: Yes
Type: string

The name of the toll.

Pass
Type: RouteTollPass structure

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

PaymentMethods
Required: Yes
Type: Array of strings

Accepted payment methods at the toll.

Transponders
Required: Yes
Type: Array of RouteTransponder structures

Transponders for which this toll can be applied.

RouteTollSummary

Description

The toll summary for the complete route.

Members
Total
Type: RouteTollPriceSummary structure

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

RouteTollSystem

Description

Toll systems are authorities that collect payments for the toll.

Members
Name
Type: string

The toll system name.

RouteTrafficOptions

Description

Traffic options for the route.

Members
FlowEventThresholdOverride
Type: long (int|float)

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
Type: string

Specifies how traffic data should be used when calculating routes.

Default Value: UseTrafficData

Traffic data usage depends on the time parameters in your route request:

  • When Usage is set to UseTrafficData:

    • If DepartNow is set to true, or if you specify DepartureTime or ArrivalTime, then all traffic data is considered (including live traffic and closures).

    • If DepartNow, DepartureTime, and ArrivalTime are all unspecified, then only long-term closures are considered, regardless of this setting.

  • When Usage is set to IgnoreTrafficData, then all traffic data is ignored regardless of the time parameters in your route request.

RouteTrailerOptions

Description

Trailer options corresponding to the vehicle.

Members
AxleCount
Type: int

Total number of axles of the vehicle.

TrailerCount
Type: int

Number of trailers attached to the vehicle.

Default value: 0

RouteTransponder

Description

Transponders for which this toll can be applied.

Members
SystemName
Type: string

Names of the toll system collecting the toll.

RouteTravelModeOptions

Description

Travel mode related options for the provided travel mode.

Members
Car
Type: RouteCarOptions structure

Travel mode options when the provided travel mode is Car.

Pedestrian
Type: RoutePedestrianOptions structure

Travel mode options when the provided travel mode is Pedestrian.

Scooter
Type: RouteScooterOptions structure

Travel mode options when the provided travel mode is Scooter.

When travel mode is set to Scooter, then the avoidance option ControlledAccessHighways defaults to true.

Truck
Type: RouteTruckOptions structure

Travel mode options when the provided travel mode is Truck.

RouteTruckOptions

Description

Travel mode options when the provided travel mode is Truck. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

Members
AxleCount
Type: int

Total number of axles of the vehicle.

EngineType
Type: string

Engine type of the vehicle.

GrossWeight
Type: long (int|float)

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

Unit: kilograms

HazardousCargos
Type: Array of strings

List of Hazardous cargo contained in the vehicle.

Height
Type: long (int|float)

Height of the vehicle.

Unit: centimeters

HeightAboveFirstAxle
Type: long (int|float)

Height of the vehicle above its first axle.

Unit: centimeters

KpraLength
Type: long (int|float)

Kingpin to rear axle length of the vehicle.

Unit: centimeters

Length
Type: long (int|float)

Length of the vehicle.

Unit: c

LicensePlate
Type: RouteVehicleLicensePlate structure

The vehicle License Plate.

MaxSpeed
Type: double

Maximum speed

Unit: kilometers per hour

Occupancy
Type: int

The number of occupants in the vehicle.

Default value: 1

PayloadCapacity
Type: long (int|float)

Payload capacity of the vehicle and trailers attached.

Unit: kilograms

TireCount
Type: int

Number of tires on the vehicle.

Trailer
Type: RouteTrailerOptions structure

Trailer options corresponding to the vehicle.

TruckType
Type: string

The type of truck: LightTruck for smaller delivery vehicles, StraightTruck for rigid body trucks, or Tractor for tractor-trailer combinations.

TunnelRestrictionCode
Type: 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
Type: long (int|float)

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
Type: WeightPerAxleGroup structure

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

Width
Type: long (int|float)

Width of the vehicle.

Unit: centimeters

RouteTurnStepDetails

Description

Details related to the turn step.

Members
Intersection
Required: Yes
Type: Array of LocalizedString structures

Name of the intersection, if applicable to the step.

SteeringDirection
Type: string

Steering direction for the step.

TurnAngle
Type: double

Angle of the turn.

TurnIntensity
Type: string

Intensity of the turn.

RouteUTurnStepDetails

Description

Details related to the U-turn step.

Members
Intersection
Required: Yes
Type: Array of LocalizedString structures

Name of the intersection, if applicable to the step.

SteeringDirection
Type: string

Steering direction for the step.

TurnAngle
Type: double

Angle of the turn.

TurnIntensity
Type: string

Intensity of the turn.

RouteVehicleArrival

Description

Details corresponding to the arrival for a leg.

Members
Place
Required: Yes
Type: RouteVehiclePlace structure

The place details.

Time
Type: string

The time.

RouteVehicleDeparture

Description

Details corresponding to the departure for the leg.

Members
Place
Required: Yes
Type: RouteVehiclePlace structure

The place details.

Time
Type: string

The departure time.

RouteVehicleIncident

Description

Incidents corresponding to this leg of the route.

Members
Description
Type: string

Brief readable description of the incident.

EndTime
Type: string

End timestamp of the incident.

Severity
Type: 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
Type: string

Start time of the incident.

Type
Type: string

Type of the incident.

RouteVehicleLegDetails

Description

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

Members
Arrival
Required: Yes
Type: RouteVehicleArrival structure

Details corresponding to the arrival for the leg.

Departure
Required: Yes
Type: RouteVehicleDeparture structure

Details corresponding to the departure for the leg.

Incidents
Required: Yes
Type: Array of RouteVehicleIncident structures

Incidents corresponding to this leg of the route. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

Notices
Required: Yes
Type: Array of RouteVehicleNotice structures

Notices are additional information returned that indicate issues that occurred during route calculation. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

PassThroughWaypoints
Required: Yes
Type: Array of RoutePassThroughWaypoint structures

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

Spans
Required: Yes
Type: Array of RouteVehicleSpan structures

Spans that were computed for the requested SpanAdditionalFeatures. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

Summary
Type: RouteVehicleSummary structure

Summarized details of the leg.

TollSystems
Required: Yes
Type: Array of RouteTollSystem structures

Toll systems are authorities that collect payments for the toll. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

Tolls
Required: Yes
Type: Array of RouteToll structures

Toll related options. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

TravelSteps
Required: Yes
Type: Array of RouteVehicleTravelStep structures

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

TruckRoadTypes
Required: Yes
Type: Array of strings

Truck road type identifiers. BK1 through BK4 apply only to Sweden. A2,A4,B2,B4,C,D,ET2,ET4 apply only to Mexico. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

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

Zones
Required: Yes
Type: Array of RouteZone structures

Zones corresponding to this leg of the route. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

RouteVehicleLicensePlate

Description

License plate information of the vehicle. Currently, only the last character is used where license plate based controlled access is enforced.

Members
LastCharacter
Type: string

The last character of the License Plate.

RouteVehicleNotice

Description

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

Members
Code
Required: Yes
Type: string

Code corresponding to the issue.

Details
Required: Yes
Type: Array of RouteVehicleNoticeDetail structures

Additional details of the notice.

Impact
Type: 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.

RouteVehicleNoticeDetail

Description

Additional details of the notice.

Members
Title
Type: string

The notice title.

ViolatedConstraints
Type: RouteViolatedConstraints structure

Any violated constraints.

RouteVehicleOverviewSummary

Description

Summarized details of the leg.

Members
BestCaseDuration
Type: long (int|float)

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

Unit: seconds

Distance
Required: Yes
Type: long (int|float)

Distance of the step.

Duration
Required: Yes
Type: long (int|float)

Duration of the step.

Unit: seconds

TypicalDuration
Type: long (int|float)

Duration of the computed span under typical traffic congestion.

Unit: seconds

RouteVehiclePlace

Description

Place details corresponding to the arrival or departure.

Members
Name
Type: string

The name of the place.

OriginalPosition
Type: Array of doubles

Position provided in the request.

Position
Required: Yes
Type: Array of doubles

Position in World Geodetic System (WGS 84) format: [longitude, latitude].

SideOfStreet
Type: string

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

WaypointIndex
Type: int

Index of the waypoint in the request.

RouteVehicleSpan

Description

Span computed for the requested SpanAdditionalFeatures.

Members
BestCaseDuration
Type: long (int|float)

Duration of the computed span without traffic congestion.

Unit: seconds

CarAccess
Type: Array of strings

Access attributes for a car corresponding to the span.

Country
Type: string

3 letter Country code corresponding to the Span.

Distance
Type: long (int|float)

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

Duration
Type: long (int|float)

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

Dynamic speed details corresponding to the span.

Unit: kilometers per hour

FunctionalClassification
Type: int

A numerical value indicating the functional classification of the road segment corresponding to the span.

Classification values are part of the hierarchical network that helps determine a logical and efficient route, and have the following definitions:

  1. Roads that allow for high volume, maximum speed traffic movement between and through major metropolitan areas.

  2. Roads that are used to channel traffic to functional class 1 roads for travel between and through cities in the shortest amount of time.

  3. Roads that intersect functional class 2 roads and provide a high volume of traffic movement at a lower level of mobility than functional class 2 roads.

  4. Roads that provide for a high volume of traffic movement at moderate speeds between neighborhoods.

  5. Roads with volume and traffic movement below the level of any other functional class.

Gate
Type: string

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

GeometryOffset
Type: int

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

Incidents
Type: Array of ints

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

Names
Type: Array of LocalizedString structures

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

Notices
Type: Array of ints

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

RailwayCrossing
Type: string

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

Region
Type: string

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

RoadAttributes
Type: Array of strings

Attributes for the road segment corresponding to the span.

RouteNumbers
Type: Array of RouteNumber structures

Designated route name or number corresponding to the span.

ScooterAccess
Type: Array of strings

Access attributes for a scooter corresponding to the span.

SpeedLimit
Type: RouteSpanSpeedLimitDetails structure

Speed limit details corresponding to the span.

Unit: kilometers per hour

TollSystems
Type: Array of ints

Toll systems are authorities that collect payments for the toll.

TruckAccess
Type: Array of strings

Access attributes for a truck corresponding to the span.

TruckRoadTypes
Type: Array of ints

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

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

TypicalDuration
Type: long (int|float)

Duration of the computed span under typical traffic congestion.

Unit: seconds

Zones
Type: Array of ints

Zones corresponding to this leg of the route.

RouteVehicleSummary

Description

Summarized details of the route.

Members
Overview
Type: RouteVehicleOverviewSummary structure

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

TravelOnly

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

RouteVehicleTravelOnlySummary

Description

Summarized details of the route.

Members
BestCaseDuration
Type: long (int|float)

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

Unit: seconds

Duration
Required: Yes
Type: long (int|float)

Duration of the step.

Unit: seconds

TypicalDuration
Type: long (int|float)

Duration of the computed span under typical traffic congestion.

Unit: seconds

RouteVehicleTravelStep

Description

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

Members
ContinueHighwayStepDetails

Details that are specific to a Continue Highway step.

ContinueStepDetails
Type: RouteContinueStepDetails structure

Details that are specific to a Continue step.

CurrentRoad
Type: RouteRoad structure

Details of the current road.

Distance
Type: long (int|float)

Distance of the step.

Duration
Required: Yes
Type: long (int|float)

Duration of the step.

Unit: seconds

EnterHighwayStepDetails

Details that are specific to a Enter Highway step.

ExitNumber
Type: Array of LocalizedString structures

Exit number of the road exit, if applicable.

ExitStepDetails
Type: RouteExitStepDetails structure

Details that are specific to a Roundabout Exit step.

GeometryOffset
Type: int

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

Instruction
Type: string

Brief description of the step in the requested language.

Only available when the TravelStepType is Default.

KeepStepDetails
Type: RouteKeepStepDetails structure

Details that are specific to a Keep step.

NextRoad
Type: RouteRoad structure

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

RampStepDetails
Type: RouteRampStepDetails structure

Details that are specific to a Ramp step.

RoundaboutEnterStepDetails

Details that are specific to a Roundabout Enter step.

RoundaboutExitStepDetails

Details that are specific to a Roundabout Exit step.

RoundaboutPassStepDetails

Details that are specific to a Roundabout Pass step.

Signpost
Type: RouteSignpost structure

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

TurnStepDetails
Type: RouteTurnStepDetails structure

Details that are specific to a Turn step.

Type
Required: Yes
Type: string

Type of the step.

UTurnStepDetails
Type: RouteUTurnStepDetails structure

Details that are specific to a Turn step.

RouteViolatedConstraints

Description

This property contains a summary of violated constraints.

Members
AllHazardsRestricted
Type: boolean

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

AxleCount
Type: RouteNoticeDetailRange structure

Total number of axles of the vehicle.

HazardousCargos
Required: Yes
Type: Array of strings

List of Hazardous cargo contained in the vehicle.

MaxHeight
Type: long (int|float)

The maximum height of the vehicle.

MaxKpraLength
Type: long (int|float)

The maximum Kpra length of the vehicle.

Unit: centimeters

MaxLength
Type: long (int|float)

The maximum length of the vehicle.

MaxPayloadCapacity
Type: long (int|float)

The maximum load capacity of the vehicle.

Unit: kilograms

MaxWeight
Type: RouteWeightConstraint structure

The maximum weight of the route.

Unit: kilograms

MaxWeightPerAxle
Type: long (int|float)

The maximum weight per axle of the vehicle.

Unit: kilograms

MaxWeightPerAxleGroup
Type: WeightPerAxleGroup structure

The maximum weight per axle group of the vehicle.

Unit: kilograms

MaxWidth
Type: long (int|float)

The maximum width of the vehicle.

Occupancy
Type: RouteNoticeDetailRange structure

The number of occupants in the vehicle.

Default value: 1

RestrictedTimes
Type: string

Access radius restrictions based on time.

TimeDependent
Type: boolean

The time dependent constraint.

TrailerCount
Type: RouteNoticeDetailRange structure

Number of trailers attached to the vehicle.

Default value: 0

TravelMode
Type: boolean

Travel mode corresponding to the leg.

TruckRoadType
Type: string

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

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

TruckType
Type: string

The type of truck: LightTruck for smaller delivery vehicles, StraightTruck for rigid body trucks, or Tractor for tractor-trailer combinations.

TunnelRestrictionCode
Type: 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

RouteWaypoint

Description

Waypoint between the Origin and Destination.

Members
AvoidActionsForDistance
Type: long (int|float)

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. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

AvoidUTurns
Type: boolean

Avoid U-turns for calculation on highways and motorways. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

Heading
Type: double

GPS Heading at the position. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

Matching
Type: RouteMatchingOptions structure

Options to configure matching the provided position to the road network. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

PassThrough
Type: 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. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

Position
Required: Yes
Type: Array of doubles

Position in World Geodetic System (WGS 84) format: [longitude, latitude].

SideOfStreet
Type: RouteSideOfStreetOptions structure

Options to configure matching the provided position to a side of the street. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

StopDuration
Type: long (int|float)

Duration of the stop. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.

Unit: seconds

RouteWeightConstraint

Description

The weight constraint for the route.

Unit: kilograms

Members
Type
Required: Yes
Type: string

The type of constraint.

Value
Required: Yes
Type: long (int|float)

The constraint value.

Unit: kilograms

RouteZone

Description

The zone.

Members
Category
Type: string

The zone category.

Name
Type: string

The name of the zone.

ThrottlingException

Description

The request was denied due to request throttling.

Members
Message
Required: Yes
Type: string

ValidationException

Description

The input fails to satisfy the constraints specified by an AWS service.

Members
FieldList
Required: Yes
Type: Array of ValidationExceptionField structures

The field where the invalid entry was detected.

Message
Required: Yes
Type: string
Reason
Required: Yes
Type: string

A message with the reason for the validation exception error.

ValidationExceptionField

Description

The input fails to satisfy the constraints specified by the Amazon Location service.

Members
Message
Required: Yes
Type: string

The error message.

Name
Required: Yes
Type: string

The name of the Validation Exception Field.

WaypointOptimizationAccessHours

Description

Access hours corresponding to when a destination can be visited.

Members
From
Required: Yes
Type: WaypointOptimizationAccessHoursEntry structure

Contains the ID of the starting waypoint in this connection.

To
Required: Yes
Type: WaypointOptimizationAccessHoursEntry structure

Contains the ID of the ending waypoint in this connection.

WaypointOptimizationAccessHoursEntry

Description

Hours of entry.

Members
DayOfWeek
Required: Yes
Type: string

Day of the week.

TimeOfDay
Required: Yes
Type: string

Time of the day.

WaypointOptimizationAvoidanceAreaGeometry

Description

Geometry of the area to be avoided.

Members
BoundingBox
Type: Array of doubles

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.

WaypointOptimizationAvoidanceOptions

Description

Specifies options for areas to avoid. This is a best-effort avoidance setting, meaning the router will try to honor the avoidance preferences but may still include restricted areas if no feasible alternative route exists. If avoidance options are not followed, the response will indicate that the avoidance criteria were violated.

Members
Areas
Type: Array of WaypointOptimizationAvoidanceArea structures

Areas to be avoided.

CarShuttleTrains
Type: boolean

Avoidance options for cars-shuttles-trains.

ControlledAccessHighways
Type: boolean

Avoid controlled access highways while calculating the route.

DirtRoads
Type: boolean

Avoid dirt roads while calculating the route.

Ferries
Type: boolean

Avoidance options for ferries.

TollRoads
Type: boolean

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

Tunnels
Type: boolean

Avoid tunnels while calculating the route.

UTurns
Type: boolean

Avoid U-turns for calculation on highways and motorways.

WaypointOptimizationClusteringOptions

Description

Options for WaypointOptimizationClustering.

Members
Algorithm
Required: Yes
Type: string

The algorithm to be used. DrivingDistance assigns all the waypoints that are within driving distance of each other into a single cluster. TopologySegment assigns all the waypoints that are within the same topology segment into a single cluster. A Topology segment is a linear stretch of road between two junctions.

DrivingDistanceOptions

Driving distance options to be used when the clustering algorithm is DrivingDistance.

WaypointOptimizationConnection

Description

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

Members
Distance
Required: Yes
Type: long (int|float)

Distance of the step.

From
Required: Yes
Type: string

contains the ID of the starting waypoint in this connection.

RestDuration
Required: Yes
Type: long (int|float)

Resting time before the driver can continue driving.

To
Required: Yes
Type: string

Contains the ID of the ending waypoint in this connection.

TravelDuration
Required: Yes
Type: long (int|float)

Total duration.

Unit: seconds

WaitDuration
Required: Yes
Type: long (int|float)

Duration of a wait step.

Unit: seconds

WaypointOptimizationDestinationOptions

Description

Destination related options.

Members
AccessHours

Access hours corresponding to when a waypoint can be visited.

AppointmentTime
Type: string

Appointment time at the destination.

Heading
Type: double

GPS Heading at the position.

Id
Type: string

The waypoint Id.

ServiceDuration
Type: long (int|float)

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

Unit: seconds

SideOfStreet

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

WaypointOptimizationDriverOptions

Description

Driver related options.

Members
RestCycles

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.

RestProfile

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

TreatServiceTimeAs
Type: 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.

WaypointOptimizationDrivingDistanceOptions

Description

Driving distance related options.

Members
DrivingDistance
Required: Yes
Type: long (int|float)

DrivingDistance assigns all the waypoints that are within driving distance of each other into a single cluster.

WaypointOptimizationExclusionOptions

Description

Specifies strict exclusion options for the route calculation. This setting mandates that the router will avoid any routes that include the specified options, rather than merely attempting to minimize them.

Members
Countries
Required: Yes
Type: Array of strings

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

WaypointOptimizationFailedConstraint

Description

The failed constraint.

Members
Constraint
Type: string

The failed constraint.

Reason
Type: string

Reason for the failed constraint.

WaypointOptimizationImpedingWaypoint

Description

The impeding waypoint.

Members
FailedConstraints
Required: Yes
Type: Array of WaypointOptimizationFailedConstraint structures

Failed constraints for an impeding waypoint.

Id
Required: Yes
Type: string

The waypoint Id.

Position
Required: Yes
Type: Array of doubles

Position in World Geodetic System (WGS 84) format: [longitude, latitude].

WaypointOptimizationOptimizedWaypoint

Description

The optimized waypoint.

Members
ArrivalTime
Type: 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

ClusterIndex
Type: int

Index of the cluster the waypoint is associated with. The index is included in the response only if clustering was performed while processing the request.

DepartureTime
Required: Yes
Type: string

Estimated time of departure from the 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
Required: Yes
Type: string

The waypoint Id.

Position
Required: Yes
Type: Array of doubles

Position in World Geodetic System (WGS 84) format: [longitude, latitude].

WaypointOptimizationOriginOptions

Description

Origin related options.

Members
Id
Type: string

The Origin Id.

WaypointOptimizationPedestrianOptions

Description

Options related to a pedestrian.

Members
Speed
Type: double

Walking speed.

Unit: kilometers per hour

WaypointOptimizationRestCycleDurations

Description

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.

Unit: seconds

Members
RestDuration
Required: Yes
Type: long (int|float)

Resting phase of the cycle.

Unit: seconds

WorkDuration
Required: Yes
Type: long (int|float)

Working phase of the cycle.

Unit: seconds

WaypointOptimizationRestProfile

Description

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

Members
Profile
Required: Yes
Type: string

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

WaypointOptimizationSideOfStreetOptions

Description

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

Members
Position
Required: Yes
Type: Array of doubles

Position in World Geodetic System (WGS 84) format: [longitude, latitude].

UseWith
Type: string

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

Default value: DividedStreetOnly

WaypointOptimizationTimeBreakdown

Description

Time breakdown for the sequence.

Members
RestDuration
Required: Yes
Type: long (int|float)

Resting phase of the cycle.

Unit: seconds

ServiceDuration
Required: Yes
Type: long (int|float)

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

Unit: seconds

TravelDuration
Required: Yes
Type: long (int|float)

Traveling phase of the cycle.

Unit: seconds

WaitDuration
Required: Yes
Type: long (int|float)

Waiting phase of the cycle.

Unit: seconds

WaypointOptimizationTrafficOptions

Description

Options related to traffic.

Members
Usage
Type: string

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

Default value: UseTrafficData

WaypointOptimizationTrailerOptions

Description

Trailer options corresponding to the vehicle.

Members
TrailerCount
Type: int

Number of trailers attached to the vehicle.

Default value: 0

WaypointOptimizationTravelModeOptions

Description

Travel mode related options for the provided travel mode.

Members
Pedestrian

Travel mode options when the provided travel mode is Pedestrian.

Truck

Travel mode options when the provided travel mode is Truck.

WaypointOptimizationTruckOptions

Description

Travel mode options when the provided travel mode is Truck.

Members
GrossWeight
Type: long (int|float)

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

Unit: kilograms

HazardousCargos
Type: Array of strings

List of Hazardous cargo contained in the vehicle.

Height
Type: long (int|float)

Height of the vehicle.

Unit: centimeters

Length
Type: long (int|float)

Length of the vehicle.

Unit: centimeters

Trailer

Trailer options corresponding to the vehicle.

TruckType
Type: string

The type of truck: LightTruck for smaller delivery vehicles, StraightTruck for rigid body trucks, or Tractor for tractor-trailer combinations.

TunnelRestrictionCode
Type: 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
Type: long (int|float)

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
Type: long (int|float)

Width of the vehicle.

Unit: centimeters

WaypointOptimizationWaypoint

Description

Waypoint between the Origin and Destination.

Members
AccessHours

Access hours corresponding to when a waypoint can be visited.

AppointmentTime
Type: string

Appointment time at the waypoint.

Before
Type: Array of ints

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

Heading
Type: double

GPS Heading at the position.

Id
Type: string

The waypoint Id.

Position
Required: Yes
Type: Array of doubles

Position in World Geodetic System (WGS 84) format: [longitude, latitude].

ServiceDuration
Type: long (int|float)

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

Unit: seconds

SideOfStreet

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

WeightPerAxleGroup

Description

Specifies the total weight for different axle group configurations. Used in regions where regulations set different weight limits based on axle group types.

Unit: kilograms

Members
Quad
Type: long (int|float)

Total weight in kilograms for quad (four adjacent) axle configurations.

Unit: kilograms

Quint
Type: long (int|float)

Total weight in kilograms for quint (five adjacent) axle configurations.

Unit: kilograms

Single
Type: long (int|float)

Total weight in kilograms for single axle configurations.

Unit: kilograms

Tandem
Type: long (int|float)

Total weight in kilograms for tandem (two adjacent) axle configurations.

Unit: kilograms

Triple
Type: long (int|float)

Total weight in kilograms for triple (three adjacent) axle configurations.

Unit: kilograms