

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

# 전송 경로를 찾는 방법
<a name="calculate-routes-transit-route"></a>

CalculateRoutes API는 버스, 고속도로, 열차 및 모노레일과 같은 대중 교통을 사용하여 경로를 계산하는 `Transit` 이동 모드를 지원합니다. 교통 경로에는 교통 정류장으로 들어오고 나갈 수 있는 보행자 다리가 포함됩니다.

## 잠재적 사용 사례
<a name="transit-potential-use-cases"></a>
+ **대중교통 여정 계획: 정류장까지 오가는** 길을 포함하여 두 위치 간에 가장 적합한 대중교통 경로를 찾습니다.
+ **전송 모드 필터링:** `AllowedModes`를 사용하여 특정 전송 유형(예: 하위 경로 및 버스만 해당)으로 경로를 제한하거나 `ExcludedModes`를 사용하여 원치 않는 모드(예: 페리 제외)를 제거합니다.

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

### 퍼블릭 전송을 사용하여 경로 계산
<a name="calculate-routes-transit-mode"></a>

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

```
{
    "Origin": [
        -122.3331,
        47.6097
    ],
    "Destination": [
        -122.3493,
        47.6205
    ],
    "TravelMode": "Transit",
    "DepartNow": true
}
```

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

```
{
    "PricingBucket": "Core",
    "LegGeometryFormat": "FlexiblePolyline",
    "Notices": [],
    "Routes": [
        {
            "Legs": [
                {
                    "Geometry": {
                        "Polyline": "Redacted"
                    },
                    "PedestrianLegDetails": {
                        "Arrival": {
                            "Place": {
                                "Name": "Westlake Center",
                                "Position": [
                                    -122.33696,
                                    47.612046
                                ]
                            },
                            "Time": "2026-05-15T12:55:00-07:00"
                        },
                        "Departure": {
                            "Place": {
                                "Position": [
                                    -122.3331,
                                    47.6097
                                ]
                            },
                            "Time": "2026-05-15T12:47:00-07:00"
                        },
                        "PassThroughWaypoints": [],
                        "Spans": [],
                        "TravelSteps": [
                            {
                                "Distance": 61,
                                "Duration": 70,
                                "GeometryOffset": 0,
                                "Instruction": "Head northwest on 6th Ave. Go for 61 m.",
                                "Type": "Depart"
                            },
                            {
                                "Distance": 96,
                                "Duration": 106,
                                "GeometryOffset": 3,
                                "Instruction": "Turn left onto Union St. Go for 96 m.",
                                "Type": "Depart"
                            },
                            {
                                "Distance": 315,
                                "Duration": 315,
                                "GeometryOffset": 5,
                                "Instruction": "Turn right onto 5th Ave. Go for 315 m.",
                                "Type": "Depart"
                            },
                            {
                                "Distance": 0,
                                "Duration": 0,
                                "GeometryOffset": 10,
                                "Instruction": "Arrive at 5th Ave. Your destination is on the left.",
                                "Type": "Depart"
                            }
                        ]
                    },
                    "TravelMode": "Pedestrian",
                    "Type": "Pedestrian"
                },
                {
                    "Geometry": {
                        "Polyline": "Redacted"
                    },
                    "TravelMode": "Monorail",
                    "Type": "Transit"
                },
                {
                    "Geometry": {
                        "Polyline": "Redacted"
                    },
                    "PedestrianLegDetails": {
                        "Arrival": {
                            "Place": {
                                "Position": [
                                    -122.3493,
                                    47.6205
                                ]
                            },
                            "Time": "2026-05-15T13:00:00-07:00"
                        },
                        "Departure": {
                            "Place": {
                                "Name": "Seattle Center",
                                "Position": [
                                    -122.349955,
                                    47.621263
                                ]
                            },
                            "Time": "2026-05-15T12:58:00-07:00"
                        },
                        "PassThroughWaypoints": [],
                        "Spans": [],
                        "TravelSteps": [
                            {
                                "Distance": 37,
                                "Duration": 37,
                                "GeometryOffset": 0,
                                "Instruction": "Head south. Go for 37 m.",
                                "Type": "Depart"
                            },
                            {
                                "Distance": 33,
                                "Duration": 33,
                                "GeometryOffset": 1,
                                "Instruction": "Turn left onto Lenny Wilkens Way. Go for 33 m.",
                                "Type": "Depart"
                            },
                            {
                                "Distance": 49,
                                "Duration": 49,
                                "GeometryOffset": 2,
                                "Instruction": "Turn right. Go for 49 m.",
                                "Type": "Depart"
                            },
                            {
                                "Distance": 0,
                                "Duration": 0,
                                "GeometryOffset": 6,
                                "Instruction": "Arrive at your destination on the left.",
                                "Type": "Depart"
                            }
                        ]
                    },
                    "TravelMode": "Pedestrian",
                    "Type": "Pedestrian"
                }
            ],
            "Summary": {
                "Distance": 0,
                "Duration": 0
            }
        }
    ]
}
```

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

```
curl --request POST \
  --url 'https://routes.geo.us-east-1.amazonaws.com/v2/routes?key=Your_key' \
  --header 'Content-Type: application/json' \
  --data '{
  "Origin": [
    -122.3331,
    47.6097
  ],
  "Destination": [
    -122.3493,
    47.6205
  ],
  "TravelMode": "Transit",
  "DepartNow": true
}'
```

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

```
aws geo-routes calculate-routes \
--origin -122.3331 47.6097 \
--destination -122.3493 47.6205 \
--travel-mode "Transit" \
--depart-now
```

------

### 특정 전송 모드를 제외한 퍼블릭 전송을 사용하여 경로 계산
<a name="calculate-routes-transit-excluded-modes"></a>

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

```
{
    "Origin": [
        -122.3331,
        47.6097
    ],
    "Destination": [
        -122.3493,
        47.6205
    ],
    "TravelMode": "Transit",
    "TravelModeOptions": {
        "Transit": {
            "ExcludedModes": ["Monorail"]
        }
    },
    "DepartNow": true
}
```

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

```
{
    "LegGeometryFormat": "FlexiblePolyline",
    "Notices": [],
    "Routes": [
        {
            "Legs": [
                {
                    "Geometry": {
                        "Polyline": "Redacted"
                    },
                    "PedestrianLegDetails": {
                        "Arrival": {
                            "Place": {
                                "Name": "3rd Ave & Pike St",
                                "Position": [
                                    -122.337585,
                                    47.609642
                                ]
                            },
                            "Time": "2026-05-15T12:58:00-07:00"
                        },
                        "Departure": {
                            "Place": {
                                "Position": [
                                    -122.3331,
                                    47.6097
                                ]
                            },
                            "Time": "2026-05-15T12:50:00-07:00"
                        },
                        "TravelSteps": [
                            {
                                "Distance": 61,
                                "Duration": 70,
                                "Instruction": "Head northwest on 6th Ave. Go for 61 m.",
                                "Type": "Depart"
                            },
                            {
                                "Distance": 294,
                                "Duration": 304,
                                "Instruction": "Turn left onto Union St. Go for 294 m.",
                                "Type": "Depart"
                            },
                            {
                                "Distance": 112,
                                "Duration": 112,
                                "Instruction": "Turn right onto 3rd Ave. Go for 112 m.",
                                "Type": "Depart"
                            }
                        ]
                    },
                    "TravelMode": "Pedestrian",
                    "Type": "Pedestrian"
                },
                {
                    "Geometry": {
                        "Polyline": "Redacted"
                    },
                    "TravelMode": "Bus",
                    "Type": "Transit",
                    "TransitLegDetails": {
                        "Agency": {
                            "Name": "Metro Transit"
                        },
                        "Arrival": {
                            "Place": {
                                "Name": "7th Ave N & Denny Way",
                                "Position": [
                                    -122.343445,
                                    47.619087
                                ]
                            },
                            "Time": "2026-05-15T13:00:00-07:00"
                        },
                        "Departure": {
                            "Place": {
                                "Name": "3rd Ave & Pike St",
                                "Position": [
                                    -122.337585,
                                    47.609642
                                ]
                            },
                            "Time": "2026-05-15T12:58:00-07:00"
                        },
                        "Transport": {
                            "Color": "#9C182F",
                            "Headsign": "Aurora Village Transit Center",
                            "Mode": "Bus",
                            "RouteName": "E Line",
                            "ShortRouteName": "E Line",
                            "TextColor": "#FFFFFF"
                        }
                    }
                },
                {
                    "Geometry": {
                        "Polyline": "Redacted"
                    },
                    "PedestrianLegDetails": {
                        "Arrival": {
                            "Place": {
                                "Position": [
                                    -122.3493,
                                    47.6205
                                ]
                            },
                            "Time": "2026-05-15T13:10:00-07:00"
                        },
                        "Departure": {
                            "Place": {
                                "Name": "7th Ave N & Denny Way",
                                "Position": [
                                    -122.343445,
                                    47.619087
                                ]
                            },
                            "Time": "2026-05-15T13:00:00-07:00"
                        },
                        "TravelSteps": [
                            {
                                "Distance": 71,
                                "Duration": 80,
                                "Instruction": "Head north on 7th Ave N. Go for 71 m.",
                                "Type": "Depart"
                            },
                            {
                                "Distance": 436,
                                "Duration": 440,
                                "Instruction": "Turn left onto John St. Go for 436 m.",
                                "Type": "Depart"
                            }
                        ]
                    },
                    "TravelMode": "Pedestrian",
                    "Type": "Pedestrian"
                }
            ],
            "Summary": {
                "Distance": 0,
                "Duration": 0
            }
        }
    ]
}
```

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

```
curl --request POST \
  --url 'https://routes.geo.us-east-1.amazonaws.com/v2/routes?key=Your_key' \
  --header 'Content-Type: application/json' \
  --data '{
  "Origin": [
    -122.3331,
    47.6097
  ],
  "Destination": [
    -122.3493,
    47.6205
  ],
  "TravelMode": "Transit",
  "TravelModeOptions": {
    "Transit": {
      "ExcludedModes": ["Monorail"]
    }
  },
  "DepartNow": true
}'
```

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

```
aws geo-routes calculate-routes \
--origin -122.3331 47.6097 \
--destination -122.3493 47.6205 \
--travel-mode "Transit" \
--travel-mode-options '{"Transit": {"ExcludedModes": ["Monorail"]}}' \
--depart-now
```

------