Class: Aws::GeoRoutes::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::GeoRoutes::Client
- Includes:
- ClientStubs
- Defined in:
- gems/aws-sdk-georoutes/lib/aws-sdk-georoutes/client.rb
Overview
An API client for GeoRoutes. To construct a client, you need to configure a :region and :credentials.
client = Aws::GeoRoutes::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the developer guide.
See #initialize for a full list of supported configuration options.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Base
API Operations collapse
-
#calculate_isolines(params = {}) ⇒ Types::CalculateIsolinesResponse
Calculates areas that can be reached within specified time or distance thresholds from a given point.
-
#calculate_route_matrix(params = {}) ⇒ Types::CalculateRouteMatrixResponse
Use
CalculateRouteMatrixto compute results for all pairs of Origins to Destinations. -
#calculate_routes(params = {}) ⇒ Types::CalculateRoutesResponse
CalculateRoutescomputes routes given the following required parameters:OriginandDestination. -
#optimize_waypoints(params = {}) ⇒ Types::OptimizeWaypointsResponse
OptimizeWaypointscalculates 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. -
#snap_to_roads(params = {}) ⇒ Types::SnapToRoadsResponse
SnapToRoadsmatches GPS trace to roads most likely traveled on.
Instance Method Summary collapse
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
Methods included from ClientStubs
#api_requests, #stub_data, #stub_responses
Methods inherited from Seahorse::Client::Base
add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
Parameters:
- options (Hash)
Options Hash (options):
-
:plugins
(Array<Seahorse::Client::Plugin>)
— default:
[]]
—
A list of plugins to apply to the client. Each plugin is either a class name or an instance of a plugin class.
-
:credentials
(required, Aws::CredentialProvider)
—
Your AWS credentials used for authentication. This can be any class that includes and implements
Aws::CredentialProvider, or instance of any one of the following classes:Aws::Credentials- Used for configuring static, non-refreshing credentials.Aws::SharedCredentials- Used for loading static credentials from a shared file, such as~/.aws/config.Aws::AssumeRoleCredentials- Used when you need to assume a role.Aws::AssumeRoleWebIdentityCredentials- Used when you need to assume a role after providing credentials via the web.Aws::SSOCredentials- Used for loading credentials from AWS SSO using an access token generated fromaws login.Aws::ProcessCredentials- Used for loading credentials from a process that outputs to stdout.Aws::InstanceProfileCredentials- Used for loading credentials from an EC2 IMDS on an EC2 instance.Aws::ECSCredentials- Used for loading credentials from instances running in ECS.Aws::CognitoIdentityCredentials- Used for loading credentials from the Cognito Identity service.
When
:credentialsare not configured directly, the following locations will be searched for credentials:Aws.config[:credentials]The
:access_key_id,:secret_access_key,:session_token, and:account_idoptions.ENV['AWS_ACCESS_KEY_ID'],ENV['AWS_SECRET_ACCESS_KEY'],ENV['AWS_SESSION_TOKEN'], andENV['AWS_ACCOUNT_ID'].~/.aws/credentials~/.aws/configEC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of
Aws::InstanceProfileCredentialsorAws::ECSCredentialsto enable retries and extended timeouts. Instance profile credential fetching can be disabled by settingENV['AWS_EC2_METADATA_DISABLED']totrue.
-
:region
(required, String)
—
The AWS region to connect to. The configured
:regionis used to determine the service:endpoint. When not passed, a default:regionis searched for in the following locations:Aws.config[:region]ENV['AWS_REGION']ENV['AMAZON_REGION']ENV['AWS_DEFAULT_REGION']~/.aws/credentials~/.aws/config
- :access_key_id (String)
- :account_id (String)
-
:active_endpoint_cache
(Boolean)
— default:
false
—
When set to
true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults tofalse. -
:adaptive_retry_wait_to_fill
(Boolean)
— default:
true
—
Used only in
adaptiveretry mode. When true, the request will sleep until there is sufficent client side capacity to retry the request. When false, the request will raise aRetryCapacityNotAvailableErrorand will not retry instead of sleeping. -
:auth_scheme_preference
(Array<String>)
—
A list of preferred authentication schemes to use when making a request. Supported values are:
sigv4,sigv4a,httpBearerAuth, andnoAuth. When set usingENV['AWS_AUTH_SCHEME_PREFERENCE']or in shared config asauth_scheme_preference, the value should be a comma-separated list. -
:client_side_monitoring
(Boolean)
— default:
false
—
When
true, client-side metrics will be collected for all API requests from this client. -
:client_side_monitoring_client_id
(String)
— default:
""
—
Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.
-
:client_side_monitoring_host
(String)
— default:
"127.0.0.1"
—
Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.
-
:client_side_monitoring_port
(Integer)
— default:
31000
—
Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.
-
:client_side_monitoring_publisher
(Aws::ClientSideMonitoring::Publisher)
— default:
Aws::ClientSideMonitoring::Publisher
—
Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.
-
:convert_params
(Boolean)
— default:
true
—
When
true, an attempt is made to coerce request parameters into the required types. -
:correct_clock_skew
(Boolean)
— default:
true
—
Used only in
standardand adaptive retry modes. Specifies whether to apply a clock skew correction and retry requests with skewed client clocks. -
:defaults_mode
(String)
— default:
"legacy"
—
See DefaultsModeConfiguration for a list of the accepted modes and the configuration defaults that are included.
-
:disable_host_prefix_injection
(Boolean)
— default:
false
—
When
true, the SDK will not prepend the modeled host prefix to the endpoint. -
:disable_request_compression
(Boolean)
— default:
false
—
When set to 'true' the request body will not be compressed for supported operations.
-
:endpoint
(String, URI::HTTPS, URI::HTTP)
—
Normally you should not configure the
:endpointoption directly. This is normally constructed from the:regionoption. Configuring:endpointis normally reserved for connecting to test or custom endpoints. The endpoint should be a URI formatted like:'http://example.com' 'https://example.com' 'http://example.com:123' -
:endpoint_cache_max_entries
(Integer)
— default:
1000
—
Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.
-
:endpoint_cache_max_threads
(Integer)
— default:
10
—
Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
-
:endpoint_cache_poll_interval
(Integer)
— default:
60
—
When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec.
-
:endpoint_discovery
(Boolean)
— default:
false
—
When set to
true, endpoint discovery will be enabled for operations when available. -
:ignore_configured_endpoint_urls
(Boolean)
—
Setting to true disables use of endpoint URLs provided via environment variables and the shared configuration file.
-
:log_formatter
(Aws::Log::Formatter)
— default:
Aws::Log::Formatter.default
—
The log formatter.
-
:log_level
(Symbol)
— default:
:info
—
The log level to send messages to the
:loggerat. -
:logger
(Logger)
—
The Logger instance to send log messages to. If this option is not set, logging will be disabled.
-
:max_attempts
(Integer)
— default:
3
—
An integer representing the maximum number attempts that will be made for a single request, including the initial attempt. For example, setting this value to 5 will result in a request being retried up to 4 times. Used in
standardandadaptiveretry modes. -
:profile
(String)
— default:
"default"
—
Used when loading credentials from the shared credentials file at
HOME/.aws/credentials. When not specified, 'default' is used. -
:request_checksum_calculation
(String)
— default:
"when_supported"
—
Determines when a checksum will be calculated for request payloads. Values are:
when_supported- (default) When set, a checksum will be calculated for all request payloads of operations modeled with thehttpChecksumtrait whererequestChecksumRequiredistrueand/or arequestAlgorithmMemberis modeled.when_required- When set, a checksum will only be calculated for request payloads of operations modeled with thehttpChecksumtrait whererequestChecksumRequiredistrueor where arequestAlgorithmMemberis modeled and supplied.
-
:request_min_compression_size_bytes
(Integer)
— default:
10240
—
The minimum size in bytes that triggers compression for request bodies. The value must be non-negative integer value between 0 and 10485780 bytes inclusive.
-
:response_checksum_validation
(String)
— default:
"when_supported"
—
Determines when checksum validation will be performed on response payloads. Values are:
when_supported- (default) When set, checksum validation is performed on all response payloads of operations modeled with thehttpChecksumtrait whereresponseAlgorithmsis modeled, except when no modeled checksum algorithms are supported.when_required- When set, checksum validation is not performed on response payloads of operations unless the checksum algorithm is supported and therequestValidationModeMembermember is set toENABLED.
-
:retry_backoff
(Proc)
—
A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay. This option is only used in the
legacyretry mode. -
:retry_base_delay
(Float)
— default:
0.3
—
The base delay in seconds used by the default backoff function. This option is only used in the
legacyretry mode. -
:retry_jitter
(Symbol)
— default:
:none
—
A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number. This option is only used in the
legacyretry mode.@see https://www.awsarchitectureblog.com/2015/03/backoff.html
-
:retry_limit
(Integer)
— default:
3
—
The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors, auth errors, endpoint discovery, and errors from expired credentials. This option is only used in the
legacyretry mode. -
:retry_max_delay
(Integer)
— default:
0
—
The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function. This option is only used in the
legacyretry mode. -
:retry_mode
(String)
— default:
"legacy"
—
Specifies which retry algorithm to use. Values are:
legacy- The pre-existing retry behavior. This is default value if no retry mode is provided.standard- A standardized set of retry rules across the AWS SDKs. This includes support for retry quotas, which limit the number of unsuccessful retries a client can make.adaptive- An experimental retry mode that includes all the functionality ofstandardmode along with automatic client side throttling. This is a provisional mode that may change behavior in the future.
-
:sdk_ua_app_id
(String)
—
A unique and opaque application ID that is appended to the User-Agent header as app/sdk_ua_app_id. It should have a maximum length of 50. This variable is sourced from environment variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
- :secret_access_key (String)
- :session_token (String)
-
:sigv4a_signing_region_set
(Array)
—
A list of regions that should be signed with SigV4a signing. When not passed, a default
:sigv4a_signing_region_setis searched for in the following locations:Aws.config[:sigv4a_signing_region_set]ENV['AWS_SIGV4A_SIGNING_REGION_SET']~/.aws/config
-
:stub_responses
(Boolean)
— default:
false
—
Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.
Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled.
-
:telemetry_provider
(Aws::Telemetry::TelemetryProviderBase)
— default:
Aws::Telemetry::NoOpTelemetryProvider
—
Allows you to provide a telemetry provider, which is used to emit telemetry data. By default, uses
NoOpTelemetryProviderwhich will not record or emit any telemetry data. The SDK supports the following telemetry providers:- OpenTelemetry (OTel) - To use the OTel provider, install and require the
opentelemetry-sdkgem and then, pass in an instance of aAws::Telemetry::OTelProviderfor telemetry provider.
- OpenTelemetry (OTel) - To use the OTel provider, install and require the
-
:token_provider
(Aws::TokenProvider)
—
Your Bearer token used for authentication. This can be any class that includes and implements
Aws::TokenProvider, or instance of any one of the following classes:Aws::StaticTokenProvider- Used for configuring static, non-refreshing tokens.Aws::SSOTokenProvider- Used for loading tokens from AWS SSO using an access token generated fromaws login.
When
:token_provideris not configured directly, theAws::TokenProviderChainwill be used to search for tokens configured for your profile in shared configuration files. -
:use_dualstack_endpoint
(Boolean)
—
When set to
true, dualstack enabled endpoints (with.awsTLD) will be used if available. -
:use_fips_endpoint
(Boolean)
—
When set to
true, fips compatible endpoints will be used if available. When afipsregion is used, the region is normalized and this config is set totrue. -
:validate_params
(Boolean)
— default:
true
—
When
true, request parameters are validated before sending the request. -
:endpoint_provider
(Aws::GeoRoutes::EndpointProvider)
—
The endpoint provider used to resolve endpoints. Any object that responds to
#resolve_endpoint(parameters)whereparametersis a Struct similar toAws::GeoRoutes::EndpointParameters. -
:http_continue_timeout
(Float)
— default:
1
—
The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has "Expect" header set to "100-continue". Defaults to
nilwhich disables this behaviour. This value can safely be set per request on the session. -
:http_idle_timeout
(Float)
— default:
5
—
The number of seconds a connection is allowed to sit idle before it is considered stale. Stale connections are closed and removed from the pool before making a request.
-
:http_open_timeout
(Float)
— default:
15
—
The default number of seconds to wait for response data. This value can safely be set per-request on the session.
-
:http_proxy
(URI::HTTP, String)
—
A proxy to send requests through. Formatted like 'http://proxy.com:123'.
-
:http_read_timeout
(Float)
— default:
60
—
The default number of seconds to wait for response data. This value can safely be set per-request on the session.
-
:http_wire_trace
(Boolean)
— default:
false
—
When
true, HTTP debug output will be sent to the:logger. -
:on_chunk_received
(Proc)
—
When a Proc object is provided, it will be used as callback when each chunk of the response body is received. It provides three arguments: the chunk, the number of bytes received, and the total number of bytes in the response (or nil if the server did not send a
content-length). -
:on_chunk_sent
(Proc)
—
When a Proc object is provided, it will be used as callback when each chunk of the request body is sent. It provides three arguments: the chunk, the number of bytes read from the body, and the total number of bytes in the body.
-
:raise_response_errors
(Boolean)
— default:
true
—
When
true, response errors are raised. -
:ssl_ca_bundle
(String)
—
Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass
:ssl_ca_bundleor:ssl_ca_directorythe the system default will be used if available. -
:ssl_ca_directory
(String)
—
Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass
:ssl_ca_bundleor:ssl_ca_directorythe the system default will be used if available. -
:ssl_ca_store
(String)
—
Sets the X509::Store to verify peer certificate.
-
:ssl_cert
(OpenSSL::X509::Certificate)
—
Sets a client certificate when creating http connections.
-
:ssl_key
(OpenSSL::PKey)
—
Sets a client key when creating http connections.
-
:ssl_timeout
(Float)
—
Sets the SSL timeout in seconds
-
:ssl_verify_peer
(Boolean)
— default:
true
—
When
true, SSL peer certificates are verified when establishing a connection.
473 474 475 |
# File 'gems/aws-sdk-georoutes/lib/aws-sdk-georoutes/client.rb', line 473 def initialize(*args) super end |
Instance Method Details
#calculate_isolines(params = {}) ⇒ Types::CalculateIsolinesResponse
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
For more information, see Calculate isolines in the Amazon Location Service Developer Guide.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.calculate_isolines({
allow: {
hot: false,
hov: false,
},
arrival_time: "TimestampWithTimezoneOffset",
avoid: {
areas: [
{
except: [
{
bounding_box: [1.0],
corridor: {
line_string: [ # required
[1.0],
],
radius: 1, # required
},
polygon: [
[
[1.0],
],
],
polyline_corridor: {
polyline: "Polyline", # required
radius: 1, # required
},
polyline_polygon: ["PolylineRing"],
},
],
geometry: { # required
bounding_box: [1.0],
corridor: {
line_string: [ # required
[1.0],
],
radius: 1, # required
},
polygon: [
[
[1.0],
],
],
polyline_corridor: {
polyline: "Polyline", # required
radius: 1, # required
},
polyline_polygon: ["PolylineRing"],
},
},
],
car_shuttle_trains: false,
controlled_access_highways: false,
dirt_roads: false,
ferries: false,
seasonal_closure: false,
toll_roads: false,
toll_transponders: false,
truck_road_types: ["TruckRoadType"],
tunnels: false,
u_turns: false,
zone_categories: [
{
category: "CongestionPricing", # accepts CongestionPricing, Environmental, Vignette
},
],
},
depart_now: false,
departure_time: "TimestampWithTimezoneOffset",
destination: [1.0],
destination_options: {
avoid_actions_for_distance: 1,
heading: 1.0,
matching: {
name_hint: "SensitiveString",
on_road_threshold: 1,
radius: 1,
strategy: "MatchAny", # accepts MatchAny, MatchMostSignificantRoad
},
side_of_street: {
position: [1.0], # required
use_with: "AnyStreet", # accepts AnyStreet, DividedStreetOnly
},
},
isoline_geometry_format: "FlexiblePolyline", # accepts FlexiblePolyline, Simple
isoline_granularity: {
max_points: 1,
max_resolution: 1,
},
key: "ApiKey",
optimize_isoline_for: "AccurateCalculation", # accepts AccurateCalculation, BalancedCalculation, FastCalculation
optimize_routing_for: "FastestRoute", # accepts FastestRoute, ShortestRoute
origin: [1.0],
origin_options: {
avoid_actions_for_distance: 1,
heading: 1.0,
matching: {
name_hint: "SensitiveString",
on_road_threshold: 1,
radius: 1,
strategy: "MatchAny", # accepts MatchAny, MatchMostSignificantRoad
},
side_of_street: {
position: [1.0], # required
use_with: "AnyStreet", # accepts AnyStreet, DividedStreetOnly
},
},
thresholds: { # required
distance: [1],
time: [1],
},
traffic: {
flow_event_threshold_override: 1,
usage: "IgnoreTrafficData", # accepts IgnoreTrafficData, UseTrafficData
},
travel_mode: "Car", # accepts Car, Pedestrian, Scooter, Truck
travel_mode_options: {
car: {
engine_type: "Electric", # accepts Electric, InternalCombustion, PluginHybrid
license_plate: {
last_character: "IsolineVehicleLicensePlateLastCharacterString",
},
max_speed: 1.0,
occupancy: 1,
},
scooter: {
engine_type: "Electric", # accepts Electric, InternalCombustion, PluginHybrid
license_plate: {
last_character: "IsolineVehicleLicensePlateLastCharacterString",
},
max_speed: 1.0,
occupancy: 1,
},
truck: {
axle_count: 1,
engine_type: "Electric", # accepts Electric, InternalCombustion, PluginHybrid
gross_weight: 1,
hazardous_cargos: ["Combustible"], # accepts Combustible, Corrosive, Explosive, Flammable, Gas, HarmfulToWater, Organic, Other, Poison, PoisonousInhalation, Radioactive
height: 1,
height_above_first_axle: 1,
kpra_length: 1,
length: 1,
license_plate: {
last_character: "IsolineVehicleLicensePlateLastCharacterString",
},
max_speed: 1.0,
occupancy: 1,
payload_capacity: 1,
tire_count: 1,
trailer: {
axle_count: 1,
trailer_count: 1,
},
truck_type: "LightTruck", # accepts LightTruck, StraightTruck, Tractor
tunnel_restriction_code: "TunnelRestrictionCode",
weight_per_axle: 1,
weight_per_axle_group: {
single: 1,
tandem: 1,
triple: 1,
quad: 1,
quint: 1,
},
width: 1,
},
},
})
Response structure
Response structure
resp.arrival_time #=> String
resp.departure_time #=> String
resp.isoline_geometry_format #=> String, one of "FlexiblePolyline", "Simple"
resp.isolines #=> Array
resp.isolines[0].connections #=> Array
resp.isolines[0].connections[0].from_polygon_index #=> Integer
resp.isolines[0].connections[0].geometry.line_string #=> Array
resp.isolines[0].connections[0].geometry.line_string[0] #=> Array
resp.isolines[0].connections[0].geometry.line_string[0][0] #=> Float
resp.isolines[0].connections[0].geometry.polyline #=> String
resp.isolines[0].connections[0].to_polygon_index #=> Integer
resp.isolines[0].distance_threshold #=> Integer
resp.isolines[0].geometries #=> Array
resp.isolines[0].geometries[0].polygon #=> Array
resp.isolines[0].geometries[0].polygon[0] #=> Array
resp.isolines[0].geometries[0].polygon[0][0] #=> Array
resp.isolines[0].geometries[0].polygon[0][0][0] #=> Float
resp.isolines[0].geometries[0].polyline_polygon #=> Array
resp.isolines[0].geometries[0].polyline_polygon[0] #=> String
resp.isolines[0].time_threshold #=> Integer
resp.pricing_bucket #=> String
resp.snapped_destination #=> Array
resp.snapped_destination[0] #=> Float
resp.snapped_origin #=> Array
resp.snapped_origin[0] #=> Float
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:allow
(Types::IsolineAllowOptions)
—
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.
-
:arrival_time
(String)
—
Determine areas from which
Destinationcan 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 withDepartureTimeorDepartNow. Specified as an ISO-8601 timestamp with timezone offset.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:00 -
:avoid
(Types::IsolineAvoidanceOptions)
—
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.
-
:depart_now
(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
DepartureTimeorArrivalTime. -
:departure_time
(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
ArrivalTimeorDepartNow. Specified as an ISO-8601 timestamp with timezone offset.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:00 -
:destination
(Array<Float>)
—
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. EitherOriginorDestinationmust be provided. -
:destination_options
(Types::IsolineDestinationOptions)
—
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.
-
:isoline_geometry_format
(String)
—
The format of the returned IsolineGeometry.
Default value:
FlexiblePolyline -
:isoline_granularity
(Types::IsolineGranularityOptions)
—
Controls the detail level of the generated isolines. Higher granularity produces smoother shapes but requires more processing time and results in larger responses.
-
:key
(String)
—
An Amazon Location Service API Key with access to this action. If omitted, the request must be signed using Signature Version 4.
-
:optimize_isoline_for
(String)
—
Controls the trade-off between calculation speed and isoline precision. Choose
FastCalculationfor quicker results with less detail,AccurateCalculationfor more precise results, orBalancedCalculationfor a middle ground.Default value:
BalancedCalculation -
:optimize_routing_for
(String)
—
Determines whether routes prioritize shortest travel time (
FastestRoute) or shortest physical distance (ShortestRoute) when calculating reachable areas.Default value:
FastestRoute -
:origin
(Array<Float>)
—
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. EitherOriginorDestinationmust be provided. -
:origin_options
(Types::IsolineOriginOptions)
—
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, Types::IsolineThresholds)
—
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
(Types::IsolineTrafficOptions)
—
Configures how real-time and historical traffic data affects isoline calculations. Traffic patterns can significantly impact reachable areas, especially during peak hours.
-
:travel_mode
(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 carsPedestrian—Walking routes using pedestrian paths, sidewalks, and crossingsScooter—Light two-wheeled vehicle routing using roads and paths accessible to scootersTruck—Commercial truck routing considering vehicle dimensions, weight restrictions, and hazardous material regulations
The mode Scooteralso applies to motorcycles; set this toScooterwhen calculating isolines for motorcycles.Default value:
Car -
:travel_mode_options
(Types::IsolineTravelModeOptions)
—
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 vehicleFor cars (
Car), set maximum speed capabilities or indicate high-occupancy vehicle eligibility to better estimate reachable areasFor 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.
Returns:
-
(Types::CalculateIsolinesResponse)
—
Returns a response object which responds to the following methods:
- #arrival_time => String
- #departure_time => String
- #isoline_geometry_format => String
- #isolines => Array<Types::Isoline>
- #pricing_bucket => String
- #snapped_destination => Array<Float>
- #snapped_origin => Array<Float>
See Also:
891 892 893 894 |
# File 'gems/aws-sdk-georoutes/lib/aws-sdk-georoutes/client.rb', line 891 def calculate_isolines(params = {}, options = {}) req = build_request(:calculate_isolines, params) req.send_request(options) end |
#calculate_route_matrix(params = {}) ⇒ Types::CalculateRouteMatrixResponse
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.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.calculate_route_matrix({
allow: {
hot: false,
hov: false,
},
avoid: {
areas: [
{
geometry: { # required
bounding_box: [1.0],
polygon: [
[
[1.0],
],
],
polyline_polygon: ["PolylineRing"],
},
},
],
car_shuttle_trains: false,
controlled_access_highways: false,
dirt_roads: false,
ferries: false,
toll_roads: false,
toll_transponders: false,
truck_road_types: ["TruckRoadType"],
tunnels: false,
u_turns: false,
zone_categories: [
{
category: "CongestionPricing", # accepts CongestionPricing, Environmental, Vignette
},
],
},
depart_now: false,
departure_time: "TimestampWithTimezoneOffset",
destinations: [ # required
{
options: {
avoid_actions_for_distance: 1,
heading: 1.0,
matching: {
name_hint: "SensitiveString",
on_road_threshold: 1,
radius: 1,
strategy: "MatchAny", # accepts MatchAny, MatchMostSignificantRoad
},
side_of_street: {
position: [1.0], # required
use_with: "AnyStreet", # accepts AnyStreet, DividedStreetOnly
},
},
position: [1.0], # required
},
],
exclude: {
countries: ["CountryCode"], # required
},
key: "ApiKey",
optimize_routing_for: "FastestRoute", # accepts FastestRoute, ShortestRoute
origins: [ # required
{
options: {
avoid_actions_for_distance: 1,
heading: 1.0,
matching: {
name_hint: "SensitiveString",
on_road_threshold: 1,
radius: 1,
strategy: "MatchAny", # accepts MatchAny, MatchMostSignificantRoad
},
side_of_street: {
position: [1.0], # required
use_with: "AnyStreet", # accepts AnyStreet, DividedStreetOnly
},
},
position: [1.0], # required
},
],
routing_boundary: {
geometry: {
auto_circle: {
margin: 1,
max_radius: 1,
},
circle: {
center: [1.0], # required
radius: 1.0, # required
},
bounding_box: [1.0],
polygon: [
[
[1.0],
],
],
},
unbounded: false,
},
traffic: {
flow_event_threshold_override: 1,
usage: "IgnoreTrafficData", # accepts IgnoreTrafficData, UseTrafficData
},
travel_mode: "Car", # accepts Car, Pedestrian, Scooter, Truck
travel_mode_options: {
car: {
license_plate: {
last_character: "RouteMatrixVehicleLicensePlateLastCharacterString",
},
max_speed: 1.0,
occupancy: 1,
},
scooter: {
license_plate: {
last_character: "RouteMatrixVehicleLicensePlateLastCharacterString",
},
max_speed: 1.0,
occupancy: 1,
},
truck: {
axle_count: 1,
gross_weight: 1,
hazardous_cargos: ["Combustible"], # accepts Combustible, Corrosive, Explosive, Flammable, Gas, HarmfulToWater, Organic, Other, Poison, PoisonousInhalation, Radioactive
height: 1,
kpra_length: 1,
length: 1,
license_plate: {
last_character: "RouteMatrixVehicleLicensePlateLastCharacterString",
},
max_speed: 1.0,
occupancy: 1,
payload_capacity: 1,
trailer: {
trailer_count: 1,
},
truck_type: "LightTruck", # accepts LightTruck, StraightTruck, Tractor
tunnel_restriction_code: "TunnelRestrictionCode",
weight_per_axle: 1,
weight_per_axle_group: {
single: 1,
tandem: 1,
triple: 1,
quad: 1,
quint: 1,
},
width: 1,
},
},
})
Response structure
Response structure
resp.error_count #=> Integer
resp.pricing_bucket #=> String
resp.route_matrix #=> Array
resp.route_matrix[0] #=> Array
resp.route_matrix[0][0].distance #=> Integer
resp.route_matrix[0][0].duration #=> Integer
resp.route_matrix[0][0].error #=> String, one of "NoMatch", "NoMatchDestination", "NoMatchOrigin", "NoRoute", "OutOfBounds", "OutOfBoundsDestination", "OutOfBoundsOrigin", "Other", "Violation"
resp.routing_boundary.geometry.auto_circle.margin #=> Integer
resp.routing_boundary.geometry.auto_circle.max_radius #=> Integer
resp.routing_boundary.geometry.circle.center #=> Array
resp.routing_boundary.geometry.circle.center[0] #=> Float
resp.routing_boundary.geometry.circle.radius #=> Float
resp.routing_boundary.geometry.bounding_box #=> Array
resp.routing_boundary.geometry.bounding_box[0] #=> Float
resp.routing_boundary.geometry.polygon #=> Array
resp.routing_boundary.geometry.polygon[0] #=> Array
resp.routing_boundary.geometry.polygon[0][0] #=> Array
resp.routing_boundary.geometry.polygon[0][0][0] #=> Float
resp.routing_boundary.unbounded #=> Boolean
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:allow
(Types::RouteMatrixAllowOptions)
—
Features that are allowed while calculating a route.
-
:avoid
(Types::RouteMatrixAvoidanceOptions)
—
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 onlyTollRoads,Ferries, andControlledAccessHighways. -
:depart_now
(Boolean)
—
Uses the current time as the time of departure.
-
:departure_time
(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:00 -
:destinations
(required, Array<Types::RouteMatrixDestination>)
—
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
(Types::RouteMatrixExclusionOptions)
—
Features to be strictly excluded while calculating the route. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers. -
: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.
-
:optimize_routing_for
(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, Array<Types::RouteMatrixOrigin>)
—
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. -
:routing_boundary
(Types::RouteMatrixBoundary)
—
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-1andap-southeast-5regions support onlyUnboundedset totrue.Default value:
Unbounded set to trueWhen request routing boundary was set as AutoCircle, the response routing boundary will return Circle derived from the AutoCircle settings. -
:traffic
(Types::RouteMatrixTrafficOptions)
—
Traffic related options. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers. -
:travel_mode
(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, andScooter.Default value:
Car -
:travel_mode_options
(Types::RouteMatrixTravelModeOptions)
—
Travel mode related options for the provided travel mode. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.
Returns:
-
(Types::CalculateRouteMatrixResponse)
—
Returns a response object which responds to the following methods:
- #error_count => Integer
- #pricing_bucket => String
- #route_matrix => Array<Array<Types::RouteMatrixEntry>>
- #routing_boundary => Types::RouteMatrixBoundary
See Also:
1217 1218 1219 1220 |
# File 'gems/aws-sdk-georoutes/lib/aws-sdk-georoutes/client.rb', line 1217 def calculate_route_matrix(params = {}, options = {}) req = build_request(:calculate_route_matrix, params) req.send_request(options) end |
#calculate_routes(params = {}) ⇒ Types::CalculateRoutesResponse
CalculateRoutes computes routes given the following required
parameters: Origin and Destination.
For more information, see Calculate routes in the Amazon Location Service Developer Guide.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.calculate_routes({
allow: {
hot: false,
hov: false,
},
arrival_time: "TimestampWithTimezoneOffset",
avoid: {
areas: [
{
except: [
{
corridor: {
line_string: [ # required
[1.0],
],
radius: 1, # required
},
bounding_box: [1.0],
polygon: [
[
[1.0],
],
],
polyline_corridor: {
polyline: "Polyline", # required
radius: 1, # required
},
polyline_polygon: ["PolylineRing"],
},
],
geometry: { # required
corridor: {
line_string: [ # required
[1.0],
],
radius: 1, # required
},
bounding_box: [1.0],
polygon: [
[
[1.0],
],
],
polyline_corridor: {
polyline: "Polyline", # required
radius: 1, # required
},
polyline_polygon: ["PolylineRing"],
},
},
],
car_shuttle_trains: false,
controlled_access_highways: false,
dirt_roads: false,
ferries: false,
seasonal_closure: false,
toll_roads: false,
toll_transponders: false,
truck_road_types: ["TruckRoadType"],
tunnels: false,
u_turns: false,
zone_categories: [
{
category: "CongestionPricing", # required, accepts CongestionPricing, Environmental, Vignette
},
],
},
depart_now: false,
departure_time: "TimestampWithTimezoneOffset",
destination: [1.0], # required
destination_options: {
avoid_actions_for_distance: 1,
avoid_u_turns: false,
heading: 1.0,
matching: {
name_hint: "RouteMatchingOptionsNameHintString",
on_road_threshold: 1,
radius: 1,
strategy: "MatchAny", # accepts MatchAny, MatchMostSignificantRoad
},
side_of_street: {
position: [1.0], # required
use_with: "AnyStreet", # accepts AnyStreet, DividedStreetOnly
},
stop_duration: 1,
},
driver: {
schedule: [
{
drive_duration: 1, # required
rest_duration: 1, # required
},
],
},
exclude: {
countries: ["CountryCode"], # required
},
instructions_measurement_system: "Metric", # accepts Metric, Imperial
key: "ApiKey",
languages: ["LanguageTag"],
leg_additional_features: ["Elevation"], # accepts Elevation, Incidents, PassThroughWaypoints, Summary, Tolls, TravelStepInstructions, TruckRoadTypes, TypicalDuration, Zones
leg_geometry_format: "FlexiblePolyline", # accepts FlexiblePolyline, Simple
max_alternatives: 1,
optimize_routing_for: "FastestRoute", # accepts FastestRoute, ShortestRoute
origin: [1.0], # required
origin_options: {
avoid_actions_for_distance: 1,
avoid_u_turns: false,
heading: 1.0,
matching: {
name_hint: "RouteMatchingOptionsNameHintString",
on_road_threshold: 1,
radius: 1,
strategy: "MatchAny", # accepts MatchAny, MatchMostSignificantRoad
},
side_of_street: {
position: [1.0], # required
use_with: "AnyStreet", # accepts AnyStreet, DividedStreetOnly
},
},
span_additional_features: ["BestCaseDuration"], # accepts 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: {
all_transponders: false,
all_vignettes: false,
currency: "CurrencyCode",
emission_type: {
co_2_emission_class: "SensitiveString",
type: "SensitiveString", # required
},
vehicle_category: "Minibus", # accepts Minibus
},
traffic: {
flow_event_threshold_override: 1,
usage: "IgnoreTrafficData", # accepts IgnoreTrafficData, UseTrafficData
},
travel_mode: "Car", # accepts Car, Pedestrian, Scooter, Truck
travel_mode_options: {
car: {
engine_type: "Electric", # accepts Electric, InternalCombustion, PluginHybrid
license_plate: {
last_character: "RouteVehicleLicensePlateLastCharacterString",
},
max_speed: 1.0,
occupancy: 1,
},
pedestrian: {
speed: 1.0,
},
scooter: {
engine_type: "Electric", # accepts Electric, InternalCombustion, PluginHybrid
license_plate: {
last_character: "RouteVehicleLicensePlateLastCharacterString",
},
max_speed: 1.0,
occupancy: 1,
},
truck: {
axle_count: 1,
engine_type: "Electric", # accepts Electric, InternalCombustion, PluginHybrid
gross_weight: 1,
hazardous_cargos: ["Combustible"], # accepts Combustible, Corrosive, Explosive, Flammable, Gas, HarmfulToWater, Organic, Other, Poison, PoisonousInhalation, Radioactive
height: 1,
height_above_first_axle: 1,
kpra_length: 1,
length: 1,
license_plate: {
last_character: "RouteVehicleLicensePlateLastCharacterString",
},
max_speed: 1.0,
occupancy: 1,
payload_capacity: 1,
tire_count: 1,
trailer: {
axle_count: 1,
trailer_count: 1,
},
truck_type: "LightTruck", # accepts LightTruck, StraightTruck, Tractor
tunnel_restriction_code: "RouteTruckOptionsTunnelRestrictionCodeString",
weight_per_axle: 1,
weight_per_axle_group: {
single: 1,
tandem: 1,
triple: 1,
quad: 1,
quint: 1,
},
width: 1,
},
},
travel_step_type: "Default", # accepts Default, TurnByTurn
waypoints: [
{
avoid_actions_for_distance: 1,
avoid_u_turns: false,
heading: 1.0,
matching: {
name_hint: "RouteMatchingOptionsNameHintString",
on_road_threshold: 1,
radius: 1,
strategy: "MatchAny", # accepts MatchAny, MatchMostSignificantRoad
},
pass_through: false,
position: [1.0], # required
side_of_street: {
position: [1.0], # required
use_with: "AnyStreet", # accepts AnyStreet, DividedStreetOnly
},
stop_duration: 1,
},
],
})
Response structure
Response structure
resp.leg_geometry_format #=> String, one of "FlexiblePolyline", "Simple"
resp.notices #=> Array
resp.notices[0].code #=> String, one of "MainLanguageNotFound", "Other", "TravelTimeExceedsDriverWorkHours"
resp.notices[0].impact #=> String, one of "High", "Low"
resp.pricing_bucket #=> String
resp.routes #=> Array
resp.routes[0].legs #=> Array
resp.routes[0].legs[0].ferry_leg_details.after_travel_steps #=> Array
resp.routes[0].legs[0].ferry_leg_details.after_travel_steps[0].duration #=> Integer
resp.routes[0].legs[0].ferry_leg_details.after_travel_steps[0].instruction #=> String
resp.routes[0].legs[0].ferry_leg_details.after_travel_steps[0].type #=> String, one of "Deboard"
resp.routes[0].legs[0].ferry_leg_details.arrival.place.name #=> String
resp.routes[0].legs[0].ferry_leg_details.arrival.place.original_position #=> Array
resp.routes[0].legs[0].ferry_leg_details.arrival.place.original_position[0] #=> Float
resp.routes[0].legs[0].ferry_leg_details.arrival.place.position #=> Array
resp.routes[0].legs[0].ferry_leg_details.arrival.place.position[0] #=> Float
resp.routes[0].legs[0].ferry_leg_details.arrival.place.waypoint_index #=> Integer
resp.routes[0].legs[0].ferry_leg_details.arrival.time #=> String
resp.routes[0].legs[0].ferry_leg_details.before_travel_steps #=> Array
resp.routes[0].legs[0].ferry_leg_details.before_travel_steps[0].duration #=> Integer
resp.routes[0].legs[0].ferry_leg_details.before_travel_steps[0].instruction #=> String
resp.routes[0].legs[0].ferry_leg_details.before_travel_steps[0].type #=> String, one of "Board"
resp.routes[0].legs[0].ferry_leg_details.departure.place.name #=> String
resp.routes[0].legs[0].ferry_leg_details.departure.place.original_position #=> Array
resp.routes[0].legs[0].ferry_leg_details.departure.place.original_position[0] #=> Float
resp.routes[0].legs[0].ferry_leg_details.departure.place.position #=> Array
resp.routes[0].legs[0].ferry_leg_details.departure.place.position[0] #=> Float
resp.routes[0].legs[0].ferry_leg_details.departure.place.waypoint_index #=> Integer
resp.routes[0].legs[0].ferry_leg_details.departure.time #=> String
resp.routes[0].legs[0].ferry_leg_details.notices #=> Array
resp.routes[0].legs[0].ferry_leg_details.notices[0].code #=> String, one of "AccuratePolylineUnavailable", "NoSchedule", "Other", "ViolatedAvoidFerry", "ViolatedAvoidRailFerry", "SeasonalClosure", "PotentialViolatedVehicleRestrictionUsage"
resp.routes[0].legs[0].ferry_leg_details.notices[0].impact #=> String, one of "High", "Low"
resp.routes[0].legs[0].ferry_leg_details.pass_through_waypoints #=> Array
resp.routes[0].legs[0].ferry_leg_details.pass_through_waypoints[0].geometry_offset #=> Integer
resp.routes[0].legs[0].ferry_leg_details.pass_through_waypoints[0].place.original_position #=> Array
resp.routes[0].legs[0].ferry_leg_details.pass_through_waypoints[0].place.original_position[0] #=> Float
resp.routes[0].legs[0].ferry_leg_details.pass_through_waypoints[0].place.position #=> Array
resp.routes[0].legs[0].ferry_leg_details.pass_through_waypoints[0].place.position[0] #=> Float
resp.routes[0].legs[0].ferry_leg_details.pass_through_waypoints[0].place.waypoint_index #=> Integer
resp.routes[0].legs[0].ferry_leg_details.route_name #=> String
resp.routes[0].legs[0].ferry_leg_details.spans #=> Array
resp.routes[0].legs[0].ferry_leg_details.spans[0].country #=> String
resp.routes[0].legs[0].ferry_leg_details.spans[0].distance #=> Integer
resp.routes[0].legs[0].ferry_leg_details.spans[0].duration #=> Integer
resp.routes[0].legs[0].ferry_leg_details.spans[0].geometry_offset #=> Integer
resp.routes[0].legs[0].ferry_leg_details.spans[0].names #=> Array
resp.routes[0].legs[0].ferry_leg_details.spans[0].names[0].language #=> String
resp.routes[0].legs[0].ferry_leg_details.spans[0].names[0].value #=> String
resp.routes[0].legs[0].ferry_leg_details.spans[0].region #=> String
resp.routes[0].legs[0].ferry_leg_details.summary.overview.distance #=> Integer
resp.routes[0].legs[0].ferry_leg_details.summary.overview.duration #=> Integer
resp.routes[0].legs[0].ferry_leg_details.summary.travel_only.duration #=> Integer
resp.routes[0].legs[0].ferry_leg_details.travel_steps #=> Array
resp.routes[0].legs[0].ferry_leg_details.travel_steps[0].distance #=> Integer
resp.routes[0].legs[0].ferry_leg_details.travel_steps[0].duration #=> Integer
resp.routes[0].legs[0].ferry_leg_details.travel_steps[0].geometry_offset #=> Integer
resp.routes[0].legs[0].ferry_leg_details.travel_steps[0].instruction #=> String
resp.routes[0].legs[0].ferry_leg_details.travel_steps[0].type #=> String, one of "Depart", "Continue", "Arrive"
resp.routes[0].legs[0].geometry.line_string #=> Array
resp.routes[0].legs[0].geometry.line_string[0] #=> Array
resp.routes[0].legs[0].geometry.line_string[0][0] #=> Float
resp.routes[0].legs[0].geometry.polyline #=> String
resp.routes[0].legs[0].language #=> String
resp.routes[0].legs[0].pedestrian_leg_details.arrival.place.name #=> String
resp.routes[0].legs[0].pedestrian_leg_details.arrival.place.original_position #=> Array
resp.routes[0].legs[0].pedestrian_leg_details.arrival.place.original_position[0] #=> Float
resp.routes[0].legs[0].pedestrian_leg_details.arrival.place.position #=> Array
resp.routes[0].legs[0].pedestrian_leg_details.arrival.place.position[0] #=> Float
resp.routes[0].legs[0].pedestrian_leg_details.arrival.place.side_of_street #=> String, one of "Left", "Right"
resp.routes[0].legs[0].pedestrian_leg_details.arrival.place.waypoint_index #=> Integer
resp.routes[0].legs[0].pedestrian_leg_details.arrival.time #=> String
resp.routes[0].legs[0].pedestrian_leg_details.departure.place.name #=> String
resp.routes[0].legs[0].pedestrian_leg_details.departure.place.original_position #=> Array
resp.routes[0].legs[0].pedestrian_leg_details.departure.place.original_position[0] #=> Float
resp.routes[0].legs[0].pedestrian_leg_details.departure.place.position #=> Array
resp.routes[0].legs[0].pedestrian_leg_details.departure.place.position[0] #=> Float
resp.routes[0].legs[0].pedestrian_leg_details.departure.place.side_of_street #=> String, one of "Left", "Right"
resp.routes[0].legs[0].pedestrian_leg_details.departure.place.waypoint_index #=> Integer
resp.routes[0].legs[0].pedestrian_leg_details.departure.time #=> String
resp.routes[0].legs[0].pedestrian_leg_details.notices #=> Array
resp.routes[0].legs[0].pedestrian_leg_details.notices[0].code #=> String, one of "AccuratePolylineUnavailable", "Other", "ViolatedAvoidDirtRoad", "ViolatedAvoidTunnel", "ViolatedPedestrianOption"
resp.routes[0].legs[0].pedestrian_leg_details.notices[0].impact #=> String, one of "High", "Low"
resp.routes[0].legs[0].pedestrian_leg_details.pass_through_waypoints #=> Array
resp.routes[0].legs[0].pedestrian_leg_details.pass_through_waypoints[0].geometry_offset #=> Integer
resp.routes[0].legs[0].pedestrian_leg_details.pass_through_waypoints[0].place.original_position #=> Array
resp.routes[0].legs[0].pedestrian_leg_details.pass_through_waypoints[0].place.original_position[0] #=> Float
resp.routes[0].legs[0].pedestrian_leg_details.pass_through_waypoints[0].place.position #=> Array
resp.routes[0].legs[0].pedestrian_leg_details.pass_through_waypoints[0].place.position[0] #=> Float
resp.routes[0].legs[0].pedestrian_leg_details.pass_through_waypoints[0].place.waypoint_index #=> Integer
resp.routes[0].legs[0].pedestrian_leg_details.spans #=> Array
resp.routes[0].legs[0].pedestrian_leg_details.spans[0].best_case_duration #=> Integer
resp.routes[0].legs[0].pedestrian_leg_details.spans[0].country #=> String
resp.routes[0].legs[0].pedestrian_leg_details.spans[0].distance #=> Integer
resp.routes[0].legs[0].pedestrian_leg_details.spans[0].duration #=> Integer
resp.routes[0].legs[0].pedestrian_leg_details.spans[0].dynamic_speed.best_case_speed #=> Float
resp.routes[0].legs[0].pedestrian_leg_details.spans[0].dynamic_speed.turn_duration #=> Integer
resp.routes[0].legs[0].pedestrian_leg_details.spans[0].dynamic_speed.typical_speed #=> Float
resp.routes[0].legs[0].pedestrian_leg_details.spans[0].functional_classification #=> Integer
resp.routes[0].legs[0].pedestrian_leg_details.spans[0].geometry_offset #=> Integer
resp.routes[0].legs[0].pedestrian_leg_details.spans[0].incidents #=> Array
resp.routes[0].legs[0].pedestrian_leg_details.spans[0].incidents[0] #=> Integer
resp.routes[0].legs[0].pedestrian_leg_details.spans[0].names #=> Array
resp.routes[0].legs[0].pedestrian_leg_details.spans[0].names[0].language #=> String
resp.routes[0].legs[0].pedestrian_leg_details.spans[0].names[0].value #=> String
resp.routes[0].legs[0].pedestrian_leg_details.spans[0].pedestrian_access #=> Array
resp.routes[0].legs[0].pedestrian_leg_details.spans[0].pedestrian_access[0] #=> String, one of "Allowed", "Indoors", "NoThroughTraffic", "Park", "Stairs", "TollRoad"
resp.routes[0].legs[0].pedestrian_leg_details.spans[0].region #=> String
resp.routes[0].legs[0].pedestrian_leg_details.spans[0].road_attributes #=> Array
resp.routes[0].legs[0].pedestrian_leg_details.spans[0].road_attributes[0] #=> String, one of "Bridge", "BuiltUpArea", "ControlledAccessHighway", "DirtRoad", "DividedRoad", "Motorway", "PrivateRoad", "Ramp", "RightHandTraffic", "Roundabout", "Tunnel", "UnderConstruction"
resp.routes[0].legs[0].pedestrian_leg_details.spans[0].route_numbers #=> Array
resp.routes[0].legs[0].pedestrian_leg_details.spans[0].route_numbers[0].direction #=> String, one of "East", "North", "South", "West"
resp.routes[0].legs[0].pedestrian_leg_details.spans[0].route_numbers[0].language #=> String
resp.routes[0].legs[0].pedestrian_leg_details.spans[0].route_numbers[0].value #=> String
resp.routes[0].legs[0].pedestrian_leg_details.spans[0].speed_limit.max_speed #=> Float
resp.routes[0].legs[0].pedestrian_leg_details.spans[0].speed_limit.unlimited #=> Boolean
resp.routes[0].legs[0].pedestrian_leg_details.spans[0].typical_duration #=> Integer
resp.routes[0].legs[0].pedestrian_leg_details.summary.overview.distance #=> Integer
resp.routes[0].legs[0].pedestrian_leg_details.summary.overview.duration #=> Integer
resp.routes[0].legs[0].pedestrian_leg_details.summary.travel_only.duration #=> Integer
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps #=> Array
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].continue_step_details.intersection #=> Array
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].continue_step_details.intersection[0].language #=> String
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].continue_step_details.intersection[0].value #=> String
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].current_road.road_name #=> Array
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].current_road.road_name[0].language #=> String
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].current_road.road_name[0].value #=> String
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].current_road.route_number #=> Array
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].current_road.route_number[0].direction #=> String, one of "East", "North", "South", "West"
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].current_road.route_number[0].language #=> String
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].current_road.route_number[0].value #=> String
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].current_road.towards #=> Array
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].current_road.towards[0].language #=> String
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].current_road.towards[0].value #=> String
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].current_road.type #=> String, one of "Highway", "Rural", "Urban"
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].distance #=> Integer
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].duration #=> Integer
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].exit_number #=> Array
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].exit_number[0].language #=> String
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].exit_number[0].value #=> String
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].geometry_offset #=> Integer
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].instruction #=> String
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].keep_step_details.intersection #=> Array
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].keep_step_details.intersection[0].language #=> String
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].keep_step_details.intersection[0].value #=> String
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].keep_step_details.steering_direction #=> String, one of "Left", "Right", "Straight"
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].keep_step_details.turn_angle #=> Float
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].keep_step_details.turn_intensity #=> String, one of "Sharp", "Slight", "Typical"
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].next_road.road_name #=> Array
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].next_road.road_name[0].language #=> String
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].next_road.road_name[0].value #=> String
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].next_road.route_number #=> Array
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].next_road.route_number[0].direction #=> String, one of "East", "North", "South", "West"
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].next_road.route_number[0].language #=> String
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].next_road.route_number[0].value #=> String
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].next_road.towards #=> Array
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].next_road.towards[0].language #=> String
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].next_road.towards[0].value #=> String
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].next_road.type #=> String, one of "Highway", "Rural", "Urban"
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].roundabout_enter_step_details.intersection #=> Array
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].roundabout_enter_step_details.intersection[0].language #=> String
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].roundabout_enter_step_details.intersection[0].value #=> String
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].roundabout_enter_step_details.steering_direction #=> String, one of "Left", "Right", "Straight"
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].roundabout_enter_step_details.turn_angle #=> Float
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].roundabout_enter_step_details.turn_intensity #=> String, one of "Sharp", "Slight", "Typical"
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].roundabout_exit_step_details.intersection #=> Array
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].roundabout_exit_step_details.intersection[0].language #=> String
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].roundabout_exit_step_details.intersection[0].value #=> String
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].roundabout_exit_step_details.relative_exit #=> Integer
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].roundabout_exit_step_details.roundabout_angle #=> Float
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].roundabout_exit_step_details.steering_direction #=> String, one of "Left", "Right", "Straight"
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].roundabout_pass_step_details.intersection #=> Array
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].roundabout_pass_step_details.intersection[0].language #=> String
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].roundabout_pass_step_details.intersection[0].value #=> String
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].roundabout_pass_step_details.steering_direction #=> String, one of "Left", "Right", "Straight"
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].roundabout_pass_step_details.turn_angle #=> Float
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].roundabout_pass_step_details.turn_intensity #=> String, one of "Sharp", "Slight", "Typical"
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].signpost.labels #=> Array
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].signpost.labels[0].route_number.direction #=> String, one of "East", "North", "South", "West"
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].signpost.labels[0].route_number.language #=> String
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].signpost.labels[0].route_number.value #=> String
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].signpost.labels[0].text.language #=> String
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].signpost.labels[0].text.value #=> String
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].turn_step_details.intersection #=> Array
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].turn_step_details.intersection[0].language #=> String
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].turn_step_details.intersection[0].value #=> String
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].turn_step_details.steering_direction #=> String, one of "Left", "Right", "Straight"
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].turn_step_details.turn_angle #=> Float
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].turn_step_details.turn_intensity #=> String, one of "Sharp", "Slight", "Typical"
resp.routes[0].legs[0].pedestrian_leg_details.travel_steps[0].type #=> String, one of "Arrive", "Continue", "Depart", "Keep", "RoundaboutEnter", "RoundaboutExit", "RoundaboutPass", "Turn"
resp.routes[0].legs[0].travel_mode #=> String, one of "Car", "Ferry", "Pedestrian", "Scooter", "Truck", "CarShuttleTrain"
resp.routes[0].legs[0].type #=> String, one of "Ferry", "Pedestrian", "Vehicle"
resp.routes[0].legs[0].vehicle_leg_details.arrival.place.name #=> String
resp.routes[0].legs[0].vehicle_leg_details.arrival.place.original_position #=> Array
resp.routes[0].legs[0].vehicle_leg_details.arrival.place.original_position[0] #=> Float
resp.routes[0].legs[0].vehicle_leg_details.arrival.place.position #=> Array
resp.routes[0].legs[0].vehicle_leg_details.arrival.place.position[0] #=> Float
resp.routes[0].legs[0].vehicle_leg_details.arrival.place.side_of_street #=> String, one of "Left", "Right"
resp.routes[0].legs[0].vehicle_leg_details.arrival.place.waypoint_index #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.arrival.time #=> String
resp.routes[0].legs[0].vehicle_leg_details.departure.place.name #=> String
resp.routes[0].legs[0].vehicle_leg_details.departure.place.original_position #=> Array
resp.routes[0].legs[0].vehicle_leg_details.departure.place.original_position[0] #=> Float
resp.routes[0].legs[0].vehicle_leg_details.departure.place.position #=> Array
resp.routes[0].legs[0].vehicle_leg_details.departure.place.position[0] #=> Float
resp.routes[0].legs[0].vehicle_leg_details.departure.place.side_of_street #=> String, one of "Left", "Right"
resp.routes[0].legs[0].vehicle_leg_details.departure.place.waypoint_index #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.departure.time #=> String
resp.routes[0].legs[0].vehicle_leg_details.incidents #=> Array
resp.routes[0].legs[0].vehicle_leg_details.incidents[0].description #=> String
resp.routes[0].legs[0].vehicle_leg_details.incidents[0].end_time #=> String
resp.routes[0].legs[0].vehicle_leg_details.incidents[0].severity #=> String, one of "Critical", "High", "Medium", "Low"
resp.routes[0].legs[0].vehicle_leg_details.incidents[0].start_time #=> String
resp.routes[0].legs[0].vehicle_leg_details.incidents[0].type #=> String, one of "Accident", "Congestion", "Construction", "DisabledVehicle", "LaneRestriction", "MassTransit", "Other", "PlannedEvent", "RoadClosure", "RoadHazard", "Weather"
resp.routes[0].legs[0].vehicle_leg_details.notices #=> Array
resp.routes[0].legs[0].vehicle_leg_details.notices[0].code #=> String, one of "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"
resp.routes[0].legs[0].vehicle_leg_details.notices[0].details #=> Array
resp.routes[0].legs[0].vehicle_leg_details.notices[0].details[0].title #=> String
resp.routes[0].legs[0].vehicle_leg_details.notices[0].details[0].violated_constraints.all_hazards_restricted #=> Boolean
resp.routes[0].legs[0].vehicle_leg_details.notices[0].details[0].violated_constraints.axle_count.min #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.notices[0].details[0].violated_constraints.axle_count.max #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.notices[0].details[0].violated_constraints.hazardous_cargos #=> Array
resp.routes[0].legs[0].vehicle_leg_details.notices[0].details[0].violated_constraints.hazardous_cargos[0] #=> String, one of "Combustible", "Corrosive", "Explosive", "Flammable", "Gas", "HarmfulToWater", "Organic", "Other", "Poison", "PoisonousInhalation", "Radioactive"
resp.routes[0].legs[0].vehicle_leg_details.notices[0].details[0].violated_constraints.max_height #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.notices[0].details[0].violated_constraints.max_kpra_length #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.notices[0].details[0].violated_constraints.max_length #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.notices[0].details[0].violated_constraints.max_payload_capacity #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.notices[0].details[0].violated_constraints.max_weight.type #=> String, one of "Current", "Gross", "Unknown"
resp.routes[0].legs[0].vehicle_leg_details.notices[0].details[0].violated_constraints.max_weight.value #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.notices[0].details[0].violated_constraints.max_weight_per_axle #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.notices[0].details[0].violated_constraints.max_weight_per_axle_group.single #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.notices[0].details[0].violated_constraints.max_weight_per_axle_group.tandem #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.notices[0].details[0].violated_constraints.max_weight_per_axle_group.triple #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.notices[0].details[0].violated_constraints.max_weight_per_axle_group.quad #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.notices[0].details[0].violated_constraints.max_weight_per_axle_group.quint #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.notices[0].details[0].violated_constraints.max_width #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.notices[0].details[0].violated_constraints.occupancy.min #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.notices[0].details[0].violated_constraints.occupancy.max #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.notices[0].details[0].violated_constraints.restricted_times #=> String
resp.routes[0].legs[0].vehicle_leg_details.notices[0].details[0].violated_constraints.time_dependent #=> Boolean
resp.routes[0].legs[0].vehicle_leg_details.notices[0].details[0].violated_constraints.trailer_count.min #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.notices[0].details[0].violated_constraints.trailer_count.max #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.notices[0].details[0].violated_constraints.travel_mode #=> Boolean
resp.routes[0].legs[0].vehicle_leg_details.notices[0].details[0].violated_constraints.truck_road_type #=> String
resp.routes[0].legs[0].vehicle_leg_details.notices[0].details[0].violated_constraints.truck_type #=> String, one of "LightTruck", "StraightTruck", "Tractor"
resp.routes[0].legs[0].vehicle_leg_details.notices[0].details[0].violated_constraints.tunnel_restriction_code #=> String
resp.routes[0].legs[0].vehicle_leg_details.notices[0].impact #=> String, one of "High", "Low"
resp.routes[0].legs[0].vehicle_leg_details.pass_through_waypoints #=> Array
resp.routes[0].legs[0].vehicle_leg_details.pass_through_waypoints[0].geometry_offset #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.pass_through_waypoints[0].place.original_position #=> Array
resp.routes[0].legs[0].vehicle_leg_details.pass_through_waypoints[0].place.original_position[0] #=> Float
resp.routes[0].legs[0].vehicle_leg_details.pass_through_waypoints[0].place.position #=> Array
resp.routes[0].legs[0].vehicle_leg_details.pass_through_waypoints[0].place.position[0] #=> Float
resp.routes[0].legs[0].vehicle_leg_details.pass_through_waypoints[0].place.waypoint_index #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.spans #=> Array
resp.routes[0].legs[0].vehicle_leg_details.spans[0].best_case_duration #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.spans[0].car_access #=> Array
resp.routes[0].legs[0].vehicle_leg_details.spans[0].car_access[0] #=> String, one of "Allowed", "NoThroughTraffic", "TollRoad"
resp.routes[0].legs[0].vehicle_leg_details.spans[0].country #=> String
resp.routes[0].legs[0].vehicle_leg_details.spans[0].distance #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.spans[0].duration #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.spans[0].dynamic_speed.best_case_speed #=> Float
resp.routes[0].legs[0].vehicle_leg_details.spans[0].dynamic_speed.turn_duration #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.spans[0].dynamic_speed.typical_speed #=> Float
resp.routes[0].legs[0].vehicle_leg_details.spans[0].functional_classification #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.spans[0].gate #=> String, one of "Emergency", "KeyAccess", "PermissionRequired"
resp.routes[0].legs[0].vehicle_leg_details.spans[0].geometry_offset #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.spans[0].incidents #=> Array
resp.routes[0].legs[0].vehicle_leg_details.spans[0].incidents[0] #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.spans[0].names #=> Array
resp.routes[0].legs[0].vehicle_leg_details.spans[0].names[0].language #=> String
resp.routes[0].legs[0].vehicle_leg_details.spans[0].names[0].value #=> String
resp.routes[0].legs[0].vehicle_leg_details.spans[0].notices #=> Array
resp.routes[0].legs[0].vehicle_leg_details.spans[0].notices[0] #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.spans[0].railway_crossing #=> String, one of "Protected", "Unprotected"
resp.routes[0].legs[0].vehicle_leg_details.spans[0].region #=> String
resp.routes[0].legs[0].vehicle_leg_details.spans[0].road_attributes #=> Array
resp.routes[0].legs[0].vehicle_leg_details.spans[0].road_attributes[0] #=> String, one of "Bridge", "BuiltUpArea", "ControlledAccessHighway", "DirtRoad", "DividedRoad", "Motorway", "PrivateRoad", "Ramp", "RightHandTraffic", "Roundabout", "Tunnel", "UnderConstruction"
resp.routes[0].legs[0].vehicle_leg_details.spans[0].route_numbers #=> Array
resp.routes[0].legs[0].vehicle_leg_details.spans[0].route_numbers[0].direction #=> String, one of "East", "North", "South", "West"
resp.routes[0].legs[0].vehicle_leg_details.spans[0].route_numbers[0].language #=> String
resp.routes[0].legs[0].vehicle_leg_details.spans[0].route_numbers[0].value #=> String
resp.routes[0].legs[0].vehicle_leg_details.spans[0].scooter_access #=> Array
resp.routes[0].legs[0].vehicle_leg_details.spans[0].scooter_access[0] #=> String, one of "Allowed", "NoThroughTraffic", "TollRoad"
resp.routes[0].legs[0].vehicle_leg_details.spans[0].speed_limit.max_speed #=> Float
resp.routes[0].legs[0].vehicle_leg_details.spans[0].speed_limit.unlimited #=> Boolean
resp.routes[0].legs[0].vehicle_leg_details.spans[0].toll_systems #=> Array
resp.routes[0].legs[0].vehicle_leg_details.spans[0].toll_systems[0] #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.spans[0].truck_access #=> Array
resp.routes[0].legs[0].vehicle_leg_details.spans[0].truck_access[0] #=> String, one of "Allowed", "NoThroughTraffic", "TollRoad"
resp.routes[0].legs[0].vehicle_leg_details.spans[0].truck_road_types #=> Array
resp.routes[0].legs[0].vehicle_leg_details.spans[0].truck_road_types[0] #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.spans[0].typical_duration #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.spans[0].zones #=> Array
resp.routes[0].legs[0].vehicle_leg_details.spans[0].zones[0] #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.summary.overview.best_case_duration #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.summary.overview.distance #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.summary.overview.duration #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.summary.overview.typical_duration #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.summary.travel_only.best_case_duration #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.summary.travel_only.duration #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.summary.travel_only.typical_duration #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.tolls #=> Array
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].country #=> String
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].payment_sites #=> Array
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].payment_sites[0].name #=> String
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].payment_sites[0].position #=> Array
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].payment_sites[0].position[0] #=> Float
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].rates #=> Array
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].rates[0].applicable_times #=> String
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].rates[0].converted_price.currency #=> String
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].rates[0].converted_price.estimate #=> Boolean
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].rates[0].converted_price.per_duration #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].rates[0].converted_price.range #=> Boolean
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].rates[0].converted_price.range_value.min #=> Float
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].rates[0].converted_price.range_value.max #=> Float
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].rates[0].converted_price.value #=> Float
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].rates[0].id #=> String
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].rates[0].local_price.currency #=> String
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].rates[0].local_price.estimate #=> Boolean
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].rates[0].local_price.per_duration #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].rates[0].local_price.range #=> Boolean
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].rates[0].local_price.range_value.min #=> Float
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].rates[0].local_price.range_value.max #=> Float
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].rates[0].local_price.value #=> Float
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].rates[0].name #=> String
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].rates[0].pass.includes_return_trip #=> Boolean
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].rates[0].pass.senior_pass #=> Boolean
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].rates[0].pass.transfer_count #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].rates[0].pass.trip_count #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].rates[0].pass.validity_period.period #=> String, one of "Annual", "Days", "ExtendedAnnual", "Minutes", "Months"
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].rates[0].pass.validity_period.period_count #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].rates[0].payment_methods #=> Array
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].rates[0].payment_methods[0] #=> String, one of "BankCard", "Cash", "CashExact", "CreditCard", "PassSubscription", "TravelCard", "Transponder", "VideoToll"
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].rates[0].transponders #=> Array
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].rates[0].transponders[0].system_name #=> String
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].systems #=> Array
resp.routes[0].legs[0].vehicle_leg_details.tolls[0].systems[0] #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.toll_systems #=> Array
resp.routes[0].legs[0].vehicle_leg_details.toll_systems[0].name #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps #=> Array
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].continue_highway_step_details.intersection #=> Array
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].continue_highway_step_details.intersection[0].language #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].continue_highway_step_details.intersection[0].value #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].continue_highway_step_details.steering_direction #=> String, one of "Left", "Right", "Straight"
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].continue_highway_step_details.turn_angle #=> Float
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].continue_highway_step_details.turn_intensity #=> String, one of "Sharp", "Slight", "Typical"
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].continue_step_details.intersection #=> Array
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].continue_step_details.intersection[0].language #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].continue_step_details.intersection[0].value #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].current_road.road_name #=> Array
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].current_road.road_name[0].language #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].current_road.road_name[0].value #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].current_road.route_number #=> Array
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].current_road.route_number[0].direction #=> String, one of "East", "North", "South", "West"
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].current_road.route_number[0].language #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].current_road.route_number[0].value #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].current_road.towards #=> Array
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].current_road.towards[0].language #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].current_road.towards[0].value #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].current_road.type #=> String, one of "Highway", "Rural", "Urban"
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].distance #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].duration #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].enter_highway_step_details.intersection #=> Array
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].enter_highway_step_details.intersection[0].language #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].enter_highway_step_details.intersection[0].value #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].enter_highway_step_details.steering_direction #=> String, one of "Left", "Right", "Straight"
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].enter_highway_step_details.turn_angle #=> Float
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].enter_highway_step_details.turn_intensity #=> String, one of "Sharp", "Slight", "Typical"
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].exit_number #=> Array
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].exit_number[0].language #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].exit_number[0].value #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].exit_step_details.intersection #=> Array
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].exit_step_details.intersection[0].language #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].exit_step_details.intersection[0].value #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].exit_step_details.relative_exit #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].exit_step_details.steering_direction #=> String, one of "Left", "Right", "Straight"
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].exit_step_details.turn_angle #=> Float
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].exit_step_details.turn_intensity #=> String, one of "Sharp", "Slight", "Typical"
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].geometry_offset #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].instruction #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].keep_step_details.intersection #=> Array
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].keep_step_details.intersection[0].language #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].keep_step_details.intersection[0].value #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].keep_step_details.steering_direction #=> String, one of "Left", "Right", "Straight"
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].keep_step_details.turn_angle #=> Float
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].keep_step_details.turn_intensity #=> String, one of "Sharp", "Slight", "Typical"
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].next_road.road_name #=> Array
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].next_road.road_name[0].language #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].next_road.road_name[0].value #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].next_road.route_number #=> Array
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].next_road.route_number[0].direction #=> String, one of "East", "North", "South", "West"
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].next_road.route_number[0].language #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].next_road.route_number[0].value #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].next_road.towards #=> Array
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].next_road.towards[0].language #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].next_road.towards[0].value #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].next_road.type #=> String, one of "Highway", "Rural", "Urban"
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].ramp_step_details.intersection #=> Array
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].ramp_step_details.intersection[0].language #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].ramp_step_details.intersection[0].value #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].ramp_step_details.steering_direction #=> String, one of "Left", "Right", "Straight"
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].ramp_step_details.turn_angle #=> Float
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].ramp_step_details.turn_intensity #=> String, one of "Sharp", "Slight", "Typical"
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].roundabout_enter_step_details.intersection #=> Array
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].roundabout_enter_step_details.intersection[0].language #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].roundabout_enter_step_details.intersection[0].value #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].roundabout_enter_step_details.steering_direction #=> String, one of "Left", "Right", "Straight"
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].roundabout_enter_step_details.turn_angle #=> Float
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].roundabout_enter_step_details.turn_intensity #=> String, one of "Sharp", "Slight", "Typical"
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].roundabout_exit_step_details.intersection #=> Array
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].roundabout_exit_step_details.intersection[0].language #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].roundabout_exit_step_details.intersection[0].value #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].roundabout_exit_step_details.relative_exit #=> Integer
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].roundabout_exit_step_details.roundabout_angle #=> Float
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].roundabout_exit_step_details.steering_direction #=> String, one of "Left", "Right", "Straight"
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].roundabout_pass_step_details.intersection #=> Array
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].roundabout_pass_step_details.intersection[0].language #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].roundabout_pass_step_details.intersection[0].value #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].roundabout_pass_step_details.steering_direction #=> String, one of "Left", "Right", "Straight"
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].roundabout_pass_step_details.turn_angle #=> Float
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].roundabout_pass_step_details.turn_intensity #=> String, one of "Sharp", "Slight", "Typical"
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].signpost.labels #=> Array
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].signpost.labels[0].route_number.direction #=> String, one of "East", "North", "South", "West"
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].signpost.labels[0].route_number.language #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].signpost.labels[0].route_number.value #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].signpost.labels[0].text.language #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].signpost.labels[0].text.value #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].turn_step_details.intersection #=> Array
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].turn_step_details.intersection[0].language #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].turn_step_details.intersection[0].value #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].turn_step_details.steering_direction #=> String, one of "Left", "Right", "Straight"
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].turn_step_details.turn_angle #=> Float
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].turn_step_details.turn_intensity #=> String, one of "Sharp", "Slight", "Typical"
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].type #=> String, one of "Arrive", "Continue", "ContinueHighway", "Depart", "EnterHighway", "Exit", "Keep", "Ramp", "RoundaboutEnter", "RoundaboutExit", "RoundaboutPass", "Turn", "UTurn"
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].u_turn_step_details.intersection #=> Array
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].u_turn_step_details.intersection[0].language #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].u_turn_step_details.intersection[0].value #=> String
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].u_turn_step_details.steering_direction #=> String, one of "Left", "Right", "Straight"
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].u_turn_step_details.turn_angle #=> Float
resp.routes[0].legs[0].vehicle_leg_details.travel_steps[0].u_turn_step_details.turn_intensity #=> String, one of "Sharp", "Slight", "Typical"
resp.routes[0].legs[0].vehicle_leg_details.truck_road_types #=> Array
resp.routes[0].legs[0].vehicle_leg_details.truck_road_types[0] #=> String
resp.routes[0].legs[0].vehicle_leg_details.zones #=> Array
resp.routes[0].legs[0].vehicle_leg_details.zones[0].category #=> String, one of "CongestionPricing", "Environmental", "Vignette"
resp.routes[0].legs[0].vehicle_leg_details.zones[0].name #=> String
resp.routes[0].major_road_labels #=> Array
resp.routes[0].major_road_labels[0].road_name.language #=> String
resp.routes[0].major_road_labels[0].road_name.value #=> String
resp.routes[0].major_road_labels[0].route_number.direction #=> String, one of "East", "North", "South", "West"
resp.routes[0].major_road_labels[0].route_number.language #=> String
resp.routes[0].major_road_labels[0].route_number.value #=> String
resp.routes[0].summary.distance #=> Integer
resp.routes[0].summary.duration #=> Integer
resp.routes[0].summary.tolls.total.currency #=> String
resp.routes[0].summary.tolls.total.estimate #=> Boolean
resp.routes[0].summary.tolls.total.range #=> Boolean
resp.routes[0].summary.tolls.total.range_value.min #=> Float
resp.routes[0].summary.tolls.total.range_value.max #=> Float
resp.routes[0].summary.tolls.total.value #=> Float
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:allow
(Types::RouteAllowOptions)
—
Features that are allowed while calculating a route. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers. -
:arrival_time
(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:00 -
:avoid
(Types::RouteAvoidanceOptions)
—
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, andTollRoads -
:depart_now
(Boolean)
—
Uses the current time as the time of departure.
-
:departure_time
(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:00 -
:destination
(required, Array<Float>)
—
The final position for the route. In the World Geodetic System (WGS 84) format:
[longitude, latitude]. -
:destination_options
(Types::RouteDestinationOptions)
—
Destination related options. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers. -
:driver
(Types::RouteDriverOptions)
—
Driver related options. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers. -
:exclude
(Types::RouteExclusionOptions)
—
Features to be strictly excluded while calculating the route. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers. -
:instructions_measurement_system
(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
(Array<String>)
—
List of languages for instructions within steps in the response. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.Instructions in the requested language are returned only if they are available. -
:leg_additional_features
(Array<String>)
—
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.
-
:leg_geometry_format
(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. -
:max_alternatives
(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. -
:optimize_routing_for
(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, Array<Float>)
—
The start position for the route in World Geodetic System (WGS 84) format: [longitude, latitude].
-
:origin_options
(Types::RouteOriginOptions)
—
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. -
:span_additional_features
(Array<String>)
—
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. -
:tolls
(Types::RouteTollOptions)
—
Toll related options. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers. -
:traffic
(Types::RouteTrafficOptions)
—
Traffic related options. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers. -
:travel_mode
(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:
Car -
:travel_mode_options
(Types::RouteTravelModeOptions)
—
Travel mode related options for the provided travel mode. For GrabMaps customers,
ap-southeast-1andap-southeast-5regions support onlyCarandPedestriantravel mode options. -
:travel_step_type
(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
(Array<Types::RouteWaypoint>)
—
List of waypoints between the Origin and Destination. For GrabMaps customers,
ap-southeast-1andap-southeast-5regions max length is100.Max length:
23
Returns:
-
(Types::CalculateRoutesResponse)
—
Returns a response object which responds to the following methods:
- #leg_geometry_format => String
- #notices => Array<Types::RouteResponseNotice>
- #pricing_bucket => String
- #routes => Array<Types::Route>
See Also:
2169 2170 2171 2172 |
# File 'gems/aws-sdk-georoutes/lib/aws-sdk-georoutes/client.rb', line 2169 def calculate_routes(params = {}, options = {}) req = build_request(:calculate_routes, params) req.send_request(options) end |
#optimize_waypoints(params = {}) ⇒ Types::OptimizeWaypointsResponse
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.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.optimize_waypoints({
avoid: {
areas: [
{
geometry: { # required
bounding_box: [1.0],
},
},
],
car_shuttle_trains: false,
controlled_access_highways: false,
dirt_roads: false,
ferries: false,
toll_roads: false,
tunnels: false,
u_turns: false,
},
clustering: {
algorithm: "DrivingDistance", # required, accepts DrivingDistance, TopologySegment
driving_distance_options: {
driving_distance: 1, # required
},
},
departure_time: "TimestampWithTimezoneOffset",
destination: [1.0],
destination_options: {
access_hours: {
from: { # required
day_of_week: "Monday", # required, accepts Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
time_of_day: "TimeOfDay", # required
},
to: { # required
day_of_week: "Monday", # required, accepts Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
time_of_day: "TimeOfDay", # required
},
},
appointment_time: "TimestampWithTimezoneOffset",
heading: 1.0,
id: "WaypointId",
service_duration: 1,
side_of_street: {
position: [1.0], # required
use_with: "AnyStreet", # accepts AnyStreet, DividedStreetOnly
},
},
driver: {
rest_cycles: {
long_cycle: { # required
rest_duration: 1, # required
work_duration: 1, # required
},
short_cycle: { # required
rest_duration: 1, # required
work_duration: 1, # required
},
},
rest_profile: {
profile: "WaypointOptimizationRestProfileProfileString", # required
},
treat_service_time_as: "Rest", # accepts Rest, Work
},
exclude: {
countries: ["CountryCode"], # required
},
key: "ApiKey",
optimize_sequencing_for: "FastestRoute", # accepts FastestRoute, ShortestRoute
origin: [1.0], # required
origin_options: {
id: "WaypointId",
},
traffic: {
usage: "IgnoreTrafficData", # accepts IgnoreTrafficData, UseTrafficData
},
travel_mode: "Car", # accepts Car, Pedestrian, Scooter, Truck
travel_mode_options: {
pedestrian: {
speed: 1.0,
},
truck: {
gross_weight: 1,
hazardous_cargos: ["Combustible"], # accepts Combustible, Corrosive, Explosive, Flammable, Gas, HarmfulToWater, Organic, Other, Poison, PoisonousInhalation, Radioactive
height: 1,
length: 1,
trailer: {
trailer_count: 1,
},
truck_type: "StraightTruck", # accepts StraightTruck, Tractor
tunnel_restriction_code: "TunnelRestrictionCode",
weight_per_axle: 1,
width: 1,
},
},
waypoints: [
{
access_hours: {
from: { # required
day_of_week: "Monday", # required, accepts Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
time_of_day: "TimeOfDay", # required
},
to: { # required
day_of_week: "Monday", # required, accepts Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
time_of_day: "TimeOfDay", # required
},
},
appointment_time: "TimestampWithTimezoneOffset",
before: [1],
heading: 1.0,
id: "WaypointId",
position: [1.0], # required
service_duration: 1,
side_of_street: {
position: [1.0], # required
use_with: "AnyStreet", # accepts AnyStreet, DividedStreetOnly
},
},
],
})
Response structure
Response structure
resp.connections #=> Array
resp.connections[0].distance #=> Integer
resp.connections[0].from #=> String
resp.connections[0].rest_duration #=> Integer
resp.connections[0].to #=> String
resp.connections[0].travel_duration #=> Integer
resp.connections[0].wait_duration #=> Integer
resp.distance #=> Integer
resp.duration #=> Integer
resp.impeding_waypoints #=> Array
resp.impeding_waypoints[0].failed_constraints #=> Array
resp.impeding_waypoints[0].failed_constraints[0].constraint #=> String, one of "AccessHours", "AppointmentTime", "Before", "Heading", "ServiceDuration", "SideOfStreet"
resp.impeding_waypoints[0].failed_constraints[0].reason #=> String
resp.impeding_waypoints[0].id #=> String
resp.impeding_waypoints[0].position #=> Array
resp.impeding_waypoints[0].position[0] #=> Float
resp.optimized_waypoints #=> Array
resp.optimized_waypoints[0].arrival_time #=> String
resp.optimized_waypoints[0].cluster_index #=> Integer
resp.optimized_waypoints[0].departure_time #=> String
resp.optimized_waypoints[0].id #=> String
resp.optimized_waypoints[0].position #=> Array
resp.optimized_waypoints[0].position[0] #=> Float
resp.pricing_bucket #=> String
resp.time_breakdown.rest_duration #=> Integer
resp.time_breakdown.service_duration #=> Integer
resp.time_breakdown.travel_duration #=> Integer
resp.time_breakdown.wait_duration #=> Integer
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:avoid
(Types::WaypointOptimizationAvoidanceOptions)
—
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
(Types::WaypointOptimizationClusteringOptions)
—
Clustering allows you to specify how nearby waypoints can be clustered to improve the optimized sequence.
-
:departure_time
(String)
—
Departure time from the waypoint.
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:00 -
:destination
(Array<Float>)
—
The final position for the route in the World Geodetic System (WGS 84) format:
[longitude, latitude]. -
:destination_options
(Types::WaypointOptimizationDestinationOptions)
—
Destination related options.
-
:driver
(Types::WaypointOptimizationDriverOptions)
—
Driver related options.
-
:exclude
(Types::WaypointOptimizationExclusionOptions)
—
Features to be strictly excluded while calculating the route.
-
: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.
-
:optimize_sequencing_for
(String)
—
Specifies the optimization criteria for the calculated sequence.
Default value:
FastestRoute. -
:origin
(required, Array<Float>)
—
The start position for the route in World Geodetic System (WGS 84) format: [longitude, latitude].
-
:origin_options
(Types::WaypointOptimizationOriginOptions)
—
Origin related options.
-
:traffic
(Types::WaypointOptimizationTrafficOptions)
—
Traffic-related options.
-
:travel_mode
(String)
—
Specifies the mode of transport when calculating a route. Used in estimating the speed of travel and road compatibility.
Default value:
Car -
:travel_mode_options
(Types::WaypointOptimizationTravelModeOptions)
—
Travel mode related options for the provided travel mode.
-
:waypoints
(Array<Types::WaypointOptimizationWaypoint>)
—
List of waypoints between the
OriginandDestination.
Returns:
-
(Types::OptimizeWaypointsResponse)
—
Returns a response object which responds to the following methods:
- #connections => Array<Types::WaypointOptimizationConnection>
- #distance => Integer
- #duration => Integer
- #impeding_waypoints => Array<Types::WaypointOptimizationImpedingWaypoint>
- #optimized_waypoints => Array<Types::WaypointOptimizationOptimizedWaypoint>
- #pricing_bucket => String
- #time_breakdown => Types::WaypointOptimizationTimeBreakdown
See Also:
2415 2416 2417 2418 |
# File 'gems/aws-sdk-georoutes/lib/aws-sdk-georoutes/client.rb', line 2415 def optimize_waypoints(params = {}, options = {}) req = build_request(:optimize_waypoints, params) req.send_request(options) end |
#snap_to_roads(params = {}) ⇒ Types::SnapToRoadsResponse
SnapToRoads matches GPS trace to roads most likely traveled on.
For more information, see Snap to Roads in the Amazon Location Service Developer Guide.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.snap_to_roads({
key: "ApiKey",
snapped_geometry_format: "FlexiblePolyline", # accepts FlexiblePolyline, Simple
snap_radius: 1,
trace_points: [ # required
{
heading: 1.0,
position: [1.0], # required
speed: 1.0,
timestamp: "TimestampWithTimezoneOffset",
},
],
travel_mode: "Car", # accepts Car, Pedestrian, Scooter, Truck
travel_mode_options: {
truck: {
gross_weight: 1,
hazardous_cargos: ["Combustible"], # accepts Combustible, Corrosive, Explosive, Flammable, Gas, HarmfulToWater, Organic, Other, Poison, PoisonousInhalation, Radioactive
height: 1,
length: 1,
trailer: {
trailer_count: 1,
},
tunnel_restriction_code: "TunnelRestrictionCode",
width: 1,
},
},
})
Response structure
Response structure
resp.notices #=> Array
resp.notices[0].code #=> String, one of "TracePointsHeadingIgnored", "TracePointsIgnored", "TracePointsMovedByLargeDistance", "TracePointsNotMatched", "TracePointsOutOfSequence", "TracePointsSpeedEstimated", "TracePointsSpeedIgnored"
resp.notices[0].title #=> String
resp.notices[0].trace_point_indexes #=> Array
resp.notices[0].trace_point_indexes[0] #=> Integer
resp.pricing_bucket #=> String
resp.snapped_geometry.line_string #=> Array
resp.snapped_geometry.line_string[0] #=> Array
resp.snapped_geometry.line_string[0][0] #=> Float
resp.snapped_geometry.polyline #=> String
resp.snapped_geometry_format #=> String, one of "FlexiblePolyline", "Simple"
resp.snapped_trace_points #=> Array
resp.snapped_trace_points[0].confidence #=> Float
resp.snapped_trace_points[0].original_position #=> Array
resp.snapped_trace_points[0].original_position[0] #=> Float
resp.snapped_trace_points[0].snapped_position #=> Array
resp.snapped_trace_points[0].snapped_position[0] #=> Float
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
: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.
-
:snapped_geometry_format
(String)
—
Chooses what the returned SnappedGeometry format should be.
Default value:
FlexiblePolyline -
:snap_radius
(Integer)
—
The radius around the provided tracepoint that is considered for snapping.
Unit:
metersDefault value:
300 -
:trace_points
(required, Array<Types::RoadSnapTracePoint>)
—
List of trace points to be snapped onto the road network.
-
:travel_mode
(String)
—
Specifies the mode of transport when calculating a route. Used in estimating the speed of travel and road compatibility.
Default value:
Car -
:travel_mode_options
(Types::RoadSnapTravelModeOptions)
—
Travel mode related options for the provided travel mode.
Returns:
-
(Types::SnapToRoadsResponse)
—
Returns a response object which responds to the following methods:
- #notices => Array<Types::RoadSnapNotice>
- #pricing_bucket => String
- #snapped_geometry => Types::RoadSnapSnappedGeometry
- #snapped_geometry_format => String
- #snapped_trace_points => Array<Types::RoadSnapSnappedTracePoint>
See Also:
2520 2521 2522 2523 |
# File 'gems/aws-sdk-georoutes/lib/aws-sdk-georoutes/client.rb', line 2520 def snap_to_roads(params = {}, options = {}) req = build_request(:snap_to_roads, params) req.send_request(options) end |