

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# インターモーダルルートを検索する方法
<a name="calculate-routes-intermodal-route"></a>

CalculateRoutes API は、1 つのジャーニーで複数のトランスポートタイプを組み合わせたルートを計算するための`Intermodal`旅行モードをサポートしています。例えば、park-and-rideする場所への運転や、目的地への公共交通などです。歩行者レッグは常に他のトランスポートタイプ間で接続できます。

## 想定されるユースケース
<a name="intermodal-potential-use-cases"></a>
+ **駐車と乗車:** 市街地での輻輳や駐車料金を回避するために、トランジットステーションにドライブし、駐車し、公共交通を利用します。を `FirstLeg`で`Vehicle`有効に`Taxi`し、 を`Rental`無効にします。
+ **タクシーと乗車:** 開始点から適切に接続されたトランジットステーションまでタクシーに乗り、残りのジャーニーではパブリックトランジットに切り替えます。これは、公共交通によって十分に接続されていない地域や、駐車を完全に避けたい場合に便利です。を `FirstLeg`で`Taxi`有効に`Vehicle`し、 を`Rental`無効にします。
+ **ラストマイルトランジット:** ほとんどのジャーニーで公共トランジットを行い、最後のレッグでタクシーまたはレンタルを使用して最終目的地に到達します。

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

### パークとライドのインターモーダルルートを計算する
<a name="calculate-routes-intermodal-park-and-ride"></a>

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

```
{
    "Origin": [
        -122.3088,
        47.4502
    ],
    "Destination": [
        -122.3331,
        47.6097
    ],
    "TravelMode": "Intermodal",
    "TravelModeOptions": {
        "Intermodal": {
            "Vehicle": {
                "EnabledFor": ["FirstLeg"]
            },
            "Taxi": {
                "EnabledFor": ["None"]
            },
            "Rental": {
                "EnabledFor": ["None"]
            }
        }
    },
    "DepartNow": true
}
```

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

```
{
    "LegGeometryFormat": "FlexiblePolyline",
    "Notices": [],
    "Routes": [
        {
            "Legs": [
                {
                    "Geometry": {
                        "Polyline": "Redacted"
                    },
                    "TravelMode": "Car",
                    "Type": "Vehicle",
                    "VehicleLegDetails": {
                        "AfterTravelSteps": [
                            {
                                "Duration": 300,
                                "Type": "Park"
                            }
                        ],
                        "Arrival": {
                            "Place": {
                                "Name": "Ipm Lot",
                                "Position": [
                                    -122.3264,
                                    47.58003
                                ],
                                "Type": "ParkingLot"
                            },
                            "Time": "2026-05-19T15:32:00-07:00"
                        },
                        "Departure": {
                            "Place": {
                                "Position": [
                                    -122.3088,
                                    47.4502
                                ]
                            },
                            "Time": "2026-05-19T15:12:00-07:00"
                        },
                        "Summary": {
                            "Overview": {
                                "Distance": 20493,
                                "Duration": 1500
                            },
                            "TravelOnly": {
                                "Duration": 1200
                            }
                        }
                    }
                },
                {
                    "Geometry": {
                        "Polyline": "Redacted"
                    },
                    "PedestrianLegDetails": {
                        "Arrival": {
                            "Place": {
                                "Name": "Sodo Station Northeast Entrance",
                                "Position": [
                                    -122.327329,
                                    47.580637
                                ],
                                "Type": "AccessPoint"
                            },
                            "Time": "2026-05-19T15:39:00-07:00"
                        },
                        "Departure": {
                            "Place": {
                                "Name": "Ipm Lot",
                                "Position": [
                                    -122.3264,
                                    47.58003
                                ],
                                "Type": "ParkingLot"
                            },
                            "Time": "2026-05-19T15:37:00-07:00"
                        }
                    },
                    "TravelMode": "Pedestrian",
                    "Type": "Pedestrian"
                },
                {
                    "Geometry": {
                        "Polyline": "Redacted"
                    },
                    "TravelMode": "LightRail",
                    "Type": "Transit",
                    "TransitLegDetails": {
                        "Agency": {
                            "Name": "Sound Transit",
                            "Url": "https://www.soundtransit.org"
                        },
                        "Arrival": {
                            "Place": {
                                "Name": "Symphony",
                                "Position": [
                                    -122.33602,
                                    47.60781
                                ],
                                "Type": "Station"
                            },
                            "Time": "2026-05-19T15:48:00-07:00"
                        },
                        "Departure": {
                            "Place": {
                                "Name": "Sodo",
                                "Position": [
                                    -122.32739,
                                    47.581074
                                ],
                                "Type": "Station"
                            },
                            "Time": "2026-05-19T15:40:00-07:00"
                        },
                        "Summary": {
                            "Overview": {
                                "Distance": 3174,
                                "Duration": 480
                            },
                            "TravelOnly": {
                                "Duration": 480
                            }
                        },
                        "Transport": {
                            "Color": "#28813F",
                            "Headsign": "Lynnwood City Center",
                            "Mode": "LightRail",
                            "RouteName": "1 Line",
                            "ShortRouteName": "1 Line",
                            "TextColor": "#FFFFFF"
                        }
                    }
                },
                {
                    "Geometry": {
                        "Polyline": "Redacted"
                    },
                    "PedestrianLegDetails": {
                        "Arrival": {
                            "Place": {
                                "Position": [
                                    -122.3331,
                                    47.6097
                                ]
                            },
                            "Time": "2026-05-19T15:55:00-07:00"
                        },
                        "Departure": {
                            "Place": {
                                "Name": "Symphony Station Entrance A1",
                                "Position": [
                                    -122.335875,
                                    47.607929
                                ],
                                "Type": "AccessPoint"
                            },
                            "Time": "2026-05-19T15:49:00-07:00"
                        }
                    },
                    "TravelMode": "Pedestrian",
                    "Type": "Pedestrian"
                }
            ],
            "Summary": {
                "Distance": 24183,
                "Duration": 2280
            }
        }
    ]
}
```

------
#### [ 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.3088,
    47.4502
  ],
  "Destination": [
    -122.3331,
    47.6097
  ],
  "TravelMode": "Intermodal",
  "TravelModeOptions": {
    "Intermodal": {
      "Vehicle": {
        "EnabledFor": ["FirstLeg"]
      },
      "Taxi": {
        "EnabledFor": ["None"]
      },
      "Rental": {
        "EnabledFor": ["None"]
      }
    }
  },
  "DepartNow": true
}'
```

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

```
aws geo-routes calculate-routes \
--origin -122.3088 47.4502 \
--destination -122.3331 47.6097 \
--travel-mode "Intermodal" \
--travel-mode-options '{"Intermodal": {"Vehicle": {"EnabledFor": ["FirstLeg"]}, "Taxi": {"EnabledFor": ["None"]}, "Rental": {"EnabledFor": ["None"]}}}' \
--depart-now
```

------