GeoRoutesClient

With the Amazon Location Routes API you can calculate routes and estimate travel time based on up-to-date road network and live traffic information.

Calculate optimal travel routes and estimate travel times using up-to-date road network and traffic data. Key features include:

  • Point-to-point routing with estimated travel time, distance, and turn-by-turn directions

  • Multi-point route optimization to minimize travel time or distance

  • Route matrices for efficient multi-destination planning

  • Isoline calculations to determine reachable areas within specified time or distance thresholds

  • Map-matching to align GPS traces with the road network

Installation

NPM
npm install @aws-sdk/client-geo-routes
Yarn
yarn add @aws-sdk/client-geo-routes
pnpm
pnpm add @aws-sdk/client-geo-routes

GeoRoutesClient Operations

Command
Summary
CalculateIsolinesCommand

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

CalculateRouteMatrixCommand

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.

CalculateRoutesCommand

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

OptimizeWaypointsCommand

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.

SnapToRoadsCommand

SnapToRoads matches GPS trace to roads most likely traveled on.

GeoRoutesClient Configuration

Parameter
Type
Description
defaultsMode
Optional
DefaultsMode | Provider<DefaultsMode>
The @smithy/smithy-client#DefaultsMode that will be used to determine how certain default configuration options are resolved in the SDK.
disableHostPrefix
Optional
boolean
Disable dynamically changing the endpoint of the client based on the hostPrefix trait of an operation.
extensions
Optional
RuntimeExtension[]
Optional extensions
logger
Optional
Logger
Optional logger for logging debug/info/warn/error.
maxAttempts
Optional
number | Provider<number>
Value for how many times a request will be made at most in case of retry.
profile
Optional
string
Setting a client profile is similar to setting a value for the AWS_PROFILE environment variable. Setting a profile on a client in code only affects the single client instance, unlike AWS_PROFILE.When set, and only for environments where an AWS configuration file exists, fields configurable by this file will be retrieved from the specified profile within that file. Conflicting code configuration and environment variables will still have higher priority.For client credential resolution that involves checking the AWS configuration file, the client's profile (this value) will be used unless a different profile is set in the credential provider options.
region
Optional
string | Provider<string>
The AWS region to which this client will send requests
requestHandler
Optional
__HttpHandlerUserInput
The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs.
retryMode
Optional
string | Provider<string>
Specifies which retry algorithm to use.
useDualstackEndpoint
Optional
boolean | Provider<boolean>
Enables IPv6/IPv4 dualstack endpoint.
useFipsEndpoint
Optional
boolean | Provider<boolean>
Enables FIPS compatible endpoints.
Additional config fields are described in the full configuration type: GeoRoutesClientConfig