

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# CalculateRoutes 사용 방법 알아보기
<a name="calculate-routes-how-to"></a>

이 섹션에서는 `CalculateRoutes` 사용에 대한 단계별 지침을 제공합니다. 이 주제에서는 단계별 탐색 통합, 이동 모드 설정, 웨이포인트 추가와 같은 특정 구성으로 경로를 찾는 방법에 대한 지침을 자세히 설명합니다.

**Topics**
+ [출발지 및 목적지의 경로를 찾는 방법](calculate-routes-origin-destination-waypoints.md)
+ [단계별 방향이 있는 경로를 찾는 방법](how-to-find-turn-by-turn-route.md)
+ [도로 구간의 속도 제한을 찾는 방법](calculate-routes-speed-limit-road.md)
+ [대체 경로를 찾는 방법](calculate-routes-alternate.md)
+ [경로에 대한 통행료 계산 방법](calculate-routes-tolls.md)
+ [사용자 지정 회피를 사용하여 경로를 생성하는 방법](calculate-routes-custom-avoidance-poly.md)
+ [여러 잠재적 항목의 사용자 지정 회피를 통해 경로를 생성하는 방법](calculate-routes-custom-avoidance-multiple.md)
+ [가장 빠른 경로를 찾는 방법](calculate-routes-custom-avoidance-fast.md)
+ [최단 경로를 찾는 방법](calculate-routes-custom-avoidance-shortest.md)

# 출발지 및 목적지의 경로를 찾는 방법
<a name="calculate-routes-origin-destination-waypoints"></a>

CalculateRoutes API를 사용하면 출발지와 목적지 간 최적의 경로와 드라이버의 휴식을 위한 최적의 기회를 찾을 수 있습니다. 트럭, 보행자, 자동차 및 스쿠터와 같은 이동 모드를 지원합니다. 또한 출발지 및 목적지를 포함하여 최대 25개의 중간 지점(경유지)을 지원하며 몇 가지 제약 조건만 있습니다.

## 잠재적 사용 사례
<a name="potential-use-cases"></a>
+ **지점 간 경로 찾기:** 다양한 이동 모드와 추가 옵션을 기반으로 두 위치 간 최적의 경로를 결정합니다.

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

### Car 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
```

------

# 단계별 방향이 있는 경로를 찾는 방법
<a name="how-to-find-turn-by-turn-route"></a>

CalculateRoutes API를 사용하면 출발지와 목적지 간 최적의 경로와 드라이버의 휴식을 위한 최적의 기회를 찾을 수 있습니다. 자동차, 트럭, 보행자 및 스쿠터와 같은 이동 모드를 지원합니다. 또한 출발지 및 목적지를 포함하여 최대 25개의 웨이포인트(경유지)를 지원하며 몇 가지 제약 조건만 있습니다.

## 잠재적 사용 사례
<a name="potential-use-cases-turn-by-turn"></a>
+ **탐색 모바일 앱 생성:** API를 사용하여 단계별 탐색 지침을 가져옵니다.
+ **웹 플랫폼에 방향 표시:** 탐색에 도움이 되는 웹 애플리케이션에 대한 자세한 경로 지침을 표시합니다.

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

### Car 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"
```

------

# 도로 구간의 속도 제한을 찾는 방법
<a name="calculate-routes-speed-limit-road"></a>

CalculateRoutes API를 사용하면 출발지와 목적지 간 최적의 경로와 드라이버의 휴식을 위한 최적의 기회를 찾을 수 있습니다. 자동차, 트럭, 보행자 및 스쿠터와 같은 이동 모드를 지원합니다. 또한 출발지 및 목적지를 포함하여 최대 25개의 웨이포인트(경유지)를 지원하며 몇 가지 제약 조건만 있습니다.

## 잠재적 사용 사례
<a name="potential-use-cases"></a>
+ **속도 제한 규정 준수 감사:** 속도 제한 및 속도 제한에 대한 규정 준수 사항을 항상 인지합니다.
+ **드라이버에게 속도 제한 알림:** 속도 제한이 명확하지 않은 경우 드라이버에게 속도 제한을 알립니다.

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

### Car 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"
```

------

# 대체 경로를 찾는 방법
<a name="calculate-routes-alternate"></a>

CalculateRoutes API를 사용하면 출발지와 목적지 간 최적의 경로와 드라이버의 휴식을 위한 최적의 기회를 찾을 수 있습니다. 자동차, 트럭, 보행자 및 스쿠터와 같은 이동 모드를 지원합니다. 또한 출발지 및 목적지를 포함하여 최대 25개의 웨이포인트(경유지)를 지원하며 몇 가지 제약 조건만 있습니다.

## 잠재적 사용 사례
<a name="potential-use-cases"></a>
+ **대체 경로 파악:** 비즈니스 요구 사항에 가장 적합한 경로를 선택할 수 있습니다.

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

### Car 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
```

------

# 경로에 대한 통행료 계산 방법
<a name="calculate-routes-tolls"></a>

CalculateRoutes API를 사용하면 출발지와 목적지 간 최적의 경로와 드라이버의 휴식을 위한 최적의 기회를 찾을 수 있습니다. 자동차, 트럭, 보행자 및 스쿠터와 같은 이동 모드를 지원합니다. 또한 출발지 및 목적지를 포함하여 최대 25개의 웨이포인트(경유지)를 지원하며 몇 가지 제약 조건만 있습니다.

## 잠재적 사용 사례
<a name="potential-use-cases"></a>
+ **통행료 계산:** 경로 계획 중에 통행료를 계산할 수 있습니다.
+ **통행료 감사:** 이동 후 통행료를 감사할 수 있습니다.

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

### Car 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}'
```

------

# 사용자 지정 회피를 사용하여 경로를 생성하는 방법
<a name="calculate-routes-custom-avoidance-poly"></a>

CalculateRoutes API를 사용하면 출발지와 목적지 간 최적의 경로와 드라이버의 휴식을 위한 최적의 기회를 찾을 수 있습니다. 자동차, 트럭, 보행자 및 스쿠터와 같은 이동 모드를 지원합니다. 또한 출발지 및 목적지를 포함하여 최대 25개의 웨이포인트(경유지)를 지원하며 몇 가지 제약 조건만 있습니다.

## 잠재적 사용 사례
<a name="potential-use-cases"></a>
+ **사용자 지정 회피를 통해 경로 계산:** 더 나은 경로와 출퇴근 계획을 위해 회피를 통해 경로를 사용자 지정합니다.

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

### CalculateRoutes를 BoundingBox 회피와 함께 사용하여 사용자 지정 경로를 생성합니다.
<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]}}]}'
```

------

### CalculateRoutes를 다각형 회피와 함께 사용하여 사용자 지정 경로를 생성합니다.
<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]]]}}]}'
```

------

### CalculateRoutes를 PolylinePolygon과 함께 사용하여 사용자 지정 경로를 생성합니다.
<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"]}}]}'
```

------

### CalculateRoutes를 Corridor 회피와 함께 사용하여 사용자 지정 경로를 생성합니다.
<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}}}]}'
```

------

### CalculateRoutes를 PolylineCorridor 회피와 함께 사용하여 사용자 지정 경로를 생성합니다.
<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}}}]}'
```

------

# 여러 잠재적 항목의 사용자 지정 회피를 통해 경로를 생성하는 방법
<a name="calculate-routes-custom-avoidance-multiple"></a>

CalculateRoutes API를 사용하면 출발지와 목적지 간 최적의 경로와 드라이버의 휴식을 위한 최적의 기회를 찾을 수 있습니다. 자동차, 트럭, 보행자 및 스쿠터와 같은 이동 모드를 지원합니다. 또한 출발지 및 목적지를 포함하여 최대 25개의 웨이포인트(경유지)를 지원하며 몇 가지 제약 조건만 있습니다.

## 잠재적 사용 사례
<a name="potential-use-cases"></a>
+ **사용자 지정 회피를 통해 경로 계산:** 더 나은 경로와 출퇴근 계획을 위해 회피를 통해 경로를 사용자 지정합니다.

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

### 통행료, U턴, 페리, 고속도로, 터널 등을 회피하고 CalculateRoutes를 사용합니다.
<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}'
```

------

# 가장 빠른 경로를 찾는 방법
<a name="calculate-routes-custom-avoidance-fast"></a>

CalculateRoutes API를 사용하면 출발지와 목적지 간에 가장 빠른 경로를 찾을 수 있습니다.

## 잠재적 사용 사례
<a name="calculate-routes-fast-potential-use"></a>
+ **시간 효율성을 위한 경로 최적화:** 가장 빠른 경로를 계산하여 배송 작업을 개선합니다. 이는 물류 및 배송 서비스에서 이동 시간을 줄이는 데 유용합니다.

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

### 가장 빠른 경로 계산
<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"
```

------

# 최단 경로를 찾는 방법
<a name="calculate-routes-custom-avoidance-shortest"></a>

CalculateRoutes API를 사용하면 출발지와 목적지 간의 최단 경로를 찾을 수 있습니다.

## 잠재적 사용 사례
<a name="calculate-routes-short-potential-use"></a>
+ **시간 효율성을 위한 경로 최적화:** 최단 경로를 계산하여 배송 작업을 개선합니다. 이는 물류 및 배송 서비스에서 이동 거리를 줄이는 데 유용합니다.

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

### CalculateRoutes를 사용하여 최단 경로를 찾고 이동 거리를 줄입니다.
<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"
```

------