LocationServiceRoutesV2 / Client / calculate_routes
calculate_routes¶
- LocationServiceRoutesV2.Client.calculate_routes(**kwargs)¶
CalculateRoutescomputes routes given the following required parameters:OriginandDestination.For more information, see Calculate routes in the Amazon Location Service Developer Guide.
See also: AWS API Documentation
Request Syntax
response = client.calculate_routes( Allow={ 'Hot': True|False, 'Hov': True|False }, ArrivalTime='string', Avoid={ 'Areas': [ { 'Except': [ { 'Corridor': { 'LineString': [ [ 123.0, ], ], 'Radius': 123 }, 'BoundingBox': [ 123.0, ], 'Polygon': [ [ [ 123.0, ], ], ], 'PolylineCorridor': { 'Polyline': 'string', 'Radius': 123 }, 'PolylinePolygon': [ 'string', ] }, ], 'Geometry': { 'Corridor': { 'LineString': [ [ 123.0, ], ], 'Radius': 123 }, 'BoundingBox': [ 123.0, ], 'Polygon': [ [ [ 123.0, ], ], ], 'PolylineCorridor': { 'Polyline': 'string', 'Radius': 123 }, 'PolylinePolygon': [ 'string', ] } }, ], 'CarShuttleTrains': True|False, 'ControlledAccessHighways': True|False, 'DirtRoads': True|False, 'Ferries': True|False, 'SeasonalClosure': True|False, 'TollRoads': True|False, 'TollTransponders': True|False, 'TruckRoadTypes': [ 'string', ], 'Tunnels': True|False, 'UTurns': True|False, 'ZoneCategories': [ { 'Category': 'CongestionPricing'|'Environmental'|'Vignette' }, ] }, DepartNow=True|False, DepartureTime='string', Destination=[ 123.0, ], DestinationOptions={ 'AvoidActionsForDistance': 123, 'AvoidUTurns': True|False, 'Heading': 123.0, 'Matching': { 'NameHint': 'string', 'OnRoadThreshold': 123, 'Radius': 123, 'Strategy': 'MatchAny'|'MatchMostSignificantRoad' }, 'SideOfStreet': { 'Position': [ 123.0, ], 'UseWith': 'AnyStreet'|'DividedStreetOnly' }, 'StopDuration': 123 }, Driver={ 'Schedule': [ { 'DriveDuration': 123, 'RestDuration': 123 }, ] }, Exclude={ 'Countries': [ 'string', ] }, InstructionsMeasurementSystem='Metric'|'Imperial', Key='string', Languages=[ 'string', ], LegAdditionalFeatures=[ 'Elevation'|'Incidents'|'PassThroughWaypoints'|'Summary'|'Tolls'|'TravelStepInstructions'|'TruckRoadTypes'|'TypicalDuration'|'Zones'|'Bookings'|'IntermediateStops'|'NextDepartures', ], LegGeometryFormat='FlexiblePolyline'|'Simple', MaxAlternatives=123, OptimizeRoutingFor='FastestRoute'|'ShortestRoute', Origin=[ 123.0, ], OriginOptions={ 'AvoidActionsForDistance': 123, 'AvoidUTurns': True|False, 'Heading': 123.0, 'Matching': { 'NameHint': 'string', 'OnRoadThreshold': 123, 'Radius': 123, 'Strategy': 'MatchAny'|'MatchMostSignificantRoad' }, 'SideOfStreet': { 'Position': [ 123.0, ], 'UseWith': 'AnyStreet'|'DividedStreetOnly' } }, SpanAdditionalFeatures=[ 'BestCaseDuration'|'CarAccess'|'Country'|'Distance'|'Duration'|'DynamicSpeed'|'FunctionalClassification'|'Gates'|'Incidents'|'Names'|'Notices'|'PedestrianAccess'|'RailwayCrossings'|'Region'|'RoadAttributes'|'RouteNumbers'|'ScooterAccess'|'SpeedLimit'|'TollSystems'|'TruckAccess'|'TruckRoadTypes'|'TypicalDuration'|'Zones'|'Consumption', ], Tolls={ 'AllTransponders': True|False, 'AllVignettes': True|False, 'Currency': 'string', 'EmissionType': { 'Co2EmissionClass': 'string', 'Type': 'string' }, 'VehicleCategory': 'Minibus' }, Traffic={ 'FlowEventThresholdOverride': 123, 'Usage': 'IgnoreTrafficData'|'UseTrafficData' }, TravelMode='Car'|'Pedestrian'|'Scooter'|'Truck'|'Intermodal'|'Transit', TravelModeOptions={ 'Car': { 'EngineType': 'Electric'|'InternalCombustion'|'PluginHybrid', 'LicensePlate': { 'LastCharacter': 'string' }, 'MaxSpeed': 123.0, 'Occupancy': 123 }, 'Pedestrian': { 'Speed': 123.0 }, 'Scooter': { 'EngineType': 'Electric'|'InternalCombustion'|'PluginHybrid', 'LicensePlate': { 'LastCharacter': 'string' }, 'MaxSpeed': 123.0, 'Occupancy': 123 }, 'Truck': { 'AxleCount': 123, 'EngineType': 'Electric'|'InternalCombustion'|'PluginHybrid', 'GrossWeight': 123, 'HazardousCargos': [ 'Combustible'|'Corrosive'|'Explosive'|'Flammable'|'Gas'|'HarmfulToWater'|'Organic'|'Other'|'Poison'|'PoisonousInhalation'|'Radioactive', ], 'Height': 123, 'HeightAboveFirstAxle': 123, 'KpraLength': 123, 'Length': 123, 'LicensePlate': { 'LastCharacter': 'string' }, 'MaxSpeed': 123.0, 'Occupancy': 123, 'PayloadCapacity': 123, 'TireCount': 123, 'Trailer': { 'AxleCount': 123, 'TrailerCount': 123 }, 'TruckType': 'LightTruck'|'StraightTruck'|'Tractor', 'TunnelRestrictionCode': 'string', 'WeightPerAxle': 123, 'WeightPerAxleGroup': { 'Single': 123, 'Tandem': 123, 'Triple': 123, 'Quad': 123, 'Quint': 123 }, 'Width': 123 }, 'Intermodal': { 'AccessibilityAttributes': [ 'Wheelchair', ], 'MaxTransfers': 123, 'Pedestrian': { 'MaxDistance': 123, 'Speed': 123.0 }, 'Rental': { 'AllowedModes': [ 'All'|'Car', ], 'EnabledFor': [ 'FirstLeg'|'LastLeg'|'EntireRoute'|'None', ], 'ExcludedModes': [ 'All'|'Car', ] }, 'Taxi': { 'AllowedModes': [ 'All'|'Car', ], 'EnabledFor': [ 'FirstLeg'|'LastLeg'|'EntireRoute'|'None', ], 'ExcludedModes': [ 'All'|'Car', ] }, 'Transit': { 'AllowedModes': [ 'AerialTramway'|'Airplane'|'All'|'Bus'|'BusRapidTransit'|'CityTrain'|'Ferry'|'FunicularRailway'|'HighSpeedTrain'|'IntercityTrain'|'InterregionalTrain'|'LightRail'|'Monorail'|'PrivateBus'|'RegionalTrain'|'Subway', ], 'EnabledFor': [ 'FirstLeg'|'LastLeg'|'EntireRoute'|'None', ], 'ExcludedModes': [ 'AerialTramway'|'Airplane'|'All'|'Bus'|'BusRapidTransit'|'CityTrain'|'Ferry'|'FunicularRailway'|'HighSpeedTrain'|'IntercityTrain'|'InterregionalTrain'|'LightRail'|'Monorail'|'PrivateBus'|'RegionalTrain'|'Subway', ] }, 'Vehicle': { 'AllowedModes': [ 'All'|'Car', ], 'EnabledFor': [ 'FirstLeg'|'LastLeg'|'EntireRoute'|'None', ], 'ExcludedModes': [ 'All'|'Car', ] } }, 'Transit': { 'AccessibilityAttributes': [ 'Wheelchair', ], 'AllowedModes': [ 'AerialTramway'|'Airplane'|'All'|'Bus'|'BusRapidTransit'|'CityTrain'|'Ferry'|'FunicularRailway'|'HighSpeedTrain'|'IntercityTrain'|'InterregionalTrain'|'LightRail'|'Monorail'|'PrivateBus'|'RegionalTrain'|'Subway', ], 'ExcludedModes': [ 'AerialTramway'|'Airplane'|'All'|'Bus'|'BusRapidTransit'|'CityTrain'|'Ferry'|'FunicularRailway'|'HighSpeedTrain'|'IntercityTrain'|'InterregionalTrain'|'LightRail'|'Monorail'|'PrivateBus'|'RegionalTrain'|'Subway', ], 'MaxTransfers': 123, 'Pedestrian': { 'MaxDistance': 123, 'Speed': 123.0 } } }, TravelStepType='Default'|'TurnByTurn', Waypoints=[ { 'AvoidActionsForDistance': 123, 'AvoidUTurns': True|False, 'Heading': 123.0, 'Matching': { 'NameHint': 'string', 'OnRoadThreshold': 123, 'Radius': 123, 'Strategy': 'MatchAny'|'MatchMostSignificantRoad' }, 'PassThrough': True|False, 'Position': [ 123.0, ], 'SideOfStreet': { 'Position': [ 123.0, ], 'UseWith': 'AnyStreet'|'DividedStreetOnly' }, 'StopDuration': 123 }, ] )
- Parameters:
Allow (dict) –
Features that are allowed while calculating a route. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.Hot (boolean) –
Allow Hot (High Occupancy Toll) lanes while calculating the route.
Default value:
falseHov (boolean) –
Allow Hov (High Occupancy vehicle) lanes while calculating the route.
Default value:
false
ArrivalTime (string) –
Time of arrival at the destination. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.Time format:
YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mmExamples:
2020-04-22T17:57:24Z2020-04-22T17:57:24+02:00Avoid (dict) –
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-1andap-southeast-5regions support onlyControlledAccessHighways,Ferries, andTollRoadsAreas (list) –
Areas to be avoided. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.(dict) –
Areas to be avoided.
Except (list) –
Exceptions to the provided avoidance geometry, to be included while calculating the route.
(dict) –
Geometry of the area to be avoided.
Corridor (dict) –
Geometry defined as a corridor - a LineString with a radius that defines the width of the corridor.
LineString (list) – [REQUIRED]
An ordered list of positions used to plot a route on a map.
Note
LineString and Polyline are mutually exclusive properties.
(list) –
(float) –
Radius (integer) – [REQUIRED]
Radius that defines the width of the corridor.
BoundingBox (list) –
Geometry defined as a bounding box. The first pair represents the X and Y coordinates (longitude and latitude,) of the southwest corner of the bounding box; the second pair represents the X and Y coordinates (longitude and latitude) of the northeast corner.
(float) –
Polygon (list) –
Geometry defined as a polygon with only one linear ring.
(list) –
(list) –
(float) –
PolylineCorridor (dict) –
Geometry defined as an encoded corridor - an encoded polyline with a radius that defines the width of the corridor.
Polyline (string) – [REQUIRED]
An ordered list of positions used to plot a route on a map in a lossy compression format.
Note
LineString and Polyline are mutually exclusive properties.
Radius (integer) – [REQUIRED]
Considers all roads within the provided radius to match the provided destination to. The roads that are considered are determined by the provided Strategy.
Unit:
meters
PolylinePolygon (list) –
A list of Isoline PolylinePolygon, for each isoline PolylinePolygon, it contains PolylinePolygon of the first linear ring (the outer ring) and from 2nd item to the last item (the inner rings). For more information on polyline encoding, see https://github.com/aws-geospatial/polyline.
(string) –
Geometry (dict) – [REQUIRED]
Geometry of the area to be avoided.
Corridor (dict) –
Geometry defined as a corridor - a LineString with a radius that defines the width of the corridor.
LineString (list) – [REQUIRED]
An ordered list of positions used to plot a route on a map.
Note
LineString and Polyline are mutually exclusive properties.
(list) –
(float) –
Radius (integer) – [REQUIRED]
Radius that defines the width of the corridor.
BoundingBox (list) –
Geometry defined as a bounding box. The first pair represents the X and Y coordinates (longitude and latitude,) of the southwest corner of the bounding box; the second pair represents the X and Y coordinates (longitude and latitude) of the northeast corner.
(float) –
Polygon (list) –
Geometry defined as a polygon with only one linear ring.
(list) –
(list) –
(float) –
PolylineCorridor (dict) –
Geometry defined as an encoded corridor - an encoded polyline with a radius that defines the width of the corridor.
Polyline (string) – [REQUIRED]
An ordered list of positions used to plot a route on a map in a lossy compression format.
Note
LineString and Polyline are mutually exclusive properties.
Radius (integer) – [REQUIRED]
Considers all roads within the provided radius to match the provided destination to. The roads that are considered are determined by the provided Strategy.
Unit:
meters
PolylinePolygon (list) –
A list of Isoline PolylinePolygon, for each isoline PolylinePolygon, it contains PolylinePolygon of the first linear ring (the outer ring) and from 2nd item to the last item (the inner rings). For more information on polyline encoding, see https://github.com/aws-geospatial/polyline.
(string) –
CarShuttleTrains (boolean) –
Avoid car-shuttle-trains while calculating the route. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.ControlledAccessHighways (boolean) –
Avoid controlled access highways while calculating the route.
DirtRoads (boolean) –
Avoid dirt roads while calculating the route. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.Ferries (boolean) –
Avoid ferries while calculating the route.
SeasonalClosure (boolean) –
Avoid roads that have seasonal closure while calculating the route. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.TollRoads (boolean) –
Avoids roads where the specified toll transponders are the only mode of payment.
TollTransponders (boolean) –
Avoids roads where the specified toll transponders are the only mode of payment. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.TruckRoadTypes (list) –
Truck road type identifiers.
BK1throughBK4apply only to Sweden.A2,A4,B2,B4,C,D,ET2,ET4apply only to Mexico. Not supported inap-southeast-1andap-southeast-5regions for GrabMaps customers.Note
There are currently no other supported values as of 26th April 2024.
(string) –
Tunnels (boolean) –
Avoid tunnels while calculating the route. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.UTurns (boolean) –
Avoid U-turns for calculation on highways and motorways. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.ZoneCategories (list) –
Zone categories to be avoided. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.(dict) –
Zone categories to be avoided. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.Category (string) – [REQUIRED]
Zone category to be avoided.
DepartNow (boolean) – Uses the current time as the time of departure.
DepartureTime (string) –
Time of departure from the origin.
Time format:
YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mmExamples:
2020-04-22T17:57:24Z2020-04-22T17:57:24+02:00Destination (list) –
[REQUIRED]
The final position for the route. In the World Geodetic System (WGS 84) format:
[longitude, latitude].(float) –
DestinationOptions (dict) –
Destination related options. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.AvoidActionsForDistance (integer) –
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 (boolean) –
Avoid U-turns for calculation on highways and motorways.
Heading (float) –
GPS Heading at the position.
Matching (dict) –
Options to configure matching the provided position to the road network.
NameHint (string) –
Attempts to match the provided position to a road similar to the provided name.
OnRoadThreshold (integer) –
If the distance to a highway/bridge/tunnel/sliproad is within threshold, the waypoint will be snapped to the highway/bridge/tunnel/sliproad.
Unit:
metersRadius (integer) –
Considers all roads within the provided radius to match the provided destination to. The roads that are considered are determined by the provided Strategy.
Unit:
metersStrategy (string) –
Strategy that defines matching of the position onto the road network. MatchAny considers all roads possible, whereas MatchMostSignificantRoad matches to the most significant road.
SideOfStreet (dict) –
Options to configure matching the provided position to a side of the street.
Position (list) – [REQUIRED]
Position in World Geodetic System (WGS 84) format: [longitude, latitude].
(float) –
UseWith (string) –
Strategy that defines when the side of street position should be used.
Default value:
DividedStreetOnly
StopDuration (integer) –
Duration of the stop.
Unit:
seconds
Driver (dict) –
Driver related options. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.Schedule (list) –
Driver work-rest schedule. Stops are added to fulfil the provided rest schedule.
(dict) –
Interval of the driver work-rest schedule. Stops are added to fulfil the provided rest schedule.
DriveDuration (integer) – [REQUIRED]
Maximum allowed driving time before stopping to rest.
Unit:
secondsRestDuration (integer) – [REQUIRED]
Resting time before the driver can continue driving.
Unit:
seconds
Exclude (dict) –
Features to be strictly excluded while calculating the route. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.Countries (list) – [REQUIRED]
List of countries to be avoided defined by two-letter or three-letter country codes.
(string) –
InstructionsMeasurementSystem (string) – Measurement system to be used for instructions within steps in the response.
Key (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 (list) –
List of languages for instructions within steps in the response. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.Note
Instructions in the requested language are returned only if they are available.
(string) –
LegAdditionalFeatures (list) –
A list of optional additional parameters such as timezone that can be requested for each result. For GrabMaps customers,
ap-southeast-1andap-southeast-5regions support onlyPassThroughWaypoints,Summary, andTravelStepInstructionsElevation: Retrieves the elevation information for each location.Incidents: Provides information on traffic incidents along the route.PassThroughWaypoints: Indicates waypoints that are passed through without stopping.Summary: Returns a summary of the route, including distance and duration.Tolls: Supplies toll cost information along the route.TravelStepInstructions: Provides step-by-step instructions for travel along the route.TruckRoadTypes: Returns information about road types suitable for trucks.TypicalDuration: Gives typical travel duration based on historical data.Zones: Specifies the time zone information for each waypoint.
(string) –
LegGeometryFormat (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 (integer) – Maximum number of alternative routes to be provided in the response, if available. For GrabMaps customers,
ap-southeast-1andap-southeast-5regions support only up to 3 alternative routes.OptimizeRoutingFor (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:
FastestRouteOrigin (list) –
[REQUIRED]
The start position for the route in World Geodetic System (WGS 84) format: [longitude, latitude].
(float) –
OriginOptions (dict) –
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-1andap-southeast-5regions for GrabMaps customers.AvoidActionsForDistance (integer) –
Avoids actions for the provided distance. This is typically to consider for users in moving vehicles who may not have sufficient time to make an action at an origin or a destination.
AvoidUTurns (boolean) –
Avoid U-turns for calculation on highways and motorways.
Heading (float) –
GPS Heading at the position.
Matching (dict) –
Options to configure matching the provided position to the road network.
NameHint (string) –
Attempts to match the provided position to a road similar to the provided name.
OnRoadThreshold (integer) –
If the distance to a highway/bridge/tunnel/sliproad is within threshold, the waypoint will be snapped to the highway/bridge/tunnel/sliproad.
Unit:
metersRadius (integer) –
Considers all roads within the provided radius to match the provided destination to. The roads that are considered are determined by the provided Strategy.
Unit:
metersStrategy (string) –
Strategy that defines matching of the position onto the road network. MatchAny considers all roads possible, whereas MatchMostSignificantRoad matches to the most significant road.
SideOfStreet (dict) –
Options to configure matching the provided position to a side of the street.
Position (list) – [REQUIRED]
Position in World Geodetic System (WGS 84) format: [longitude, latitude].
(float) –
UseWith (string) –
Strategy that defines when the side of street position should be used.
Default value:
DividedStreetOnly
SpanAdditionalFeatures (list) –
A list of optional features such as
SpeedLimitthat 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 inap-southeast-1andap-southeast-5regions for GrabMaps customers.(string) –
Tolls (dict) –
Toll related options. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.AllTransponders (boolean) –
Specifies if the user has valid transponder with access to all toll systems. This impacts toll calculation, and if true the price with transponders is used.
AllVignettes (boolean) –
Specifies if the user has valid vignettes with access for all toll roads. If a user has a vignette for a toll road, then toll cost for that road is omitted since no further payment is necessary.
Currency (string) –
Currency code corresponding to the price. This is the same as Currency specified in the request.
EmissionType (dict) –
Emission type of the vehicle for toll cost calculation.
Valid values:
Euro1, Euro2, Euro3, Euro4, Euro5, Euro6, EuroEevCo2EmissionClass (string) –
The CO 2 emission classes.
Type (string) – [REQUIRED]
Type of the emission.
Valid values:
Euro1, Euro2, Euro3, Euro4, Euro5, Euro6, EuroEev
VehicleCategory (string) –
Vehicle category for toll cost calculation.
Traffic (dict) –
Traffic related options. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.FlowEventThresholdOverride (integer) –
Duration for which flow traffic is considered valid. For this period, the flow traffic is used over historical traffic data. Flow traffic refers to congestion, which changes very quickly. Duration in seconds for which flow traffic event would be considered valid. While flow traffic event is valid it will be used over the historical traffic data.
Usage (string) –
Specifies how traffic data should be used when calculating routes.
Default Value:
UseTrafficDataNote
Traffic data usage depends on the time parameters in your route request:
When
Usageis set toUseTrafficData:If
DepartNowis set totrue, or if you specifyDepartureTimeorArrivalTime, then all traffic data is considered (including live traffic and closures).If
DepartNow,DepartureTime, andArrivalTimeare all unspecified, then only long-term closures are considered, regardless of this setting.
When
Usageis set toIgnoreTrafficData, then all traffic data is ignored regardless of the time parameters in your route request.
TravelMode (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-1andap-southeast-5regions support onlyCar,Pedestrian, andScootervalues.Default value:
CarTravelModeOptions (dict) –
Travel mode related options for the provided travel mode. For GrabMaps customers,
ap-southeast-1andap-southeast-5regions support onlyCarandPedestriantravel mode options.Car (dict) –
Travel mode options when the provided travel mode is
Car.EngineType (string) –
Engine type of the vehicle. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.LicensePlate (dict) –
The vehicle License Plate.
LastCharacter (string) –
The last character of the License Plate.
MaxSpeed (float) –
Maximum speed specified. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.Unit:
kilometers per hourOccupancy (integer) –
The number of occupants in the vehicle. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.Default value:
1
Pedestrian (dict) –
Travel mode options when the provided travel mode is
Pedestrian.Speed (float) –
Walking speed in Kilometers per hour.
Scooter (dict) –
Travel mode options when the provided travel mode is
Scooter.Note
When travel mode is set to
Scooter, then the avoidance optionControlledAccessHighwaysdefaults totrue.EngineType (string) –
Engine type of the vehicle. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.LicensePlate (dict) –
The vehicle License Plate.
LastCharacter (string) –
The last character of the License Plate.
MaxSpeed (float) –
Maximum speed Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.Unit:
kilometers per hourOccupancy (integer) –
The number of occupants in the vehicle. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.Default value:
1
Truck (dict) –
Travel mode options when the provided travel mode is
Truck.AxleCount (integer) –
Total number of axles of the vehicle.
EngineType (string) –
Engine type of the vehicle.
GrossWeight (integer) –
Gross weight of the vehicle including trailers, and goods at capacity.
Unit:
kilogramsHazardousCargos (list) –
List of Hazardous cargo contained in the vehicle.
(string) –
Height (integer) –
Height of the vehicle.
Unit:
centimetersHeightAboveFirstAxle (integer) –
Height of the vehicle above its first axle.
Unit:
centimetersKpraLength (integer) –
Kingpin to rear axle length of the vehicle.
Unit:
centimetersLength (integer) –
Length of the vehicle.
Unit:
cLicensePlate (dict) –
The vehicle License Plate.
LastCharacter (string) –
The last character of the License Plate.
MaxSpeed (float) –
Maximum speed
Unit:
kilometers per hourOccupancy (integer) –
The number of occupants in the vehicle.
Default value:
1PayloadCapacity (integer) –
Payload capacity of the vehicle and trailers attached.
Unit:
kilogramsTireCount (integer) –
Number of tires on the vehicle.
Trailer (dict) –
Trailer options corresponding to the vehicle.
AxleCount (integer) –
Total number of axles of the vehicle.
TrailerCount (integer) –
Number of trailers attached to the vehicle.
Default value:
0
TruckType (string) –
The type of truck:
LightTruckfor smaller delivery vehicles,StraightTruckfor rigid body trucks, orTractorfor tractor-trailer combinations.TunnelRestrictionCode (string) –
The tunnel restriction code.
Tunnel categories in this list indicate the restrictions which apply to certain tunnels in Great Britain. They relate to the types of dangerous goods that can be transported through them.
Tunnel Category B
Risk Level: Limited risk
Restrictions: Few restrictions
Tunnel Category C
Risk Level: Medium risk
Restrictions: Some restrictions
Tunnel Category D
Risk Level: High risk
Restrictions: Many restrictions occur
Tunnel Category E
Risk Level: Very high risk
Restrictions: Restricted tunnel
WeightPerAxle (integer) –
Heaviest weight per axle irrespective of the axle type or the axle group. Meant for usage in countries where the differences in axle types or axle groups are not distinguished.
Unit:
kilogramsWeightPerAxleGroup (dict) –
Specifies the total weight for the specified axle group. Meant for usage in countries that have different regulations based on the axle group type.
Unit:
kilogramsSingle (integer) –
Total weight in kilograms for single axle configurations.
Unit:
kilogramsTandem (integer) –
Total weight in kilograms for tandem (two adjacent) axle configurations.
Unit:
kilogramsTriple (integer) –
Total weight in kilograms for triple (three adjacent) axle configurations.
Unit:
kilogramsQuad (integer) –
Total weight in kilograms for quad (four adjacent) axle configurations.
Unit:
kilogramsQuint (integer) –
Total weight in kilograms for quint (five adjacent) axle configurations.
Unit:
kilograms
Width (integer) –
Width of the vehicle.
Unit:
centimeters
Intermodal (dict) –
Travel mode options when the provided travel mode is
Intermodal.Note
Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.AccessibilityAttributes (list) –
Accessibility attributes to consider when calculating the route.
(string) –
MaxTransfers (integer) –
Maximum number of transfers allowed when calculating the route.
Pedestrian (dict) –
Options for the pedestrian leg of the intermodal route.
MaxDistance (integer) –
Maximum walking distance allowed.
Unit:
metersSpeed (float) –
Walking speed.
Unit:
kilometers per hour
Rental (dict) –
Options for the rental leg of the intermodal route.
AllowedModes (list) –
Allowed rental transport modes when calculating the route. By default, all transport modes are allowed. Cannot be used together with
ExcludedModes.(string) –
EnabledFor (list) –
Specifies the portion of the route for which this leg type is enabled. By default, the leg type is enabled for all legs. Valid values:
FirstLeg- Enable this leg type for the first non-pedestrian leg of the route.LastLeg- Enable this leg type for the last non-pedestrian leg of the route.EntireRoute- Enable this leg type for the entire route.None- Disable this leg type entirely.
(string) –
ExcludedModes (list) –
Excluded rental transport modes when calculating the route. By default, all transport modes are allowed. Cannot be used together with
AllowedModes.(string) –
Taxi (dict) –
Options for the taxi leg of the intermodal route.
AllowedModes (list) –
Allowed taxi transport modes when calculating the route. By default, all transport modes are allowed. Cannot be used together with
ExcludedModes.(string) –
EnabledFor (list) –
Specifies the portion of the route for which this leg type is enabled. By default, the leg type is enabled for all legs. Valid values:
FirstLeg- Enable this leg type for the first non-pedestrian leg of the route.LastLeg- Enable this leg type for the last non-pedestrian leg of the route.EntireRoute- Enable this leg type for the entire route.None- Disable this leg type entirely.
(string) –
ExcludedModes (list) –
Excluded taxi transport modes when calculating the route. By default, all transport modes are allowed. Cannot be used together with
AllowedModes.(string) –
Transit (dict) –
Options for the transit leg of the intermodal route.
AllowedModes (list) –
Allowed transit transport modes when calculating the route. By default, all transport modes are allowed. Cannot be used together with
ExcludedModes.(string) –
EnabledFor (list) –
Specifies the portion of the route for which this leg type is enabled. By default, the leg type is enabled for all legs. Valid values:
FirstLeg- Enable this leg type for the first non-pedestrian leg of the route.LastLeg- Enable this leg type for the last non-pedestrian leg of the route.EntireRoute- Enable this leg type for the entire route.None- Disable this leg type entirely.
(string) –
ExcludedModes (list) –
Excluded transit transport modes when calculating the route. By default, all transport modes are allowed. Cannot be used together with
AllowedModes.(string) –
Vehicle (dict) –
Options for the vehicle leg of the intermodal route.
AllowedModes (list) –
Allowed vehicle transport modes when calculating the route. By default, all transport modes are allowed. Cannot be used together with
ExcludedModes.(string) –
EnabledFor (list) –
Specifies the portion of the route for which this leg type is enabled. By default, the leg type is enabled for all legs. Valid values:
FirstLeg- Enable this leg type for the first non-pedestrian leg of the route.LastLeg- Enable this leg type for the last non-pedestrian leg of the route.EntireRoute- Enable this leg type for the entire route.None- Disable this leg type entirely.
(string) –
ExcludedModes (list) –
Excluded vehicle transport modes when calculating the route. By default, all transport modes are allowed. Cannot be used together with
AllowedModes.(string) –
Transit (dict) –
Travel mode options when the provided travel mode is
Transit.Note
Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.AccessibilityAttributes (list) –
Accessibility attributes to consider when calculating the route.
(string) –
AllowedModes (list) –
Allowed transit transport modes when calculating the route. By default, all transport modes are allowed. Cannot be used together with
ExcludedModes.(string) –
ExcludedModes (list) –
Excluded transit transport modes when calculating the route. By default, all transport modes are allowed. Cannot be used together with
AllowedModes.(string) –
MaxTransfers (integer) –
Maximum number of transfers allowed when calculating the route.
Pedestrian (dict) –
Options for the pedestrian leg of the transit route.
MaxDistance (integer) –
Maximum walking distance allowed.
Unit:
metersSpeed (float) –
Walking speed.
Unit:
kilometers per hour
TravelStepType (string) – Type of step returned by the response.
Defaultprovides basic steps intended for web based applications.TurnByTurnprovides detailed instructions with more granularity intended for a turn based navigation system. For GrabMaps customers,ap-southeast-1andap-southeast-5regionsDefaultdoes not return any steps.Waypoints (list) –
List of waypoints between the Origin and Destination. For GrabMaps customers,
ap-southeast-1andap-southeast-5regions max length is100.Max length:
23(dict) –
Waypoint between the Origin and Destination.
AvoidActionsForDistance (integer) –
Avoids actions for the provided distance. This is typically to consider for users in moving vehicles who may not have sufficient time to make an action at an origin or a destination. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.AvoidUTurns (boolean) –
Avoid U-turns for calculation on highways and motorways. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.Heading (float) –
GPS Heading at the position. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.Matching (dict) –
Options to configure matching the provided position to the road network. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.NameHint (string) –
Attempts to match the provided position to a road similar to the provided name.
OnRoadThreshold (integer) –
If the distance to a highway/bridge/tunnel/sliproad is within threshold, the waypoint will be snapped to the highway/bridge/tunnel/sliproad.
Unit:
metersRadius (integer) –
Considers all roads within the provided radius to match the provided destination to. The roads that are considered are determined by the provided Strategy.
Unit:
metersStrategy (string) –
Strategy that defines matching of the position onto the road network. MatchAny considers all roads possible, whereas MatchMostSignificantRoad matches to the most significant road.
PassThrough (boolean) –
If the waypoint should not be treated as a stop. If yes, the waypoint is passed through and doesn’t split the route into different legs. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.Position (list) – [REQUIRED]
Position in World Geodetic System (WGS 84) format: [longitude, latitude].
(float) –
SideOfStreet (dict) –
Options to configure matching the provided position to a side of the street. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.Position (list) – [REQUIRED]
Position in World Geodetic System (WGS 84) format: [longitude, latitude].
(float) –
UseWith (string) –
Strategy that defines when the side of street position should be used.
Default value:
DividedStreetOnly
StopDuration (integer) –
Duration of the stop. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.Unit:
seconds
- Return type:
dict
- Returns:
Response Syntax
# This section is too large to render. # Please see the AWS API Documentation linked below.
Response Structure
# This section is too large to render. # Please see the AWS API Documentation linked below.
Exceptions