Skip to content

LocationServiceRoutesV2Client#

Index > LocationServiceRoutesV2 > LocationServiceRoutesV2Client

Auto-generated documentation for LocationServiceRoutesV2 type annotations stubs module mypy-boto3-geo-routes.

LocationServiceRoutesV2Client#

Type annotations and code completion for boto3.client("geo-routes"). boto3 documentation

# LocationServiceRoutesV2Client usage example

from boto3.session import Session
from mypy_boto3_geo_routes.client import LocationServiceRoutesV2Client

def get_geo-routes_client() -> LocationServiceRoutesV2Client:
    return Session().client("geo-routes")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("geo-routes").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("geo-routes")

try:
    do_something(client)
except (
    client.exceptions.AccessDeniedException,
    client.exceptions.ClientError,
    client.exceptions.InternalServerException,
    client.exceptions.ThrottlingException,
    client.exceptions.ValidationException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_geo_routes.client import Exceptions

def handle_error(exc: Exceptions.AccessDeniedException) -> None:
    ...

Methods#

calculate_isolines#

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

Type annotations and code completion for boto3.client("geo-routes").calculate_isolines method. boto3 documentation

# calculate_isolines method definition

def calculate_isolines(
    self,
    *,
    Thresholds: IsolineThresholdsTypeDef,  # (1)
    Allow: IsolineAllowOptionsTypeDef = ...,  # (2)
    ArrivalTime: str = ...,
    Avoid: IsolineAvoidanceOptionsTypeDef = ...,  # (3)
    DepartNow: bool = ...,
    DepartureTime: str = ...,
    Destination: Sequence[float] = ...,
    DestinationOptions: IsolineDestinationOptionsTypeDef = ...,  # (4)
    IsolineGeometryFormat: GeometryFormatType = ...,  # (5)
    IsolineGranularity: IsolineGranularityOptionsTypeDef = ...,  # (6)
    Key: str = ...,
    OptimizeIsolineFor: IsolineOptimizationObjectiveType = ...,  # (7)
    OptimizeRoutingFor: RoutingObjectiveType = ...,  # (8)
    Origin: Sequence[float] = ...,
    OriginOptions: IsolineOriginOptionsTypeDef = ...,  # (9)
    Traffic: IsolineTrafficOptionsTypeDef = ...,  # (10)
    TravelMode: IsolineTravelModeType = ...,  # (11)
    TravelModeOptions: IsolineTravelModeOptionsTypeDef = ...,  # (12)
) -> CalculateIsolinesResponseTypeDef:  # (13)
    ...
  1. See IsolineThresholdsTypeDef
  2. See IsolineAllowOptionsTypeDef
  3. See IsolineAvoidanceOptionsTypeDef
  4. See IsolineDestinationOptionsTypeDef
  5. See GeometryFormatType
  6. See IsolineGranularityOptionsTypeDef
  7. See IsolineOptimizationObjectiveType
  8. See RoutingObjectiveType
  9. See IsolineOriginOptionsTypeDef
  10. See IsolineTrafficOptionsTypeDef
  11. See IsolineTravelModeType
  12. See IsolineTravelModeOptionsTypeDef
  13. See CalculateIsolinesResponseTypeDef
# calculate_isolines method usage example with argument unpacking

kwargs: CalculateIsolinesRequestRequestTypeDef = {  # (1)
    "Thresholds": ...,
}

parent.calculate_isolines(**kwargs)
  1. See CalculateIsolinesRequestRequestTypeDef

calculate_route_matrix#

Calculates route matrix containing the results for all pairs of Origins to Destinations.

Type annotations and code completion for boto3.client("geo-routes").calculate_route_matrix method. boto3 documentation

# calculate_route_matrix method definition

def calculate_route_matrix(
    self,
    *,
    Destinations: Sequence[RouteMatrixDestinationTypeDef],  # (1)
    Origins: Sequence[RouteMatrixOriginTypeDef],  # (2)
    RoutingBoundary: RouteMatrixBoundaryTypeDef,  # (3)
    Allow: RouteMatrixAllowOptionsTypeDef = ...,  # (4)
    Avoid: RouteMatrixAvoidanceOptionsTypeDef = ...,  # (5)
    DepartNow: bool = ...,
    DepartureTime: str = ...,
    Exclude: RouteMatrixExclusionOptionsTypeDef = ...,  # (6)
    Key: str = ...,
    OptimizeRoutingFor: RoutingObjectiveType = ...,  # (7)
    Traffic: RouteMatrixTrafficOptionsTypeDef = ...,  # (8)
    TravelMode: RouteMatrixTravelModeType = ...,  # (9)
    TravelModeOptions: RouteMatrixTravelModeOptionsTypeDef = ...,  # (10)
) -> CalculateRouteMatrixResponseTypeDef:  # (11)
    ...
  1. See RouteMatrixDestinationTypeDef
  2. See RouteMatrixOriginTypeDef
  3. See RouteMatrixBoundaryTypeDef
  4. See RouteMatrixAllowOptionsTypeDef
  5. See RouteMatrixAvoidanceOptionsTypeDef
  6. See RouteMatrixExclusionOptionsTypeDef
  7. See RoutingObjectiveType
  8. See RouteMatrixTrafficOptionsTypeDef
  9. See RouteMatrixTravelModeType
  10. See RouteMatrixTravelModeOptionsTypeDef
  11. See CalculateRouteMatrixResponseTypeDef
# calculate_route_matrix method usage example with argument unpacking

kwargs: CalculateRouteMatrixRequestRequestTypeDef = {  # (1)
    "Destinations": ...,
    "Origins": ...,
    "RoutingBoundary": ...,
}

parent.calculate_route_matrix(**kwargs)
  1. See CalculateRouteMatrixRequestRequestTypeDef

calculate_routes#

Calculates a route given the following required parameters: Origin and Destination.

Type annotations and code completion for boto3.client("geo-routes").calculate_routes method. boto3 documentation

# calculate_routes method definition

def calculate_routes(
    self,
    *,
    Destination: Sequence[float],
    Origin: Sequence[float],
    Allow: RouteAllowOptionsTypeDef = ...,  # (1)
    ArrivalTime: str = ...,
    Avoid: RouteAvoidanceOptionsTypeDef = ...,  # (2)
    DepartNow: bool = ...,
    DepartureTime: str = ...,
    DestinationOptions: RouteDestinationOptionsTypeDef = ...,  # (3)
    Driver: RouteDriverOptionsTypeDef = ...,  # (4)
    Exclude: RouteExclusionOptionsTypeDef = ...,  # (5)
    InstructionsMeasurementSystem: MeasurementSystemType = ...,  # (6)
    Key: str = ...,
    Languages: Sequence[str] = ...,
    LegAdditionalFeatures: Sequence[RouteLegAdditionalFeatureType] = ...,  # (7)
    LegGeometryFormat: GeometryFormatType = ...,  # (8)
    MaxAlternatives: int = ...,
    OptimizeRoutingFor: RoutingObjectiveType = ...,  # (9)
    OriginOptions: RouteOriginOptionsTypeDef = ...,  # (10)
    SpanAdditionalFeatures: Sequence[RouteSpanAdditionalFeatureType] = ...,  # (11)
    Tolls: RouteTollOptionsTypeDef = ...,  # (12)
    Traffic: RouteTrafficOptionsTypeDef = ...,  # (13)
    TravelMode: RouteTravelModeType = ...,  # (14)
    TravelModeOptions: RouteTravelModeOptionsTypeDef = ...,  # (15)
    TravelStepType: RouteTravelStepTypeType = ...,  # (16)
    Waypoints: Sequence[RouteWaypointTypeDef] = ...,  # (17)
) -> CalculateRoutesResponseTypeDef:  # (18)
    ...
  1. See RouteAllowOptionsTypeDef
  2. See RouteAvoidanceOptionsTypeDef
  3. See RouteDestinationOptionsTypeDef
  4. See RouteDriverOptionsTypeDef
  5. See RouteExclusionOptionsTypeDef
  6. See MeasurementSystemType
  7. See RouteLegAdditionalFeatureType
  8. See GeometryFormatType
  9. See RoutingObjectiveType
  10. See RouteOriginOptionsTypeDef
  11. See RouteSpanAdditionalFeatureType
  12. See RouteTollOptionsTypeDef
  13. See RouteTrafficOptionsTypeDef
  14. See RouteTravelModeType
  15. See RouteTravelModeOptionsTypeDef
  16. See RouteTravelStepTypeType
  17. See RouteWaypointTypeDef
  18. See CalculateRoutesResponseTypeDef
# calculate_routes method usage example with argument unpacking

kwargs: CalculateRoutesRequestRequestTypeDef = {  # (1)
    "Destination": ...,
    "Origin": ...,
}

parent.calculate_routes(**kwargs)
  1. See CalculateRoutesRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("geo-routes").can_paginate method. boto3 documentation

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close#

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("geo-routes").close method. boto3 documentation

# close method definition

def close(
    self,
) -> None:
    ...

generate_presigned_url#

Generate a presigned url given a client, its method, and arguments.

Type annotations and code completion for boto3.client("geo-routes").generate_presigned_url method. boto3 documentation

# generate_presigned_url method definition

def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

optimize_waypoints#

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.

Type annotations and code completion for boto3.client("geo-routes").optimize_waypoints method. boto3 documentation

# optimize_waypoints method definition

def optimize_waypoints(
    self,
    *,
    Origin: Sequence[float],
    Avoid: WaypointOptimizationAvoidanceOptionsTypeDef = ...,  # (1)
    DepartureTime: str = ...,
    Destination: Sequence[float] = ...,
    DestinationOptions: WaypointOptimizationDestinationOptionsTypeDef = ...,  # (2)
    Driver: WaypointOptimizationDriverOptionsTypeDef = ...,  # (3)
    Exclude: WaypointOptimizationExclusionOptionsTypeDef = ...,  # (4)
    Key: str = ...,
    OptimizeSequencingFor: WaypointOptimizationSequencingObjectiveType = ...,  # (5)
    OriginOptions: WaypointOptimizationOriginOptionsTypeDef = ...,  # (6)
    Traffic: WaypointOptimizationTrafficOptionsTypeDef = ...,  # (7)
    TravelMode: WaypointOptimizationTravelModeType = ...,  # (8)
    TravelModeOptions: WaypointOptimizationTravelModeOptionsTypeDef = ...,  # (9)
    Waypoints: Sequence[WaypointOptimizationWaypointTypeDef] = ...,  # (10)
) -> OptimizeWaypointsResponseTypeDef:  # (11)
    ...
  1. See WaypointOptimizationAvoidanceOptionsTypeDef
  2. See WaypointOptimizationDestinationOptionsTypeDef
  3. See WaypointOptimizationDriverOptionsTypeDef
  4. See WaypointOptimizationExclusionOptionsTypeDef
  5. See WaypointOptimizationSequencingObjectiveType
  6. See WaypointOptimizationOriginOptionsTypeDef
  7. See WaypointOptimizationTrafficOptionsTypeDef
  8. See WaypointOptimizationTravelModeType
  9. See WaypointOptimizationTravelModeOptionsTypeDef
  10. See WaypointOptimizationWaypointTypeDef
  11. See OptimizeWaypointsResponseTypeDef
# optimize_waypoints method usage example with argument unpacking

kwargs: OptimizeWaypointsRequestRequestTypeDef = {  # (1)
    "Origin": ...,
}

parent.optimize_waypoints(**kwargs)
  1. See OptimizeWaypointsRequestRequestTypeDef

snap_to_roads#

The SnapToRoads action matches GPS trace to roads most likely traveled on.

Type annotations and code completion for boto3.client("geo-routes").snap_to_roads method. boto3 documentation

# snap_to_roads method definition

def snap_to_roads(
    self,
    *,
    TracePoints: Sequence[RoadSnapTracePointTypeDef],  # (1)
    Key: str = ...,
    SnappedGeometryFormat: GeometryFormatType = ...,  # (2)
    SnapRadius: int = ...,
    TravelMode: RoadSnapTravelModeType = ...,  # (3)
    TravelModeOptions: RoadSnapTravelModeOptionsTypeDef = ...,  # (4)
) -> SnapToRoadsResponseTypeDef:  # (5)
    ...
  1. See RoadSnapTracePointTypeDef
  2. See GeometryFormatType
  3. See RoadSnapTravelModeType
  4. See RoadSnapTravelModeOptionsTypeDef
  5. See SnapToRoadsResponseTypeDef
# snap_to_roads method usage example with argument unpacking

kwargs: SnapToRoadsRequestRequestTypeDef = {  # (1)
    "TracePoints": ...,
}

parent.snap_to_roads(**kwargs)
  1. See SnapToRoadsRequestRequestTypeDef