class Aws::LocationService::Types::CalculateRouteRequest
@note When making an API call, you may pass CalculateRouteRequest
data as a hash: { calculator_name: "ResourceName", # required car_mode_options: { avoid_ferries: false, avoid_tolls: false, }, depart_now: false, departure_position: [1.0], # required departure_time: Time.now, destination_position: [1.0], # required distance_unit: "Kilometers", # accepts Kilometers, Miles include_leg_geometry: false, travel_mode: "Car", # accepts Car, Truck, Walking truck_mode_options: { avoid_ferries: false, avoid_tolls: false, dimensions: { height: 1.0, length: 1.0, unit: "Meters", # accepts Meters, Feet width: 1.0, }, weight: { total: 1.0, unit: "Kilograms", # accepts Kilograms, Pounds }, }, waypoint_positions: [ [1.0], ], }
@!attribute [rw] calculator_name
The name of the route calculator resource that you want to use to calculate a route. @return [String]
@!attribute [rw] car_mode_options
Specifies route preferences when traveling by `Car`, such as avoiding routes that use ferries or tolls. Requirements: `TravelMode` must be specified as `Car`. @return [Types::CalculateRouteCarModeOptions]
@!attribute [rw] depart_now
Sets the time of departure as the current time. Uses the current time to calculate a route. Otherwise, the best time of day to travel with the best traffic conditions is used to calculate the route. Default Value: `false` Valid Values: `false` \| `true` @return [Boolean]
@!attribute [rw] departure_position
The start position for the route. Defined in [WGS 84][1] format: `[longitude, latitude]`. * For example, `[-123.115, 49.285]` ^ <note markdown="1"> If you specify a departure that's not located on a road, Amazon Location [moves the position to the nearest road][2]. </note> Valid Values: `[-180 to 180,-90 to 90]` [1]: https://earth-info.nga.mil/GandG/wgs84/index.html [2]: https://docs.aws.amazon.com/location/latest/developerguide/calculate-route.html#snap-to-nearby-road @return [Array<Float>]
@!attribute [rw] departure_time
Specifies the desired time of departure. Uses the given time to calculate a route. Otherwise, the best time of day to travel with the best traffic conditions is used to calculate the route. <note markdown="1"> Setting a departure time in the past returns a `400 ValidationException` error. </note> * In [ISO 8601][1] format: `YYYY-MM-DDThh:mm:ss.sssZ`. For example, `2020–07-2T12:15:20.000Z+01:00` ^ [1]: https://www.iso.org/iso-8601-date-and-time-format.html @return [Time]
@!attribute [rw] destination_position
The finish position for the route. Defined in [WGS 84][1] format: `[longitude, latitude]`. * For example, `[-122.339, 47.615]` ^ <note markdown="1"> If you specify a destination that's not located on a road, Amazon Location [moves the position to the nearest road][2]. </note> Valid Values: `[-180 to 180,-90 to 90]` [1]: https://earth-info.nga.mil/GandG/wgs84/index.html [2]: https://docs.aws.amazon.com/location/latest/developerguide/calculate-route.html#snap-to-nearby-road @return [Array<Float>]
@!attribute [rw] distance_unit
Set the unit system to specify the distance. Default Value: `Kilometers` @return [String]
@!attribute [rw] include_leg_geometry
Set to include the geometry details in the result for each path between a pair of positions. Default Value: `false` Valid Values: `false` \| `true` @return [Boolean]
@!attribute [rw] travel_mode
Specifies the mode of transport when calculating a route. Used in estimating the speed of travel and road compatibility. The `TravelMode` you specify determines how you specify route preferences: * If traveling by `Car` use the `CarModeOptions` parameter. * If traveling by `Truck` use the `TruckModeOptions` parameter. Default Value: `Car` @return [String]
@!attribute [rw] truck_mode_options
Specifies route preferences when traveling by `Truck`, such as avoiding routes that use ferries or tolls, and truck specifications to consider when choosing an optimal road. Requirements: `TravelMode` must be specified as `Truck`. @return [Types::CalculateRouteTruckModeOptions]
@!attribute [rw] waypoint_positions
Specifies an ordered list of up to 23 intermediate positions to include along a route between the departure position and destination position. * For example, from the `DeparturePosition` `[-123.115, 49.285]`, the route follows the order that the waypoint positions are given `[[-122.757, 49.0021],[-122.349, 47.620]]` ^ <note markdown="1"> If you specify a waypoint position that's not located on a road, Amazon Location [moves the position to the nearest road][1]. Specifying more than 23 waypoints returns a `400 ValidationException` error. </note> Valid Values: `[-180 to 180,-90 to 90]` [1]: https://docs.aws.amazon.com/location/latest/developerguide/calculate-route.html#snap-to-nearby-road @return [Array<Array<Float>>]
@see docs.aws.amazon.com/goto/WebAPI/location-2020-11-19/CalculateRouteRequest AWS API Documentation
Constants
- SENSITIVE