

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 如何取得交集
<a name="reverse-how-to-get-intersections"></a>

ReverseGeocode API 可以將附近的交集擷取到指定的位置。

## 潛在的使用案例
<a name="reversed-goecode-intersections-potential-use"></a>

**擷取所有附近的交集。 **這可供緊急服務和貨運業者使用。緊急回應車輛通常需要識別附近的交集，以便在回應呼叫時獲得最佳定位。這可讓他們維持清晰的存取路由和更快的回應時間，同時確保多種方法的可見性。同樣地，貨運業者可以利用交集資料來尋找更有效率的停駐點，尤其是在door-to-door可能受限的密集城市區域。

## 取得附近的交集
<a name="get-nearby-intersections"></a>

當結果類型為 Street、PointAddress 或 InterpolatedAddress 時，會傳回交集。若要確保您取得附近的交集，請設定 Street、PointAddress 或 InterpolatedAddress 類型的 `Heading` 參數或篩選條件。

## 取得具有標題的鄰近交集
<a name="reverse-geocode-intersections-heading-example"></a>

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

```
{
   "QueryPosition": [-123.11694, 49.28126],
   "AdditionalFeatures": ["Intersections"],
   "Heading": 45
}
```

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

```
{
    "ResultItems": [
        {
            "PlaceId": "<Redacted>",
            "PlaceType": "PointAddress",
            "Title": "510 W Georgia St, Vancouver, BC V6B 0M3, Canada",
            "Address": {
                "Label": "510 W Georgia St, Vancouver, BC V6B 0M3, Canada",
                "Country": {
                    "Code2": "CA",
                    "Code3": "CAN",
                    "Name": "Canada"
                },
                "Region": {
                    "Code": "BC",
                    "Name": "British Columbia"
                },
                "SubRegion": {
                    "Name": "Metro Vancouver"
                },
                "Locality": "Vancouver",
                "District": "Downtown Vancouver",
                "PostalCode": "V6B 0M3",
                "Street": "W Georgia St",
                "StreetComponents": [
                    {
                        "BaseName": "Georgia",
                        "Type": "St",
                        "TypePlacement": "AfterBaseName",
                        "TypeSeparator": " ",
                        "Prefix": "W",
                        "Language": "en"
                    }
                ],
                "AddressNumber": "510"
            },
            "Position": [
                -123.11694,
                49.28126
            ],
            "Distance": 0,
            "MapView": [
                -123.11813,
                49.27786,
                -123.11076,
                49.28246
            ],
            "Intersections": [
                {
                    "PlaceId": "<Redacted>",
                    "Title": "W Georgia St & Richards St, Vancouver, BC V6B, Canada",
                    "Address": {
                        "Label": "W Georgia St & Richards St, Vancouver, BC V6B, Canada",
                        "PostalCode": "V6B",
                        "Intersection": [
                            "W Georgia St",
                            "Richards St"
                        ]
                    },
                    "Position": [
                        -123.11614,
                        49.28124
                    ],
                    "Distance": 58
                },
                {
                    "PlaceId": "<Redacted>",
                    "Title": "W Georgia St & Seymour St, Vancouver, BC V6B, Canada",
                    "Address": {
                        "Label": "W Georgia St & Seymour St, Vancouver, BC V6B, Canada",
                        "PostalCode": "V6B",
                        "Intersection": [
                            "W Georgia St",
                            "W Georgia St",
                            "Seymour St",
                            "Seymour St"
                        ]
                    },
                    "Position": [
                        -123.11712,
                        49.28186
                    ],
                    "Distance": 68
                }
            ]
        }
    ]
}
```

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

```
curl --request POST \
   --url 'https://places.geo.eu-central-1.amazonaws.com/v2/reverse-geocode?key=Your_Key' \
   --header 'Content-Type: application/json' \
   --data '{
      "QueryPosition": [
         -123.11694, 49.28126
      ],
      "AdditionalFeatures": ["Intersections"],
      "Heading": 45
}
```

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

```
aws geo-places reverse-geocode --key ${YourKey} --query-position -123.11694, 49.28126 --additional-features "Intersections" --heading 45
```

------

## 使用街道篩選條件取得附近的交集
<a name="reverse-geocode-intersections-street-example"></a>

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

```
{
   "QueryPosition": [-123.11694, 49.28126],
   "AdditionalFeatures": ["Intersections"],
   "Filter": {
       "IncludePlaceTypes": ["Street"]
   }
}
```

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

```
{
    "ResultItems": [
        {
            "PlaceId": "<Redacted>",
            "PlaceType": "Street",
            "Title": "W Georgia St, Vancouver, BC V6B, Canada",
            "Address": {
                "Label": "W Georgia St, Vancouver, BC V6B, Canada",
                "Country": {
                    "Code2": "CA",
                    "Code3": "CAN",
                    "Name": "Canada"
                },
                "Region": {
                    "Code": "BC",
                    "Name": "British Columbia"
                },
                "SubRegion": {
                    "Name": "Metro Vancouver"
                },
                "Locality": "Vancouver",
                "District": "Downtown Vancouver",
                "PostalCode": "V6B",
                "Street": "W Georgia St",
                "StreetComponents": [
                    {
                        "BaseName": "Georgia",
                        "Type": "St",
                        "TypePlacement": "AfterBaseName",
                        "TypeSeparator": " ",
                        "Prefix": "W",
                        "Language": "en"
                    }
                ]
            },
            "Position": [
                -123.11694,
                49.28126
            ],
            "Distance": 0,
            "MapView": [
                -123.11813,
                49.27786,
                -123.11076,
                49.28246
            ],
            "Intersections": [
                {
                    "PlaceId": "<Redacted>",
                    "Title": "W Georgia St & Richards St, Vancouver, BC V6B, Canada",
                    "Address": {
                        "Label": "W Georgia St & Richards St, Vancouver, BC V6B, Canada",
                        "PostalCode": "V6B",
                        "Intersection": [
                            "W Georgia St",
                            "Richards St"
                        ]
                    },
                    "Position": [
                        -123.11614,
                        49.28124
                    ],
                    "Distance": 58
                },
                {
                    "PlaceId": "<Redacted>",
                    "Title": "W Georgia St & Seymour St, Vancouver, BC V6B, Canada",
                    "Address": {
                        "Label": "W Georgia St & Seymour St, Vancouver, BC V6B, Canada",
                        "PostalCode": "V6B",
                        "Intersection": [
                            "W Georgia St",
                            "W Georgia St",
                            "Seymour St",
                            "Seymour St"
                        ]
                    },
                    "Position": [
                        -123.11712,
                        49.28186
                    ],
                    "Distance": 68
                }
            ]
        }
    ]
}
```

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

```
curl --request POST \
   --url 'https://places.geo.eu-central-1.amazonaws.com/v2/reverse-geocode?key=Your_Key' \
   --header 'Content-Type: application/json' \
   --data '{
      "QueryPosition": [
         -123.11694, 49.28126
      ],
      "AdditionalFeatures": ["Intersections"],
      "Filter": {
          "IncludePlaceTypes": ["Street"]
      }
}'
```

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

```
aws geo-places reverse-geocode --key ${YourKey} --query-position -123.11694, 49.28126 --additional-features "Intersections" --filter '{"IncludePlaceTypes": ["Street"]}'
```

------