

Las traducciones son generadas a través de traducción automática. En caso de conflicto entre la traducción y la version original de inglés, prevalecerá la version en inglés.

# Obtención de información sobre cómo usar CalculateRoutes
<a name="calculate-routes-how-to"></a>

En esta sección se ofrecen instrucciones paso a paso para usar `CalculateRoutes`. En este tema se detallan las instrucciones para encontrar rutas con configuraciones específicas, como incorporar la navegación paso a paso, configurar los modos de viaje y agregar puntos de referencia.

**Topics**
+ [

# Cómo encontrar una ruta para un origen y un destino
](calculate-routes-origin-destination-waypoints.md)
+ [

# Cómo encontrar rutas con direcciones paso a paso
](how-to-find-turn-by-turn-route.md)
+ [

# Cómo encontrar un límite de velocidad para un tramo de carretera
](calculate-routes-speed-limit-road.md)
+ [

# Cómo encontrar rutas alternativas
](calculate-routes-alternate.md)
+ [

# Cómo calcular los peajes de una ruta
](calculate-routes-tolls.md)
+ [

# Cómo crear rutas con evasión personalizada
](calculate-routes-custom-avoidance-poly.md)
+ [

# Cómo crear rutas con evasión personalizada de varios elementos potenciales
](calculate-routes-custom-avoidance-multiple.md)
+ [

# Cómo encontrar la ruta más rápida
](calculate-routes-custom-avoidance-fast.md)
+ [

# Cómo encontrar las rutas más cortas
](calculate-routes-custom-avoidance-shortest.md)

# Cómo encontrar una ruta para un origen y un destino
<a name="calculate-routes-origin-destination-waypoints"></a>

La API de CalculateRoutes le ayuda a encontrar las mejores rutas entre el origen y el destino, así como las mejores oportunidades para que los conductores descansen. Admite modos de viaje como camión, peatón, coche y moto. También admite hasta 25 puntos de referencia (escalas), incluidos el origen y el destino con solo algunas restricciones.

## Casos de uso potenciales
<a name="potential-use-cases"></a>
+ **Encuentre rutas de punto a punto:** determine la mejor ruta entre dos ubicaciones en función de los distintos modos de viaje y las opciones adicionales.

## Ejemplos
<a name="calculate-routes-examples"></a>

### Cálculo de las rutas desde el origen hasta el destino con el coche como TravelMode
<a name="calculate-routes-car-mode"></a>

------
#### [ Sample request ]

```
{
    "Origin": [
        -123.118105,
        49.282423
    ],
    "Destination": [
        -123.020098,
        49.232872
    ]
}
```

------
#### [ Sample response ]

```
{
    "LegGeometryFormat": "FlexiblePolyline",
    "Notices": [],
    "Routes": [
        {
            "Legs": [
                {
                    "Geometry": {
                        "Polyline": "Redacted"
                    },
                    "TravelMode": "Car",
                    "Type": "Vehicle",
                    "VehicleLegDetails": {
                        "AfterTravelSteps": [],
                        "Arrival": {
                            "Place": {
                                "ChargingStation": false,
                                "OriginalPosition": [
                                    -123.020098,
                                    49.232872
                                ],
                                "Position": [
                                    -123.0203051,
                                    49.2328499
                                ]
                            }
                        },
                        "Departure": {
                            "Place": {
                                "ChargingStation": false,
                                "OriginalPosition": [
                                    -123.1181051,
                                    49.282423
                                ],
                                "Position": [
                                    -123.1180883,
                                    49.2824349
                                ]
                            }
                        },
                        "TravelSteps": [
                            {
                                "Distance": 1288,
                                "Duration": 102,
                                "Type": "Depart"
                            },
                            {
                                "Distance": 262,
                                "Duration": 24,
                                "Type": "Ramp"
                            },
                            {
                                "Distance": 1356,
                                "Duration": 134,
                                "Type": "Turn"
                            },
                            {
                                "Distance": 7092,
                                "Duration": 568,
                                "Type": "Keep"
                            },
                            {
                                "Distance": 65,
                                "Duration": 26,
                                "Type": "Turn"
                            },
                            {
                                "Distance": 50,
                                "Duration": 18,
                                "Type": "Turn"
                            },
                            {
                                "Distance": 0,
                                "Duration": 0,
                                "Type": "Arrive"
                            }
                        ]
                    }
                }
            ]
        }
    ]
}
```

------
#### [ cURL ]

```
curl --request POST \
  --url 'https://routes.geo.eu-central-1.amazonaws.com/v2/routes?key=Your_key' \
  --header 'Content-Type: application/json' \
  --data '{
  "Origin": [
    -123.118105,
    49.282423
  ],
  "Destination": [
    -123.020098,
    49.232872
  ]
}'
```

------
#### [ AWS CLI ]

```
aws geo-routes calculate-routes --key ${YourKey} \
--origin -123.118105 49.282423 \
--destination -123.020098 49.232872
```

------

# Cómo encontrar rutas con direcciones paso a paso
<a name="how-to-find-turn-by-turn-route"></a>

La API de CalculateRoutes le ayuda a encontrar las mejores rutas entre el origen y el destino, así como las mejores oportunidades para que los conductores descansen. Admite modos de viaje como coche, camión, peatón y moto. También admite hasta 25 puntos de referencia (escalas), incluidos el origen y el destino, con solo algunas restricciones.

## Casos de uso potenciales
<a name="potential-use-cases-turn-by-turn"></a>
+ **Cree una aplicación móvil de navegación:** utilice la API para obtener instrucciones de navegación paso a paso.
+ **Muestre las indicaciones en una plataforma web:** muestre una guía de rutas detallada para las aplicaciones web que le ayudarán a navegar.

## Ejemplos
<a name="calculate-routes-examples-turn-by-turn"></a>

### Cálculo de las rutas con coche como TravelMode
<a name="calculate-routes-car-mode-turn-by-turn"></a>

------
#### [ Sample request ]

```
{
    "Origin": [
        -123.118105,
        49.282423
    ],
    "Destination": [
        -123.020098,
        49.232872
    ],
    "TravelStepType": "TurnByTurn",
    "TravelMode": "Car"
}
```

------
#### [ Sample response ]

```
{
    "LegGeometryFormat": "FlexiblePolyline",
    "Notices": [],
    "Routes": [
        {
            "Legs": [
                {
                    "Geometry": {
                        "Polyline": "Redacted"
                    },
                    "TravelMode": "Car",
                    "Type": "Vehicle",
                    "VehicleLegDetails": {
                        "Arrival": {
                            "Place": {
                                "Position": [-123.0203051, 49.2328499]
                            }
                        },
                        "Departure": {
                            "Place": {
                                "Position": [-123.1180883, 49.2824349]
                            }
                        },
                        "TravelSteps": [
                            {
                                "Distance": 1288,
                                "Duration": 102,
                                "Type": "Depart",
                                "NextRoad": {
                                    "RoadName": "W Georgia St",
                                    "RouteNumber": "HWY-1A"
                                }
                            },
                            {
                                "Distance": 262,
                                "Duration": 24,
                                "Type": "Keep",
                                "NextRoad": {
                                    "RoadName": "Main St",
                                    "RouteNumber": "HWY-1A"
                                }
                            },
                            {
                                "Distance": 1356,
                                "Duration": 134,
                                "Type": "Turn",
                                "NextRoad": {
                                    "RoadName": "Main St",
                                    "RouteNumber": "HWY-1A"
                                }
                            },
                            {
                                "Distance": 7092,
                                "Duration": 568,
                                "Type": "Keep",
                                "NextRoad": {
                                    "RoadName": "Kingsway",
                                    "RouteNumber": "HWY-1A"
                                }
                            },
                            {
                                "Distance": 65,
                                "Duration": 26,
                                "Type": "Turn"
                            },
                            {
                                "Distance": 0,
                                "Duration": 0,
                                "Type": "Arrive"
                            }
                        ]
                    }
                }
            ]
        }
    ]
}
```

------
#### [ cURL ]

```
curl --request POST \
  --url 'https://routes.geo.eu-central-1.amazonaws.com/v2/routes?key=Your_key' \
  --header 'Content-Type: application/json' \
  --data '{
  "Origin": [
    -123.118105,
    49.282423
  ],
  "Destination": [
    -123.020098,
    49.232872
  ],
  "TravelStepType": "TurnByTurn",
  "TravelMode": "Car"
}'
```

------
#### [ AWS CLI ]

```
aws geo-routes calculate-routes --key ${YourKey} \
--origin -123.118105 49.282423 \
--destination -123.020098 49.232872 \
--travel-step-type "TurnByTurn" \
--travel-mode "Car"
```

------

# Cómo encontrar un límite de velocidad para un tramo de carretera
<a name="calculate-routes-speed-limit-road"></a>

La API de CalculateRoutes le ayuda a encontrar las mejores rutas entre el origen y el destino, así como las mejores oportunidades para que los conductores descansen. Admite modos de viaje como coche, camión, peatón y moto. También admite hasta 25 puntos de referencia (escalas), incluidos el origen y el destino, con solo algunas restricciones.

## Casos de uso potenciales
<a name="potential-use-cases"></a>
+ **Audite el cumplimiento de los límites de velocidad:** manténgase al tanto de los límites de velocidad y de su cumplimiento.
+ **Informe al conductor del límite de velocidad:** notifica al conductor el límite de velocidad cuando no esté claro lo contrario.

## Ejemplos
<a name="calculate-routes-speed-examples"></a>

### Búsqueda de los límites de velocidad en el coche como TravelMode
<a name="calculate-routes-speed"></a>

------
#### [ Sample request ]

```
{
    "Origin": [
        13.055211,
        52.704802
    ],
    "Destination": [
        13.551910,
        52.282705
    ],
    "TravelMode": "Car",
    "SpanAdditionalFeatures": ["SpeedLimit"]
}
```

------
#### [ Sample response ]

```
{
    "LegGeometryFormat": "FlexiblePolyline",
    "Notices": [],
    "Routes": [
        {
            "Legs": [
                {
                    "Geometry": {
                        "Polyline": "Redacted"
                    },
                    "TravelMode": "Car",
                    "Type": "Vehicle",
                    "VehicleLegDetails": {
                        "AfterTravelSteps": [],
                        "Arrival": {
                            "Place": {
                                "ChargingStation": false,
                                "OriginalPosition": [
                                    13.55191,
                                    52.282705
                                ],
                                "Position": [
                                    13.5507836,
                                    52.2859121
                                ]
                            }
                        },
                        "Departure": {
                            "Place": {
                                "ChargingStation": false,
                                "OriginalPosition": [
                                    13.055211,
                                    52.704802
                                ],
                                "Position": [
                                    13.0555036,
                                    52.7056073
                                ]
                            }
                        },
                        "Incidents": [],
                        "Notices": [],
                        "PassThroughWaypoints": [],
                        "Spans": [
                            {
                                "GeometryOffset": 0,
                                "SpeedLimit": {
                                    "Unlimited": true
                                }
                            },
                            {
                                "GeometryOffset": 151,
                                "SpeedLimit": {
                                    "MaxSpeed": 120.00000762939453
                                }
                            },
                            {
                                "GeometryOffset": 167,
                                "SpeedLimit": {
                                    "MaxSpeed": 80
                                }
                            },
                            {
                                "GeometryOffset": 195,
                                "SpeedLimit": {
                                    "MaxSpeed": 120.00000762939453
                                }
                            },
                            {
                                "GeometryOffset": 220,
                                "SpeedLimit": {
                                    "Unlimited": true
                                }
                            },
                            {
                                "GeometryOffset": 356,
                                "SpeedLimit": {
                                    "MaxSpeed": 120.00000762939453
                                }
                            },
                            {
                                "GeometryOffset": 358,
                                "SpeedLimit": {
                                    "MaxSpeed": 100
                                }
                            },
                            {
                                "GeometryOffset": 368,
                                "SpeedLimit": {
                                    "MaxSpeed": 80
                                }
                            },
                            {
                                "GeometryOffset": 384,
                                "SpeedLimit": {
                                    "MaxSpeed": 60.000003814697266
                                }
                            },
                            {
                                "GeometryOffset": 639,
                                "SpeedLimit": {
                                    "MaxSpeed": 80
                                }
                            },
                            {
                                "GeometryOffset": 701,
                                "SpeedLimit": {
                                    "MaxSpeed": 60.000003814697266
                                }
                            },
                            {
                                "GeometryOffset": 726,
                                "SpeedLimit": {
                                    "MaxSpeed": 80
                                }
                            },
                            {
                                "GeometryOffset": 805,
                                "SpeedLimit": {
                                    "MaxSpeed": 60.000003814697266
                                }
                            },
                            {
                                "GeometryOffset": 839,
                                "SpeedLimit": {
                                    "MaxSpeed": 80
                                }
                            },
                            {
                                "GeometryOffset": 1384,
                                "SpeedLimit": {
                                    "MaxSpeed": 60.000003814697266
                                }
                            },
                            {
                                "GeometryOffset": 1393,
                                "SpeedLimit": {
                                    "MaxSpeed": 50
                                }
                            },
                            {
                                "GeometryOffset": 1443,
                                "SpeedLimit": {
                                    "MaxSpeed": 30.000001907348633
                                }
                            },
                            {
                                "GeometryOffset": 1454,
                                "SpeedLimit": {
                                    "MaxSpeed": 50
                                }
                            },
                            {
                                "GeometryOffset": 1504,
                                "SpeedLimit": {
                                    "MaxSpeed": 60.000003814697266
                                }
                            },
                            {
                                "GeometryOffset": 1513,
                                "SpeedLimit": {
                                    "MaxSpeed": 80
                                }
                            },
                            {
                                "GeometryOffset": 1516,
                                "SpeedLimit": {
                                    "MaxSpeed": 60.000003814697266
                                }
                            },
                            {
                                "GeometryOffset": 1555,
                                "SpeedLimit": {
                                    "MaxSpeed": 80
                                }
                            },
                            {
                                "GeometryOffset": 1748,
                                "SpeedLimit": {
                                    "MaxSpeed": 120.00000762939453
                                }
                            },
                            {
                                "GeometryOffset": 1904,
                                "SpeedLimit": {
                                    "MaxSpeed": 100
                                }
                            },
                            {
                                "GeometryOffset": 1945,
                                "SpeedLimit": {
                                    "Unlimited": true
                                }
                            },
                            {
                                "GeometryOffset": 2006,
                                "SpeedLimit": {
                                    "MaxSpeed": 70
                                }
                            },
                            {
                                "GeometryOffset": 2017,
                                "SpeedLimit": {
                                    "MaxSpeed": 50
                                }
                            },
                            {
                                "GeometryOffset": 2033,
                                "SpeedLimit": {
                                    "MaxSpeed": 30.000001907348633
                                }
                            }
                        ],
                        "Tolls": [],
                        "TollSystems": [],
                        "TravelSteps": [
                            {
                                "Distance": 9099,
                                "Duration": 262,
                                "ExitNumber": [],
                                "GeometryOffset": 0,
                                "Type": "Depart"
                            },
                            {
                                "Distance": 18849,
                                "Duration": 800,
                                "ExitNumber": [],
                                "GeometryOffset": 162,
                                "KeepStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "Type": "Keep"
                            },
                            {
                                "Distance": 4290,
                                "Duration": 212,
                                "ExitNumber": [],
                                "ExitStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "GeometryOffset": 701,
                                "Type": "Exit"
                            },
                            {
                                "Distance": 14418,
                                "Duration": 651,
                                "ExitNumber": [],
                                "GeometryOffset": 828,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 1255,
                                "Duration": 62,
                                "ExitNumber": [],
                                "ExitStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "GeometryOffset": 1359,
                                "Type": "Exit"
                            },
                            {
                                "Distance": 1607,
                                "Duration": 139,
                                "ExitNumber": [],
                                "GeometryOffset": 1393,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Left",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 934,
                                "Duration": 92,
                                "ExitNumber": [],
                                "GeometryOffset": 1442,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 320,
                                "Duration": 27,
                                "ExitNumber": [],
                                "GeometryOffset": 1473,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 320,
                                "Duration": 33,
                                "ExitNumber": [],
                                "GeometryOffset": 1491,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 17863,
                                "Duration": 680,
                                "ExitNumber": [],
                                "GeometryOffset": 1504,
                                "RampStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "Type": "Ramp"
                            },
                            {
                                "Distance": 2888,
                                "Duration": 95,
                                "ExitNumber": [],
                                "GeometryOffset": 1917,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 321,
                                "Duration": 28,
                                "ExitNumber": [],
                                "ExitStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "GeometryOffset": 1977,
                                "Type": "Exit"
                            },
                            {
                                "Distance": 549,
                                "Duration": 41,
                                "ExitNumber": [],
                                "GeometryOffset": 2006,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 386,
                                "Duration": 51,
                                "ExitNumber": [],
                                "GeometryOffset": 2023,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Left",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 98,
                                "Duration": 15,
                                "ExitNumber": [],
                                "GeometryOffset": 2033,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 0,
                                "Duration": 0,
                                "ExitNumber": [],
                                "GeometryOffset": 2036,
                                "Type": "Arrive"
                            }
                        ],
                        "TruckRoadTypes": [],
                        "Zones": []
                    }
                }
            ],
            "MajorRoadLabels": [
                {
                    "RouteNumber": {
                        "Language": "de",
                        "Value": "A111"
                    }
                },
                {
                    "RouteNumber": {
                        "Language": "de",
                        "Value": "A113"
                    }
                }
            ]
        }
    ]
}
```

------
#### [ cURL ]

```
curl --request POST \
  --url 'https://routes.geo.eu-central-1.amazonaws.com/v2/routes?key=Your_key' \
  --header 'Content-Type: application/json' \
  --data '{
  "Origin": [
    13.055211,
    52.704802
  ],
  "Destination": [
    13.551910,
    52.282705
  ],
  "TravelMode": "Car",
  "SpanAdditionalFeatures": ["SpeedLimit"]
}'
```

------
#### [ AWS CLI ]

```
aws geo-routes calculate-routes --key ${YourKey} \
--origin 13.055211 52.704802 \
--destination 13.551910 52.282705 \
--travel-mode "Car" \
--span-additional-features "SpeedLimit"
```

------

# Cómo encontrar rutas alternativas
<a name="calculate-routes-alternate"></a>

La API de CalculateRoutes le ayuda a encontrar las mejores rutas entre el origen y el destino, así como las mejores oportunidades para que los conductores descansen. Admite modos de viaje como coche, camión, peatón y moto. También admite hasta 25 puntos de referencia (escalas), incluidos el origen y el destino, con solo algunas restricciones.

## Casos de uso potenciales
<a name="potential-use-cases"></a>
+ **Identifique rutas alternativas:** sea capaz de elegir la ruta que mejor se adapte a las necesidades de su empresa.

## Ejemplos
<a name="calculate-routes-alternate-examples"></a>

### Búsqueda de rutas alternativas en coche como TravelMode
<a name="calculate-routes-alternate"></a>

------
#### [ Sample request ]

```
{
    "Origin": [
        13.055211,
        52.704802
    ],
    "Destination": [
        13.551910,
        52.282705
    ],
    "TravelMode": "Car",
    "MaxAlternatives": 2
}
```

------
#### [ Sample response ]

```
{
    "LegGeometryFormat": "FlexiblePolyline",
    "Notices": [],
    "Routes": [
        {
            "Legs": [
                {
                    "Geometry": {
                        "Polyline": "Redacted"
                    },
                    "TravelMode": "Car",
                    "Type": "Vehicle",
                    "VehicleLegDetails": {
                        "AfterTravelSteps": [],
                        "Arrival": {
                            "Place": {
                                "ChargingStation": false,
                                "OriginalPosition": [
                                    13.55191,
                                    52.282705
                                ],
                                "Position": [
                                    13.5507836,
                                    52.2859121
                                ]
                            }
                        },
                        "Departure": {
                            "Place": {
                                "ChargingStation": false,
                                "OriginalPosition": [
                                    13.055211,
                                    52.704802
                                ],
                                "Position": [
                                    13.0555036,
                                    52.7056073
                                ]
                            }
                        },
                        "Incidents": [],
                        "Notices": [],
                        "PassThroughWaypoints": [],
                        "Spans": [],
                        "Tolls": [],
                        "TollSystems": [],
                        "TravelSteps": [
                            {
                                "Distance": 9099,
                                "Duration": 262,
                                "ExitNumber": [],
                                "GeometryOffset": 0,
                                "Type": "Depart"
                            },
                            {
                                "Distance": 18849,
                                "Duration": 800,
                                "ExitNumber": [],
                                "GeometryOffset": 162,
                                "KeepStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "Type": "Keep"
                            },
                            {
                                "Distance": 4290,
                                "Duration": 212,
                                "ExitNumber": [],
                                "ExitStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "GeometryOffset": 701,
                                "Type": "Exit"
                            },
                            {
                                "Distance": 14418,
                                "Duration": 651,
                                "ExitNumber": [],
                                "GeometryOffset": 828,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 1255,
                                "Duration": 62,
                                "ExitNumber": [],
                                "ExitStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "GeometryOffset": 1359,
                                "Type": "Exit"
                            },
                            {
                                "Distance": 1607,
                                "Duration": 139,
                                "ExitNumber": [],
                                "GeometryOffset": 1393,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Left",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 934,
                                "Duration": 92,
                                "ExitNumber": [],
                                "GeometryOffset": 1442,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 320,
                                "Duration": 27,
                                "ExitNumber": [],
                                "GeometryOffset": 1473,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 320,
                                "Duration": 33,
                                "ExitNumber": [],
                                "GeometryOffset": 1491,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 17863,
                                "Duration": 680,
                                "ExitNumber": [],
                                "GeometryOffset": 1504,
                                "RampStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "Type": "Ramp"
                            },
                            {
                                "Distance": 2888,
                                "Duration": 95,
                                "ExitNumber": [],
                                "GeometryOffset": 1917,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 321,
                                "Duration": 28,
                                "ExitNumber": [],
                                "ExitStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "GeometryOffset": 1977,
                                "Type": "Exit"
                            },
                            {
                                "Distance": 549,
                                "Duration": 41,
                                "ExitNumber": [],
                                "GeometryOffset": 2006,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 386,
                                "Duration": 51,
                                "ExitNumber": [],
                                "GeometryOffset": 2023,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Left",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 98,
                                "Duration": 15,
                                "ExitNumber": [],
                                "GeometryOffset": 2033,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 0,
                                "Duration": 0,
                                "ExitNumber": [],
                                "GeometryOffset": 2036,
                                "Type": "Arrive"
                            }
                        ],
                        "TruckRoadTypes": [],
                        "Zones": []
                    }
                }
            ],
            "MajorRoadLabels": [
                {
                    "RouteNumber": {
                        "Language": "de",
                        "Value": "A111"
                    }
                },
                {
                    "RouteNumber": {
                        "Language": "de",
                        "Value": "A113"
                    }
                }
            ]
        },
        {
            "Legs": [
                {
                    "Geometry": {
                        "Polyline": "Redacted"
                    },
                    "TravelMode": "Car",
                    "Type": "Vehicle",
                    "VehicleLegDetails": {
                        "AfterTravelSteps": [],
                        "Arrival": {
                            "Place": {
                                "ChargingStation": false,
                                "OriginalPosition": [
                                    13.55191,
                                    52.282705
                                ],
                                "Position": [
                                    13.5507836,
                                    52.2859121
                                ]
                            }
                        },
                        "Departure": {
                            "Place": {
                                "ChargingStation": false,
                                "OriginalPosition": [
                                    13.055211,
                                    52.704802
                                ],
                                "Position": [
                                    13.0555036,
                                    52.7056073
                                ]
                            }
                        },
                        "Incidents": [],
                        "Notices": [],
                        "PassThroughWaypoints": [],
                        "Spans": [],
                        "Tolls": [],
                        "TollSystems": [],
                        "TravelSteps": [
                            {
                                "Distance": 91047,
                                "Duration": 2880,
                                "ExitNumber": [],
                                "GeometryOffset": 0,
                                "Type": "Depart"
                            },
                            {
                                "Distance": 3496,
                                "Duration": 119,
                                "ExitNumber": [],
                                "ExitStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "GeometryOffset": 1473,
                                "Type": "Exit"
                            },
                            {
                                "Distance": 321,
                                "Duration": 28,
                                "ExitNumber": [],
                                "ExitStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "GeometryOffset": 1565,
                                "Type": "Exit"
                            },
                            {
                                "Distance": 549,
                                "Duration": 41,
                                "ExitNumber": [],
                                "GeometryOffset": 1594,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 386,
                                "Duration": 51,
                                "ExitNumber": [],
                                "GeometryOffset": 1611,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Left",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 98,
                                "Duration": 15,
                                "ExitNumber": [],
                                "GeometryOffset": 1621,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 0,
                                "Duration": 0,
                                "ExitNumber": [],
                                "GeometryOffset": 1624,
                                "Type": "Arrive"
                            }
                        ],
                        "TruckRoadTypes": [],
                        "Zones": []
                    }
                }
            ],
            "MajorRoadLabels": [
                {
                    "RouteNumber": {
                        "Language": "de",
                        "Value": "A10"
                    }
                }
            ]
        },
        {
            "Legs": [
                {
                    "Geometry": {
                        "Polyline": "Redacted"
                    },
                    "TravelMode": "Car",
                    "Type": "Vehicle",
                    "VehicleLegDetails": {
                        "AfterTravelSteps": [],
                        "Arrival": {
                            "Place": {
                                "ChargingStation": false,
                                "OriginalPosition": [
                                    13.55191,
                                    52.282705
                                ],
                                "Position": [
                                    13.5507836,
                                    52.2859121
                                ]
                            }
                        },
                        "Departure": {
                            "Place": {
                                "ChargingStation": false,
                                "OriginalPosition": [
                                    13.055211,
                                    52.704802
                                ],
                                "Position": [
                                    13.0555036,
                                    52.7056073
                                ]
                            }
                        },
                        "Incidents": [],
                        "Notices": [],
                        "PassThroughWaypoints": [],
                        "Spans": [],
                        "Tolls": [],
                        "TollSystems": [],
                        "TravelSteps": [
                            {
                                "Distance": 9099,
                                "Duration": 262,
                                "ExitNumber": [],
                                "GeometryOffset": 0,
                                "Type": "Depart"
                            },
                            {
                                "Distance": 18849,
                                "Duration": 800,
                                "ExitNumber": [],
                                "GeometryOffset": 162,
                                "KeepStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "Type": "Keep"
                            },
                            {
                                "Distance": 4290,
                                "Duration": 212,
                                "ExitNumber": [],
                                "ExitStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "GeometryOffset": 701,
                                "Type": "Exit"
                            },
                            {
                                "Distance": 12258,
                                "Duration": 554,
                                "ExitNumber": [],
                                "GeometryOffset": 828,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 18567,
                                "Duration": 1218,
                                "ExitNumber": [],
                                "ExitStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "GeometryOffset": 1282,
                                "Type": "Exit"
                            },
                            {
                                "Distance": 250,
                                "Duration": 28,
                                "ExitNumber": [],
                                "GeometryOffset": 1760,
                                "RampStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "Type": "Ramp"
                            },
                            {
                                "Distance": 4856,
                                "Duration": 245,
                                "ExitNumber": [],
                                "GeometryOffset": 1793,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 3202,
                                "Duration": 165,
                                "ExitNumber": [],
                                "GeometryOffset": 1970,
                                "RoundaboutExitStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "Type": "RoundaboutExit"
                            },
                            {
                                "Distance": 386,
                                "Duration": 51,
                                "ExitNumber": [],
                                "GeometryOffset": 2072,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 98,
                                "Duration": 15,
                                "ExitNumber": [],
                                "GeometryOffset": 2082,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 0,
                                "Duration": 0,
                                "ExitNumber": [],
                                "GeometryOffset": 2085,
                                "Type": "Arrive"
                            }
                        ],
                        "TruckRoadTypes": [],
                        "Zones": []
                    }
                }
            ],
            "MajorRoadLabels": [
                {
                    "RouteNumber": {
                        "Language": "de",
                        "Value": "A111"
                    }
                },
                {
                    "RouteNumber": {
                        "Language": "de",
                        "Value": "B96"
                    }
                }
            ]
        }
    ]
}
```

------
#### [ cURL ]

```
curl --request POST \
  --url 'https://routes.geo.eu-central-1.amazonaws.com/v2/routes?key=Your_key' \
  --header 'Content-Type: application/json' \
  --data '{
  "Origin": [
    13.055211,
    52.704802
  ],
  "Destination": [
    13.551910,
    52.282705
  ],
  "TravelMode": "Car",
  "MaxAlternatives": 2
}'
```

------
#### [ AWS CLI ]

```
aws geo-routes calculate-routes --key ${YourKey} \
--origin 13.055211 52.704802 \
--destination 13.551910 52.282705 \
--travel-mode "Car" \
--max-alternatives 2
```

------

# Cómo calcular los peajes de una ruta
<a name="calculate-routes-tolls"></a>

La API de CalculateRoutes le ayuda a encontrar las mejores rutas entre el origen y el destino, así como las mejores oportunidades para que los conductores descansen. Admite modos de viaje como coche, camión, peatón y moto. También admite hasta 25 puntos de referencia (escalas), incluidos el origen y el destino, con solo algunas restricciones.

## Casos de uso potenciales
<a name="potential-use-cases"></a>
+ **Calcule los peajes:** sea capaz de calcular los costos de los peajes durante la planificación de la ruta.
+ **Audite los peajes:** sea capaz de auditar los costos de los peajes después del viaje.

## Ejemplos
<a name="calculate-routes-tolls-examples"></a>

### Cálculo de los peajes para las rutas en coche como TravelMode
<a name="calculate-routes-tolls"></a>

------
#### [ Sample request ]

```
{
    "Origin": [
        2.234491,
        48.815704
    ],
    "Destination": [
        5.11412,
        47.260723
    ],
    "TravelMode": "Car",
    "Tolls": {
        "AllTransponders": true,
        "AllVignettes": true
    }
}
```

------
#### [ Sample response ]

```
{
    "LegGeometryFormat": "FlexiblePolyline",
    "Notices": [],
    "Routes": [
        {
            "Legs": [
                {
                    "Geometry": {
                        "Polyline": "Redacted"
                    },
                    "TravelMode": "Car",
                    "Type": "Vehicle",
                    "VehicleLegDetails": {
                        "AfterTravelSteps": [],
                        "Arrival": {
                            "Place": {
                                "ChargingStation": false,
                                "OriginalPosition": [
                                    5.11412,
                                    47.2607229
                                ],
                                "Position": [
                                    5.1128203,
                                    47.2596356
                                ]
                            }
                        },
                        "Departure": {
                            "Place": {
                                "ChargingStation": false,
                                "OriginalPosition": [
                                    2.234491,
                                    48.8157039
                                ],
                                "Position": [
                                    2.2346482,
                                    48.815674
                                ]
                            }
                        },
                        "Incidents": [],
                        "Notices": [],
                        "PassThroughWaypoints": [],
                        "Spans": [],
                        "Tolls": [
                            {
                                "Country": "FRA",
                                "PaymentSites": [
                                    {
                                        "Name": "FLEURY-EN-BIERE",
                                        "Position": [
                                            2.53988,
                                            48.42578
                                        ]
                                    },
                                    {
                                        "Name": "POUILLY-EN-AUXOIS",
                                        "Position": [
                                            4.56112,
                                            47.25244
                                        ]
                                    }
                                ],
                                "Rates": [
                                    {
                                        "Id": "2d680295-fb0f-45aa-a8ed-79d9f0f9ff9f",
                                        "LocalPrice": {
                                            "Currency": "EUR",
                                            "Estimate": false,
                                            "Range": false,
                                            "Value": 21.700000762939453
                                        },
                                        "Name": "APRR",
                                        "PaymentMethods": [
                                            "Cash",
                                            "BankCard",
                                            "CreditCard",
                                            "Transponder",
                                            "TravelCard"
                                        ],
                                        "Transponders": [
                                            {
                                                "SystemName": "BipandGo"
                                            },
                                            {
                                                "SystemName": "BipandGo"
                                            },
                                            {
                                                "SystemName": "BipandGo IDVROOM carpoorling"
                                            },
                                            {
                                                "SystemName": "Cito30"
                                            },
                                            {
                                                "SystemName": "Easytrip pass"
                                            },
                                            {
                                                "SystemName": "Liane 30"
                                            },
                                            {
                                                "SystemName": "Liber-t"
                                            },
                                            {
                                                "SystemName": "Liber-t mobilitis"
                                            },
                                            {
                                                "SystemName": "Pass Pont-Pont"
                                            },
                                            {
                                                "SystemName": "Progressivi'T Maurienne"
                                            },
                                            {
                                                "SystemName": "TopEurop"
                                            },
                                            {
                                                "SystemName": "Tunnel Pass+"
                                            },
                                            {
                                                "SystemName": "Ulys"
                                            },
                                            {
                                                "SystemName": "Ulys Europe"
                                            },
                                            {
                                                "SystemName": "Viaduc-t 30"
                                            }
                                        ]
                                    }
                                ],
                                "Systems": [
                                    0
                                ]
                            }
                        ],
                        "TollSystems": [
                            {
                                "Name": "APRR"
                            }
                        ],
                        "TravelSteps": [
                            {
                                "Distance": 122,
                                "Duration": 21,
                                "ExitNumber": [],
                                "GeometryOffset": 0,
                                "Type": "Depart"
                            },
                            {
                                "Distance": 32,
                                "Duration": 7,
                                "ExitNumber": [],
                                "GeometryOffset": 7,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 74,
                                "Duration": 14,
                                "ExitNumber": [],
                                "GeometryOffset": 8,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 199,
                                "Duration": 33,
                                "ExitNumber": [],
                                "GeometryOffset": 9,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 21,
                                "Duration": 10,
                                "ExitNumber": [],
                                "GeometryOffset": 17,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 461,
                                "Duration": 63,
                                "ExitNumber": [],
                                "GeometryOffset": 20,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 1557,
                                "Duration": 145,
                                "ExitNumber": [],
                                "GeometryOffset": 41,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Left",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 3471,
                                "Duration": 151,
                                "ExitNumber": [],
                                "GeometryOffset": 135,
                                "RoundaboutExitStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "Type": "RoundaboutExit"
                            },
                            {
                                "Distance": 9796,
                                "Duration": 430,
                                "ExitNumber": [],
                                "GeometryOffset": 242,
                                "RampStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "Type": "Ramp"
                            },
                            {
                                "Distance": 2473,
                                "Duration": 112,
                                "ExitNumber": [],
                                "ExitStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "GeometryOffset": 582,
                                "Type": "Exit"
                            },
                            {
                                "Distance": 674,
                                "Duration": 25,
                                "ExitNumber": [],
                                "GeometryOffset": 669,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 253953,
                                "Duration": 7468,
                                "ExitNumber": [],
                                "GeometryOffset": 679,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 37379,
                                "Duration": 1192,
                                "ExitNumber": [],
                                "ExitStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "GeometryOffset": 5701,
                                "Type": "Exit"
                            },
                            {
                                "Distance": 2021,
                                "Duration": 110,
                                "ExitNumber": [],
                                "GeometryOffset": 6695,
                                "RoundaboutExitStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "Type": "RoundaboutExit"
                            },
                            {
                                "Distance": 7380,
                                "Duration": 316,
                                "ExitNumber": [],
                                "GeometryOffset": 6776,
                                "RoundaboutPassStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "Type": "RoundaboutPass"
                            },
                            {
                                "Distance": 4253,
                                "Duration": 156,
                                "ExitNumber": [],
                                "GeometryOffset": 6987,
                                "KeepStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Left"
                                },
                                "Type": "Keep"
                            },
                            {
                                "Distance": 813,
                                "Duration": 54,
                                "ExitNumber": [],
                                "GeometryOffset": 7081,
                                "RampStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "Type": "Ramp"
                            },
                            {
                                "Distance": 1909,
                                "Duration": 109,
                                "ExitNumber": [],
                                "GeometryOffset": 7133,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Left",
                                    "TurnIntensity": "Sharp"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 827,
                                "Duration": 47,
                                "ExitNumber": [],
                                "GeometryOffset": 7182,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 680,
                                "Duration": 41,
                                "ExitNumber": [],
                                "GeometryOffset": 7216,
                                "RoundaboutExitStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "Type": "RoundaboutExit"
                            },
                            {
                                "Distance": 224,
                                "Duration": 12,
                                "ExitNumber": [],
                                "GeometryOffset": 7258,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 25,
                                "Duration": 2,
                                "ExitNumber": [],
                                "GeometryOffset": 7265,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 748,
                                "Duration": 51,
                                "ExitNumber": [],
                                "GeometryOffset": 7267,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 656,
                                "Duration": 46,
                                "ExitNumber": [],
                                "GeometryOffset": 7299,
                                "RoundaboutExitStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "Type": "RoundaboutExit"
                            },
                            {
                                "Distance": 1119,
                                "Duration": 78,
                                "ExitNumber": [],
                                "GeometryOffset": 7329,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 432,
                                "Duration": 26,
                                "ExitNumber": [],
                                "GeometryOffset": 7383,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 1864,
                                "Duration": 100,
                                "ExitNumber": [],
                                "GeometryOffset": 7402,
                                "RoundaboutExitStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "Type": "RoundaboutExit"
                            },
                            {
                                "Distance": 1110,
                                "Duration": 93,
                                "ExitNumber": [],
                                "GeometryOffset": 7470,
                                "RoundaboutExitStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "Type": "RoundaboutExit"
                            },
                            {
                                "Distance": 232,
                                "Duration": 10,
                                "ExitNumber": [],
                                "GeometryOffset": 7563,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 642,
                                "Duration": 29,
                                "ExitNumber": [],
                                "GeometryOffset": 7572,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 357,
                                "Duration": 25,
                                "ExitNumber": [],
                                "GeometryOffset": 7580,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 63,
                                "Duration": 10,
                                "ExitNumber": [],
                                "GeometryOffset": 7600,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 2626,
                                "Duration": 411,
                                "ExitNumber": [],
                                "GeometryOffset": 7602,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 234,
                                "Duration": 37,
                                "ExitNumber": [],
                                "GeometryOffset": 7627,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 0,
                                "Duration": 0,
                                "ExitNumber": [],
                                "GeometryOffset": 7632,
                                "Type": "Arrive"
                            }
                        ],
                        "TruckRoadTypes": [],
                        "Zones": []
                    }
                }
            ],
            "MajorRoadLabels": [
                {
                    "RouteNumber": {
                        "Language": "fr",
                        "Value": "A6"
                    }
                }
            ]
        }
    ]
}
```

------
#### [ cURL ]

```
curl --request POST \
  --url 'https://routes.geo.eu-central-1.amazonaws.com/v2/routes?key=Your_key' \
  --header 'Content-Type: application/json' \
  --data '{
  "Origin": [
    2.234491,
    48.815704
  ],
  "Destination": [
    5.11412,
    47.260723
  ],
  "TravelMode": "Car",
  "Tolls": {
    "AllTransponders": true,
    "AllVignettes": true
  }
}'
```

------
#### [ AWS CLI ]

```
aws geo-routes calculate-routes --key ${YourKey} \
--origin 13.055211 52.704802 \
--destination 13.551910 52.282705 \
--travel-mode "Car" \
--tolls '{"AllTransponders": true, "AllVignettes": true}'
```

------

# Cómo crear rutas con evasión personalizada
<a name="calculate-routes-custom-avoidance-poly"></a>

La API de CalculateRoutes le ayuda a encontrar las mejores rutas entre el origen y el destino, así como las mejores oportunidades para que los conductores descansen. Admite modos de viaje como coche, camión, peatón y moto. También admite hasta 25 puntos de referencia (escalas), incluidos el origen y el destino, con solo algunas restricciones.

## Casos de uso potenciales
<a name="potential-use-cases"></a>
+ **Calcule las rutas con evasión personalizada:** personalice las rutas con evasión para planificar mejor las rutas y los viajes diarios.

## Ejemplos
<a name="calculate-routes-custom-avoidance-examples"></a>

### Use CalculateRoutes con un BoundingBox de evasión para crear rutas personalizadas.
<a name="calculate-routes-custom-avoidance-poly"></a>

------
#### [ Sample request ]

```
{
    "Origin": [
        -123.116655,
        49.281538
    ],
    "Destination": [
        -123.01791785749363,
        49.22782762759908
    ],
    "TravelMode": "Car",
    "Avoid": {
        "Areas": [
            {
                "Geometry": {
                    "BoundingBox": [
                        -123.078693,
                        49.238987,
                        -123.054638,
                        49.251694
                    ]
                }
            }
        ]
    }
}
```

------
#### [ Sample response ]

```
{
    "LegGeometryFormat": "FlexiblePolyline",
    "Notices": [],
    "Routes": [
        {
            "Legs": [
                {
                    "Geometry": {
                        "Polyline": "Redacted"
                    },
                    "TravelMode": "Car",
                    "Type": "Vehicle",
                    "VehicleLegDetails": {
                        "AfterTravelSteps": [],
                        "Arrival": {
                            "Place": {
                                "ChargingStation": false,
                                "OriginalPosition": [
                                    -123.0179179,
                                    49.2278276
                                ],
                                "Position": [
                                    -123.0229001,
                                    49.22883
                                ]
                            }
                        },
                        "Departure": {
                            "Place": {
                                "ChargingStation": false,
                                "OriginalPosition": [
                                    -123.116655,
                                    49.281538
                                ],
                                "Position": [
                                    -123.1166332,
                                    49.2815528
                                ]
                            }
                        },
                        "Incidents": [],
                        "Notices": [],
                        "PassThroughWaypoints": [],
                        "Spans": [],
                        "Tolls": [],
                        "TollSystems": [],
                        "TravelSteps": [
                            {
                                "Distance": 1144,
                                "Duration": 85,
                                "ExitNumber": [],
                                "GeometryOffset": 0,
                                "Type": "Depart"
                            },
                            {
                                "Distance": 262,
                                "Duration": 24,
                                "ExitNumber": [],
                                "GeometryOffset": 35,
                                "RampStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "Type": "Ramp"
                            },
                            {
                                "Distance": 433,
                                "Duration": 47,
                                "ExitNumber": [],
                                "GeometryOffset": 40,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 1131,
                                "Duration": 81,
                                "ExitNumber": [],
                                "GeometryOffset": 54,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Left",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 54,
                                "Duration": 4,
                                "ExitNumber": [],
                                "GeometryOffset": 79,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 520,
                                "Duration": 39,
                                "ExitNumber": [],
                                "GeometryOffset": 83,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 1123,
                                "Duration": 111,
                                "ExitNumber": [],
                                "GeometryOffset": 101,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 1131,
                                "Duration": 81,
                                "ExitNumber": [],
                                "GeometryOffset": 141,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Left",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 2843,
                                "Duration": 209,
                                "ExitNumber": [],
                                "GeometryOffset": 167,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 3219,
                                "Duration": 246,
                                "ExitNumber": [],
                                "GeometryOffset": 255,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 64,
                                "Duration": 23,
                                "ExitNumber": [],
                                "GeometryOffset": 332,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Left",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 0,
                                "Duration": 0,
                                "ExitNumber": [],
                                "GeometryOffset": 334,
                                "Type": "Arrive"
                            }
                        ],
                        "TruckRoadTypes": [],
                        "Zones": []
                    }
                }
            ],
            "MajorRoadLabels": [
                {
                    "RoadName": {
                        "Language": "en",
                        "Value": "Boundary Rd"
                    }
                },
                {
                    "RoadName": {
                        "Language": "en",
                        "Value": "Grandview Hwy"
                    }
                }
            ]
        }
    ]
}
```

------
#### [ cURL ]

```
curl --request POST \
  --url 'https://routes.geo.eu-central-1.amazonaws.com/v2/routes?key=Your_key' \
  --header 'Content-Type: application/json' \
  --data '{
  "Origin": [
    -123.116655,
    49.281538
  ],
  "Destination": [
    -123.01791785749363,
    49.22782762759908
  ],
  "TravelMode": "Car",
  "Avoid": {
    "Areas": [
      {
        "Geometry": {
          "BoundingBox": [
            -123.078693,
            49.238987,
            -123.054638,
            49.251694
          ]
        }
      }
    ]
  }
}'
```

------
#### [ AWS CLI ]

```
aws geo-routes calculate-routes --key ${YourKey} \
--origin -123.13277 49.281538 \
--destination -123.01791785749363 49.22782762759908 \
--travel-mode "Car" \
--avoid '{"Areas":[{"Geometry":{"BoundingBox":[-123.054638,49.238987,-123.054638,49.251694]}}]}'
```

------

### Use CalculateRoutes con un polígono de evasión para crear rutas personalizadas.
<a name="calculate-routes-custom-avoidance-poly-polygon"></a>

------
#### [ Sample request ]

```
{
    "Origin": [
        -123.116655,
        49.281538
    ],
    "Destination": [
        -123.01791785749363,
        49.22782762759908
    ],
    "TravelMode": "Car",
    "Avoid": {
        "Areas": [
            {
                "Geometry": {
                    "polygon": [
                        [
                            [
                                -123.06953,
                                49.256419
                            ],
                            [
                                -123.080486,
                                49.242115
                            ],
                            [
                                -123.058573,
                                49.242115
                            ],
                            [
                                -123.06953,
                                49.256419
                            ]
                        ]
                    ]
                }
            }
        ]
    }
}
```

------
#### [ Sample response ]

```
{
    "LegGeometryFormat": "FlexiblePolyline",
    "Notices": [],
    "Routes": [
        {
            "Legs": [
                {
                    "Geometry": {
                        "Polyline": "Redacted"
                    },
                    "TravelMode": "Car",
                    "Type": "Vehicle",
                    "VehicleLegDetails": {
                        "AfterTravelSteps": [],
                        "Arrival": {
                            "Place": {
                                "ChargingStation": false,
                                "OriginalPosition": [
                                    -123.0179179,
                                    49.2278276
                                ],
                                "Position": [
                                    -123.0229001,
                                    49.22883
                                ]
                            }
                        },
                        "Departure": {
                            "Place": {
                                "ChargingStation": false,
                                "OriginalPosition": [
                                    -123.116655,
                                    49.281538
                                ],
                                "Position": [
                                    -123.1166332,
                                    49.2815528
                                ]
                            }
                        },
                        "Incidents": [],
                        "Notices": [],
                        "PassThroughWaypoints": [],
                        "Spans": [],
                        "Tolls": [],
                        "TollSystems": [],
                        "TravelSteps": [
                            {
                                "Distance": 1144,
                                "Duration": 85,
                                "ExitNumber": [],
                                "GeometryOffset": 0,
                                "Type": "Depart"
                            },
                            {
                                "Distance": 262,
                                "Duration": 24,
                                "ExitNumber": [],
                                "GeometryOffset": 35,
                                "RampStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "Type": "Ramp"
                            },
                            {
                                "Distance": 433,
                                "Duration": 47,
                                "ExitNumber": [],
                                "GeometryOffset": 40,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 1131,
                                "Duration": 81,
                                "ExitNumber": [],
                                "GeometryOffset": 54,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Left",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 54,
                                "Duration": 4,
                                "ExitNumber": [],
                                "GeometryOffset": 79,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 520,
                                "Duration": 39,
                                "ExitNumber": [],
                                "GeometryOffset": 83,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 1123,
                                "Duration": 111,
                                "ExitNumber": [],
                                "GeometryOffset": 101,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 1131,
                                "Duration": 81,
                                "ExitNumber": [],
                                "GeometryOffset": 141,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Left",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 448,
                                "Duration": 34,
                                "ExitNumber": [],
                                "GeometryOffset": 167,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 1797,
                                "Duration": 151,
                                "ExitNumber": [],
                                "GeometryOffset": 182,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 2836,
                                "Duration": 224,
                                "ExitNumber": [],
                                "GeometryOffset": 222,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Left",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 339,
                                "Duration": 30,
                                "ExitNumber": [],
                                "GeometryOffset": 326,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 64,
                                "Duration": 23,
                                "ExitNumber": [],
                                "GeometryOffset": 335,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Left",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 0,
                                "Duration": 0,
                                "ExitNumber": [],
                                "GeometryOffset": 337,
                                "Type": "Arrive"
                            }
                        ],
                        "TruckRoadTypes": [],
                        "Zones": []
                    }
                }
            ],
            "MajorRoadLabels": [
                {
                    "RouteNumber": {
                        "Language": "en",
                        "Value": "HWY-1A"
                    }
                },
                {
                    "RoadName": {
                        "Language": "en",
                        "Value": "Nanaimo St"
                    }
                }
            ]
        }
    ]
}
```

------
#### [ cURL ]

```
curl --request POST \
  --url 'https://routes.geo.eu-central-1.amazonaws.com/v2/routes?key=Your_key' \
  --header 'Content-Type: application/json' \
  --data '{
  "Origin": [
    -123.116655,
    49.281538
  ],
  "Destination": [
    -123.01791785749363,
    49.22782762759908
  ],
  "TravelMode": "Car",
  "Avoid": {
    "Areas": [
      {
        "Geometry": {
          "polygon": [
            [
              [
                -123.06953,
                49.256419
              ],
              [
                -123.080486,
                49.242115
              ],
              [
                -123.058573,
                49.242115
              ],
              [
                -123.06953,
                49.256419
              ]
            ]
          ]
        }
      }
    ]
  }
}'
```

------
#### [ AWS CLI ]

```
aws geo-routes calculate-routes --key ${YourKey} \
--origin -123.13277 49.281538 \
--destination -123.01791785749363 49.22782762759908 \
--travel-mode "Car" \
--avoid '{"Areas":[{"Geometry":{"Polygon":[[[-123.06953,49.256419],[-123.05167,49.242115],[-123.02381,49.242115],[-123.06953,49.256419]]]}}]}'
```

------

### Use CalculateRoutes con PolylinePolygon para crear rutas personalizadas.
<a name="calculate-routes-custom-avoidance-poly-polyline"></a>

------
#### [ Sample request ]

```
{
    "Origin": [
        -123.116655,
        49.281538
    ],
    "Destination": [
        -123.01791785749363,
        49.22782762759908
    ],
    "TravelMode": "Car",
    "Avoid": {
        "Areas": [
            {
                "Geometry": {
                    "PolylinePolygon": [
                        "BF0s0sJxglvXr5CvkCAgpEs5CvkC"
                    ]
                }
            }
        ]
    }
}
```

------
#### [ Sample response ]

```
{
    "LegGeometryFormat": "FlexiblePolyline",
    "Notices": [],
    "Routes": [
        {
            "Legs": [
                {
                    "Geometry": {
                        "Polyline": "Redacted"
                    },
                    "TravelMode": "Car",
                    "Type": "Vehicle",
                    "VehicleLegDetails": {
                        "AfterTravelSteps": [],
                        "Arrival": {
                            "Place": {
                                "ChargingStation": false,
                                "OriginalPosition": [
                                    -123.0179179,
                                    49.2278276
                                ],
                                "Position": [
                                    -123.0229001,
                                    49.22883
                                ]
                            }
                        },
                        "Departure": {
                            "Place": {
                                "ChargingStation": false,
                                "OriginalPosition": [
                                    -123.116655,
                                    49.281538
                                ],
                                "Position": [
                                    -123.1166332,
                                    49.2815528
                                ]
                            }
                        },
                        "Incidents": [],
                        "Notices": [],
                        "PassThroughWaypoints": [],
                        "Spans": [],
                        "Tolls": [],
                        "TollSystems": [],
                        "TravelSteps": [
                            {
                                "Distance": 1144,
                                "Duration": 85,
                                "ExitNumber": [],
                                "GeometryOffset": 0,
                                "Type": "Depart"
                            },
                            {
                                "Distance": 262,
                                "Duration": 24,
                                "ExitNumber": [],
                                "GeometryOffset": 35,
                                "RampStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "Type": "Ramp"
                            },
                            {
                                "Distance": 433,
                                "Duration": 47,
                                "ExitNumber": [],
                                "GeometryOffset": 40,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 1131,
                                "Duration": 81,
                                "ExitNumber": [],
                                "GeometryOffset": 54,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Left",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 54,
                                "Duration": 4,
                                "ExitNumber": [],
                                "GeometryOffset": 79,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 520,
                                "Duration": 39,
                                "ExitNumber": [],
                                "GeometryOffset": 83,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 1123,
                                "Duration": 111,
                                "ExitNumber": [],
                                "GeometryOffset": 101,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 1131,
                                "Duration": 81,
                                "ExitNumber": [],
                                "GeometryOffset": 141,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Left",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 448,
                                "Duration": 34,
                                "ExitNumber": [],
                                "GeometryOffset": 167,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 1797,
                                "Duration": 151,
                                "ExitNumber": [],
                                "GeometryOffset": 182,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 2836,
                                "Duration": 224,
                                "ExitNumber": [],
                                "GeometryOffset": 222,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Left",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 339,
                                "Duration": 30,
                                "ExitNumber": [],
                                "GeometryOffset": 326,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 64,
                                "Duration": 23,
                                "ExitNumber": [],
                                "GeometryOffset": 335,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Left",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 0,
                                "Duration": 0,
                                "ExitNumber": [],
                                "GeometryOffset": 337,
                                "Type": "Arrive"
                            }
                        ],
                        "TruckRoadTypes": [],
                        "Zones": []
                    }
                }
            ],
            "MajorRoadLabels": [
                {
                    "RouteNumber": {
                        "Language": "en",
                        "Value": "HWY-1A"
                    }
                },
                {
                    "RoadName": {
                        "Language": "en",
                        "Value": "Nanaimo St"
                    }
                }
            ]
        }
    ]
}
```

------
#### [ cURL ]

```
curl --request POST \
  --url 'https://routes.geo.eu-central-1.amazonaws.com/v2/routes?key=Your_key' \
  --header 'Content-Type: application/json' \
  --data '{
  "Origin": [
    -123.116655,
    49.281538
  ],
  "Destination": [
    -123.01791785749363,
    49.22782762759908
  ],
  "TravelMode": "Car",
  "Avoid": {
    "Areas": [
      {
        "Geometry": {
          "PolylinePolygon": [
            "BF0s0sJxglvXr5CvkCAgpEs5CvkC"
          ]
        }
      }
    ]
  }
}'
```

------
#### [ AWS CLI ]

```
aws geo-routes calculate-routes --key ${YourKey} \
--origin -123.13277 49.281538 \
--destination -123.01791785749363 49.22782762759908 \
--travel-mode "Car" \
--avoid '{"Areas":[{"Geometry":{"PolylinePolygon":["BF0s0sJxglvXr5CvkCAgpEs5CvkC"]}}]}'
```

------

### Use CalculateRoutes con un pasillo de evasión para crear rutas personalizadas.
<a name="calculate-routes-custom-avoidance-corridor"></a>

------
#### [ Sample request ]

```
{
    "Origin": [
        -123.116655,
        49.281538
    ],
    "Destination": [
        -123.01791785749363,
        49.22782762759908
    ],
    "TravelMode": "Car",
    "Avoid": {
        "Areas": [
            {
                "Geometry": {
                    "PolylineCorridor": {
                        "Polyline": "Redacted",
                        "Radius": 10
                    }
                }
            }
        ]
    }
}
```

------
#### [ Sample response ]

```
{
    "LegGeometryFormat": "FlexiblePolyline",
    "Notices": [],
    "Routes": [
        {
            "Legs": [
                {
                    "Geometry": {
                        "Polyline": "Redacted"
                    },
                    "TravelMode": "Car",
                    "Type": "Vehicle",
                    "VehicleLegDetails": {
                        "AfterTravelSteps": [],
                        "Arrival": {
                            "Place": {
                                "ChargingStation": false,
                                "OriginalPosition": [
                                    -123.0179179,
                                    49.2278276
                                ],
                                "Position": [
                                    -123.0229001,
                                    49.22883
                                ]
                            }
                        },
                        "Departure": {
                            "Place": {
                                "ChargingStation": false,
                                "OriginalPosition": [
                                    -123.116655,
                                    49.281538
                                ],
                                "Position": [
                                    -123.1166332,
                                    49.2815528
                                ]
                            }
                        },
                        "Incidents": [],
                        "Notices": [],
                        "PassThroughWaypoints": [],
                        "Spans": [],
                        "Tolls": [],
                        "TollSystems": [],
                        "TravelSteps": [
                            {
                                "Distance": 1144,
                                "Duration": 85,
                                "ExitNumber": [],
                                "GeometryOffset": 0,
                                "Type": "Depart"
                            },
                            {
                                "Distance": 262,
                                "Duration": 24,
                                "ExitNumber": [],
                                "GeometryOffset": 35,
                                "RampStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "Type": "Ramp"
                            },
                            {
                                "Distance": 1356,
                                "Duration": 134,
                                "ExitNumber": [],
                                "GeometryOffset": 40,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 2468,
                                "Duration": 204,
                                "ExitNumber": [],
                                "GeometryOffset": 90,
                                "KeepStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Left"
                                },
                                "Type": "Keep"
                            },
                            {
                                "Distance": 1100,
                                "Duration": 88,
                                "ExitNumber": [],
                                "GeometryOffset": 170,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 1588,
                                "Duration": 133,
                                "ExitNumber": [],
                                "GeometryOffset": 214,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Left",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 47,
                                "Duration": 14,
                                "ExitNumber": [],
                                "GeometryOffset": 260,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 2478,
                                "Duration": 196,
                                "ExitNumber": [],
                                "GeometryOffset": 265,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 339,
                                "Duration": 30,
                                "ExitNumber": [],
                                "GeometryOffset": 357,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 64,
                                "Duration": 23,
                                "ExitNumber": [],
                                "GeometryOffset": 366,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Left",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 0,
                                "Duration": 0,
                                "ExitNumber": [],
                                "GeometryOffset": 368,
                                "Type": "Arrive"
                            }
                        ],
                        "TruckRoadTypes": [],
                        "Zones": []
                    }
                }
            ],
            "MajorRoadLabels": [
                {
                    "RouteNumber": {
                        "Language": "en",
                        "Value": "HWY-1A"
                    }
                }
            ]
        }
    ]
}
```

------
#### [ cURL ]

```
curl --request POST \
  --url 'https://routes.geo.eu-central-1.amazonaws.com/v2/routes?key=Your_key' \
  --header 'Content-Type: application/json' \
  --data '{
  "Origin": [
    -123.116655,
    49.281538
  ],
  "Destination": [
    -123.01791785749363,
    49.22782762759908
  ],
  "TravelMode": "Car",
  "Avoid": {
    "Areas": [
      {
        "Geometry": {
          "PolylineCorridor": {
            "Polyline": "Redacted",
            "Radius": 10
          }
        }
      }
    ]
  }
}'
```

------
#### [ AWS CLI ]

```
aws geo-routes calculate-routes --key ${YourKey} \
--origin -123.116655 49.281538 \
--destination -123.01791785749363 49.22782762759908 \
--travel-mode "Car" \
--avoid '{"Areas": [{"Geometry": {"PolylineCorridor": {"Polyline": "BF2mysJnmkvX5ekiC", "Radius": 10}}}]}'
```

------

### Use CalculateRoutes con un PolylineCorridor de evasión para crear rutas personalizadas.
<a name="calculate-routes-custom-avoidance-polyline-corridor"></a>

------
#### [ Sample request ]

```
{
    "Origin": [
        -123.116655,
        49.281538
    ],
    "Destination": [
        -123.01791785749363,
        49.22782762759908
    ],
    "TravelMode": "Car",
    "Avoid": {
        "Areas": [
            {
                "Geometry": {
                    "Corridor": {
                        "LineString": [
                            [
                                -123.06532243038754,
                                49.245226301868776
                            ],
                            [
                                -123.0547357660333,
                                49.24030469850804
                            ]
                        ],
                        "Radius": 10
                    }
                }
            }
        ]
    }
}
```

------
#### [ Sample response ]

```
{
    "LegGeometryFormat": "FlexiblePolyline",
    "Notices": [],
    "Routes": [
        {
            "Legs": [
                {
                    "Geometry": {
                        "Polyline": "Redacted"
                    },
                    "TravelMode": "Car",
                    "Type": "Vehicle",
                    "VehicleLegDetails": {
                        "AfterTravelSteps": [],
                        "Arrival": {
                            "Place": {
                                "ChargingStation": false,
                                "OriginalPosition": [
                                    -123.0179179,
                                    49.2278276
                                ],
                                "Position": [
                                    -123.0229001,
                                    49.22883
                                ]
                            }
                        },
                        "Departure": {
                            "Place": {
                                "ChargingStation": false,
                                "OriginalPosition": [
                                    -123.116655,
                                    49.281538
                                ],
                                "Position": [
                                    -123.1166332,
                                    49.2815528
                                ]
                            }
                        },
                        "Incidents": [],
                        "Notices": [],
                        "PassThroughWaypoints": [],
                        "Spans": [],
                        "Tolls": [],
                        "TollSystems": [],
                        "TravelSteps": [
                            {
                                "Distance": 1144,
                                "Duration": 85,
                                "ExitNumber": [],
                                "GeometryOffset": 0,
                                "Type": "Depart"
                            },
                            {
                                "Distance": 262,
                                "Duration": 24,
                                "ExitNumber": [],
                                "GeometryOffset": 35,
                                "RampStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "Type": "Ramp"
                            },
                            {
                                "Distance": 1356,
                                "Duration": 134,
                                "ExitNumber": [],
                                "GeometryOffset": 40,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 2468,
                                "Duration": 204,
                                "ExitNumber": [],
                                "GeometryOffset": 90,
                                "KeepStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Left"
                                },
                                "Type": "Keep"
                            },
                            {
                                "Distance": 1100,
                                "Duration": 88,
                                "ExitNumber": [],
                                "GeometryOffset": 170,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 1588,
                                "Duration": 133,
                                "ExitNumber": [],
                                "GeometryOffset": 214,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Left",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 47,
                                "Duration": 14,
                                "ExitNumber": [],
                                "GeometryOffset": 260,
                                "Type": "Continue"
                            },
                            {
                                "Distance": 2478,
                                "Duration": 196,
                                "ExitNumber": [],
                                "GeometryOffset": 265,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 339,
                                "Duration": 30,
                                "ExitNumber": [],
                                "GeometryOffset": 357,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 64,
                                "Duration": 23,
                                "ExitNumber": [],
                                "GeometryOffset": 366,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Left",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 0,
                                "Duration": 0,
                                "ExitNumber": [],
                                "GeometryOffset": 368,
                                "Type": "Arrive"
                            }
                        ],
                        "TruckRoadTypes": [],
                        "Zones": []
                    }
                }
            ],
            "MajorRoadLabels": [
                {
                    "RouteNumber": {
                        "Language": "en",
                        "Value": "HWY-1A"
                    }
                }
            ]
        }
    ]
}
```

------
#### [ cURL ]

```
curl --request POST \
  --url 'https://routes.geo.eu-central-1.amazonaws.com/v2/routes?key=Your_key' \
  --header 'Content-Type: application/json' \
  --data '{
  "Origin": [
    -123.116655,
    49.281538
  ],
  "Destination": [
    -123.01791785749363,
    49.22782762759908
  ],
  "TravelMode": "Car",
  "Avoid": {
    "Areas": [
      {
        "Geometry": {
          "Corridor": {
            "LineString": [
              [
                -123.06532243038754,
                49.245226301868776
              ],
              [
                -123.0547357660333,
                49.24030469850804
              ]
            ],
            "Radius": 10
          }
        }
      }
    ]
  }
}'
```

------
#### [ AWS CLI ]

```
aws geo-routes calculate-routes --key ${YourKey} \
--origin -123.13277 49.281538 \
--destination -123.01791785749363 49.22782762759908 \
--travel-mode "Car" \
--avoid '{"Areas":[{"Geometry":{"Corridor":{"LineString":[[-123.06532243038754,49.245226301868776],[-123.0547357660333,49.24030469850804]],"Radius":10}}}]}'
```

------

# Cómo crear rutas con evasión personalizada de varios elementos potenciales
<a name="calculate-routes-custom-avoidance-multiple"></a>

La API de CalculateRoutes le ayuda a encontrar las mejores rutas entre el origen y el destino, así como las mejores oportunidades para que los conductores descansen. Admite modos de viaje como coche, camión, peatón y moto. También admite hasta 25 puntos de referencia (escalas), incluidos el origen y el destino, con solo algunas restricciones.

## Casos de uso potenciales
<a name="potential-use-cases"></a>
+ **Calcule las rutas con evasión personalizada:** personalice las rutas con evasión para planificar mejor las rutas y los viajes diarios.

## Ejemplos
<a name="calculate-routes-examples"></a>

### Use CalculateRoutes con evasión de peajes, cambios de sentido, transbordadores, autopistas, túneles, etc.
<a name="calculate-routes-custom-avoidance-tolls-ferries"></a>

------
#### [ Sample request ]

```
{
    "Origin": [
        -123.118105,
        49.282423
    ],
    "Destination": [
        -123.020098,
        49.232872
    ],
    "TravelMode": "Car",
    "Avoid": {
        "TollRoads": true,
        "UTurns": true,
        "Ferries": true,
        "ControlledAccessHighways": true,
        "Tunnels": true
    }
}
```

------
#### [ Sample response ]

```
{
    "LegGeometryFormat": "FlexiblePolyline",
    "Notices": [],
    "Routes": [
        {
            "Legs": [
                {
                    "Geometry": {
                        "Polyline": "Redacted"
                    },
                    "TravelMode": "Car",
                    "Type": "Vehicle",
                    "VehicleLegDetails": {
                        "AfterTravelSteps": [],
                        "Arrival": {
                            "Place": {
                                "ChargingStation": false,
                                "OriginalPosition": [
                                    -123.020098,
                                    49.232872
                                ],
                                "Position": [
                                    -123.0203051,
                                    49.2328499
                                ]
                            }
                        },
                        "Departure": {
                            "Place": {
                                "ChargingStation": false,
                                "OriginalPosition": [
                                    -123.1181051,
                                    49.282423
                                ],
                                "Position": [
                                    -123.1180883,
                                    49.2824349
                                ]
                            }
                        },
                        "Incidents": [],
                        "Notices": [],
                        "PassThroughWaypoints": [],
                        "Spans": [],
                        "Tolls": [],
                        "TollSystems": [],
                        "TravelSteps": [
                            {
                                "Distance": 1288,
                                "Duration": 102,
                                "ExitNumber": [],
                                "GeometryOffset": 0,
                                "Type": "Depart"
                            },
                            {
                                "Distance": 262,
                                "Duration": 24,
                                "ExitNumber": [],
                                "GeometryOffset": 37,
                                "RampStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "Type": "Ramp"
                            },
                            {
                                "Distance": 1356,
                                "Duration": 134,
                                "ExitNumber": [],
                                "GeometryOffset": 42,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 7092,
                                "Duration": 568,
                                "ExitNumber": [],
                                "GeometryOffset": 92,
                                "KeepStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Left"
                                },
                                "Type": "Keep"
                            },
                            {
                                "Distance": 65,
                                "Duration": 26,
                                "ExitNumber": [],
                                "GeometryOffset": 337,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Left",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 50,
                                "Duration": 18,
                                "ExitNumber": [],
                                "GeometryOffset": 339,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 0,
                                "Duration": 0,
                                "ExitNumber": [],
                                "GeometryOffset": 343,
                                "Type": "Arrive"
                            }
                        ],
                        "TruckRoadTypes": [],
                        "Zones": []
                    }
                }
            ],
            "MajorRoadLabels": [
                {
                    "RouteNumber": {
                        "Language": "en",
                        "Value": "HWY-1A"
                    }
                }
            ]
        }
    ]
}
```

------
#### [ cURL ]

```
curl --request POST \
  --url 'https://routes.geo.eu-central-1.amazonaws.com/v2/routes?key=Your_key' \
  --header 'Content-Type: application/json' \
  --data '{
  "Origin": [
    -123.118105,
    49.282423
  ],
  "Destination": [
    -123.020098,
    49.232872
  ],
  "TravelMode": "Car",
  "Avoid": {
    "TollRoads": true,
    "UTurns": true,
    "Ferries": true,
    "ControlledAccessHighways": true,
    "Tunnels": true
  }
}'
```

------
#### [ AWS CLI ]

```
aws geo-routes calculate-routes --key ${YourKey} \
--origin -123.118105 49.282423 \
--destination -123.020098 49.232872 \
--travel-mode "Car" \
--avoid '{"TollRoads": true, "UTurns": true, "Ferries": true, "ControlledAccessHighways": true, "Tunnels": true}'
```

------

# Cómo encontrar la ruta más rápida
<a name="calculate-routes-custom-avoidance-fast"></a>

La API de CalculateRoutes le ayuda a encontrar las rutas más rápidas entre el origen y el destino.

## Casos de uso potenciales
<a name="calculate-routes-fast-potential-use"></a>
+ **Optimice las rutas para ahorrar tiempo:** mejore las operaciones de entrega calculando la ruta más rápida. Esto es útil para reducir el tiempo de viaje en los servicios de logística y entrega.

## Ejemplos
<a name="calculate-routes-fast-examples"></a>

### Cálculo de la ruta más rápida
<a name="calculate-routes-fast-car"></a>

------
#### [ Sample request ]

```
{
    "Origin": [
        -123.118105,
        49.282423
    ],
    "Destination": [
        -123.020098,
        49.232872
    ],
    "TravelMode": "Car",
    "OptimizeRoutingFor": "FastestRoute"
}
```

------
#### [ Sample response ]

```
{
    "LegGeometryFormat": "FlexiblePolyline",
    "Notices": [],
    "Routes": [
        {
            "Legs": [
                {
                    "Geometry": {
                        "Polyline": "Redacted"
                    },
                    "TravelMode": "Car",
                    "Type": "Vehicle",
                    "VehicleLegDetails": {
                        "AfterTravelSteps": [],
                        "Arrival": {
                            "Place": {
                                "ChargingStation": false,
                                "OriginalPosition": [
                                    -123.020098,
                                    49.232872
                                ],
                                "Position": [
                                    -123.0203051,
                                    49.2328499
                                ]
                            }
                        },
                        "Departure": {
                            "Place": {
                                "ChargingStation": false,
                                "OriginalPosition": [
                                    -123.1181051,
                                    49.282423
                                ],
                                "Position": [
                                    -123.1180883,
                                    49.2824349
                                ]
                            }
                        },
                        "Incidents": [],
                        "Notices": [],
                        "PassThroughWaypoints": [],
                        "Spans": [],
                        "Tolls": [],
                        "TollSystems": [],
                        "TravelSteps": [
                            {
                                "Distance": 1288,
                                "Duration": 102,
                                "ExitNumber": [],
                                "GeometryOffset": 0,
                                "Type": "Depart"
                            },
                            {
                                "Distance": 262,
                                "Duration": 24,
                                "ExitNumber": [],
                                "GeometryOffset": 37,
                                "RampStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "Type": "Ramp"
                            },
                            {
                                "Distance": 1356,
                                "Duration": 134,
                                "ExitNumber": [],
                                "GeometryOffset": 42,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 7092,
                                "Duration": 568,
                                "ExitNumber": [],
                                "GeometryOffset": 92,
                                "KeepStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Left"
                                },
                                "Type": "Keep"
                            },
                            {
                                "Distance": 65,
                                "Duration": 26,
                                "ExitNumber": [],
                                "GeometryOffset": 337,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Left",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 50,
                                "Duration": 18,
                                "ExitNumber": [],
                                "GeometryOffset": 339,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 0,
                                "Duration": 0,
                                "ExitNumber": [],
                                "GeometryOffset": 343,
                                "Type": "Arrive"
                            }
                        ],
                        "TruckRoadTypes": [],
                        "Zones": []
                    }
                }
            ],
            "MajorRoadLabels": [
                {
                    "RouteNumber": {
                        "Language": "en",
                        "Value": "HWY-1A"
                    }
                }
            ]
        }
    ]
}
```

------
#### [ cURL ]

```
curl --request POST \
  --url 'https://routes.geo.eu-central-1.amazonaws.com/v2/routes?key=Your_key' \
  --header 'Content-Type: application/json' \
  --data '{
  "Origin": [
    -123.118105,
    49.282423
  ],
  "Destination": [
    -123.020098,
    49.232872
  ],
  "TravelMode": "Car",
  "OptimizeRoutingFor": "FastestRoute"
}'
```

------
#### [ AWS CLI ]

```
aws geo-routes calculate-routes --key ${YourKey} \
--origin -123.118105 49.282423 \
--destination -123.020098 49.232872 \
--travel-mode "Car" \
--optimize-routing-for "FastestRoute"
```

------

# Cómo encontrar las rutas más cortas
<a name="calculate-routes-custom-avoidance-shortest"></a>

La API de CalculateRoutes lo ayuda a encontrar las rutas más cortas entre el origen y el destino.

## Casos de uso potenciales
<a name="calculate-routes-short-potential-use"></a>
+ **Optimice las rutas para ahorrar tiempo:** mejore las operaciones de entrega calculando la ruta más corta. Esto es útil para reducir la distancia de viaje en los servicios de logística y entrega.

## Ejemplos
<a name="calculate-routes-short-examples"></a>

### Utilice CalculateRoutes para encontrar la ruta más corta y ahorrar en la distancia de viaje.
<a name="calculate-routes-shortest"></a>

------
#### [ Sample request ]

```
{
    "Origin": [
        -123.118105,
        49.282423
    ],
    "Destination": [
        -123.020098,
        49.232872
    ],
    "TravelMode": "Car",
    "OptimizeRoutingFor": "ShortestRoute"
}
```

------
#### [ Sample response ]

```
{
    "LegGeometryFormat": "FlexiblePolyline",
    "Notices": [],
    "Routes": [
        {
            "Legs": [
                {
                    "Geometry": {
                        "Polyline": "Redacted"
                    },
                    "TravelMode": "Car",
                    "Type": "Vehicle",
                    "VehicleLegDetails": {
                        "AfterTravelSteps": [],
                        "Arrival": {
                            "Place": {
                                "ChargingStation": false,
                                "OriginalPosition": [
                                    -123.020098,
                                    49.232872
                                ],
                                "Position": [
                                    -123.0203051,
                                    49.2328499
                                ]
                            }
                        },
                        "Departure": {
                            "Place": {
                                "ChargingStation": false,
                                "OriginalPosition": [
                                    -123.1181051,
                                    49.282423
                                ],
                                "Position": [
                                    -123.1180883,
                                    49.2824349
                                ]
                            }
                        },
                        "Incidents": [],
                        "Notices": [],
                        "PassThroughWaypoints": [],
                        "Spans": [],
                        "Tolls": [],
                        "TollSystems": [],
                        "TravelSteps": [
                            {
                                "Distance": 1288,
                                "Duration": 102,
                                "ExitNumber": [],
                                "GeometryOffset": 0,
                                "Type": "Depart"
                            },
                            {
                                "Distance": 262,
                                "Duration": 24,
                                "ExitNumber": [],
                                "GeometryOffset": 37,
                                "RampStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right"
                                },
                                "Type": "Ramp"
                            },
                            {
                                "Distance": 1356,
                                "Duration": 134,
                                "ExitNumber": [],
                                "GeometryOffset": 42,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 7092,
                                "Duration": 568,
                                "ExitNumber": [],
                                "GeometryOffset": 92,
                                "KeepStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Left"
                                },
                                "Type": "Keep"
                            },
                            {
                                "Distance": 65,
                                "Duration": 26,
                                "ExitNumber": [],
                                "GeometryOffset": 337,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Left",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 50,
                                "Duration": 18,
                                "ExitNumber": [],
                                "GeometryOffset": 339,
                                "TurnStepDetails": {
                                    "Intersection": [],
                                    "SteeringDirection": "Right",
                                    "TurnIntensity": "Typical"
                                },
                                "Type": "Turn"
                            },
                            {
                                "Distance": 0,
                                "Duration": 0,
                                "ExitNumber": [],
                                "GeometryOffset": 343,
                                "Type": "Arrive"
                            }
                        ],
                        "TruckRoadTypes": [],
                        "Zones": []
                    }
                }
            ],
            "MajorRoadLabels": [
                {
                    "RouteNumber": {
                        "Language": "en",
                        "Value": "HWY-1A"
                    }
                }
            ]
        }
    ]
}
```

------
#### [ cURL ]

```
curl --request POST \
  --url 'https://routes.geo.eu-central-1.amazonaws.com/v2/routes?key=Your_key' \
  --header 'Content-Type: application/json' \
  --data '{
    "Origin": [
        -123.118105,
        49.282423
    ],
    "Destination": [
        -123.020098,
        49.232872
    ],
    "TravelMode": "Car",
    "OptimizeRoutingFor": "ShortestRoute"
}'
```

------
#### [ AWS CLI ]

```
aws geo-routes calculate-routes --key ${YourKey} \
--origin -123.118105 49.282423 \
--destination -123.020098 49.232872 \
--travel-mode "Scooter" \
--optimize-routing-for "ShortestRoute"
```

------