

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

# 우편 번호를 사용하여 주소 번호를 지오코딩하는 방법
<a name="how-to-geocode-address-postal-code"></a>

우편 번호가 매우 구체적인 국가(동일한 거리의 주소 몇 개만 연결)에서는 주택 번호와 우편 번호만 사용하여 주소를 찾을 수 있습니다. 이 관행은 운송 및 배송 물류 분야에서 일반적입니다. 이 기능은 캐나다, 영국, 네덜란드, 미국(ZIP\+4), 이스라엘, 아일랜드 및 싱가포르에서 지원됩니다. 아일랜드와 싱가포르에서 우편 번호는 정확한 위치 세부 정보를 특정 주택 번호까지 제공합니다.

## 예제
<a name="geocode-postal-code-examples"></a>

### 우편 번호를 사용하여 주소 지오코딩
<a name="geocode-postal-code-example1"></a>

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

쿼리 구성 요소 사용

```
{
  "QueryComponents": {
    "AddressNumber": "1368",
    "PostalCode": "V5N 1T2"
  }
}
```

자유 텍스트 사용

```
{
  "QueryText": "1368, V5N1T2"
}
```

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

```
{
    "ResultItems": [
        {
            "PlaceId": "<Redacted>",
            "PlaceType": "PointAddress",
            "Title": "1368 E 8th Ave, Vancouver, BC V5N 1T2, Canada",
            "Address": {
                "Label": "1368 E 8th Ave, Vancouver, BC V5N 1T2, Canada",
                "Country": {
                    "Code2": "CA",
                    "Code3": "CAN",
                    "Name": "Canada"
                },
                "Region": {
                    "Code": "BC",
                    "Name": "British Columbia"
                },
                "SubRegion": {
                    "Name": "Metro Vancouver"
                },
                "Locality": "Vancouver",
                "District": "Grandview-Woodland",
                "PostalCode": "V5N 1T2",
                "Street": "E 8th Ave",
                "StreetComponents": [
                    {
                        "BaseName": "8th",
                        "Type": "Ave",
                        "TypePlacement": "AfterBaseName",
                        "TypeSeparator": " ",
                        "Prefix": "E",
                        "Language": "en"
                    }
                ],
                "AddressNumber": "1368"
            },
            "Position": [
                -123.07612,
                49.26306
            ],
            "MapView": [
                -123.0775,
                49.26216,
                -123.07474,
                49.26396
            ],
            "AccessPoints": [
                {
                    "Position": [
                        -123.07611,
                        49.26333
                    ]
                }
            ],
            "MatchScores": {
                "Overall": 1,
                "Components": {
                    "Address": {
                        "PostalCode": 1,
                        "AddressNumber": 1
                    }
                }
            }
        }
    ]
}
```

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

```
curl --request POST \
  --url 'https://places.geo.eu-central-1.amazonaws.com/v2/geocode?key=Your_Key' \
  --header 'Content-Type: application/json' \
  --data '{
  "QueryComponents": {
    "AddressNumber": "1368",
    "PostalCode": "V5N 1T2"
  }
}'
```

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

```
aws geo-places geocode --key ${YourKey} --query-components '{"AddressNumber" : "1368", "PostalCode": "V5N 1T2"}'
```

------

### 싱가포르 및 아일랜드에서 우편 번호를 사용하여 주소 지오코딩
<a name="geocode-postal-code-example2"></a>

아일랜드에서는 Eircode 시스템이 모든 가정과 기업에 고유한 코드를 할당하지만 싱가포르에서는 우편 번호가 동일하게 구체적입니다. 두 국가 모두에서 우편 번호만으로 정확한 주소를 식별할 수 있습니다. 도로명, 도시 또는 주택 번호가 필요하지 않습니다.
+ 싱가포르: 6자리 우편 번호
+ 아일랜드: 7자의 Eircode

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

쿼리 구성 요소 사용

```
{
  "QueryComponents": {
    "PostalCode": "D02 X285"
  }
}
```

자유 텍스트 사용

```
{
  "QueryText": "D02 X285"
}
```

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

```
{
    "ResultItems": [
        {
            "PlaceId": "<Redacted>",
            "PlaceType": "PointAddress",
            "Title": "29-31 Adelaide Road, Dublin, County Dublin, D02 X285, Ireland",
            "Address": {
                "Label": "29-31 Adelaide Road, Dublin, County Dublin, D02 X285, Ireland",
                "Country": {
                    "Code2": "IE",
                    "Code3": "IRL",
                    "Name": "Ireland"
                },
                "SubRegion": {
                    "Code": "D",
                    "Name": "County Dublin"
                },
                "Locality": "Dublin",
                "District": "Dublin 2",
                "PostalCode": "D02 X285",
                "Street": "Adelaide Road",
                "StreetComponents": [
                    {
                        "BaseName": "Adelaide",
                        "Type": "Road",
                        "TypePlacement": "AfterBaseName",
                        "TypeSeparator": " ",
                        "Language": "en"
                    }
                ],
                "AddressNumber": "29-31"
            },
            "Position": [
                -6.25549,
                53.33207
            ],
            "MapView": [
                -6.257,
                53.33117,
                -6.25398,
                53.33297
            ],
            "AccessPoints": [
                {
                    "Position": [
                        -6.25536,
                        53.33231
                    ]
                }
            ],
            "MatchScores": {
                "Overall": 1,
                "Components": {
                    "Address": {
                        "PostalCode": 1
                    }
                }
            }
        }
    ]
}
```

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

```
curl --request POST \
  --url 'https://places.geo.eu-central-1.amazonaws.com/v2/geocode?key=Your_Key' \
  --header 'Content-Type: application/json' \
  --data '{
  "QueryComponents": {
    "PostalCode": "D02 X285"
  }
}'
```

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

```
aws geo-places geocode --key ${YourKey} --query-components '{"PostalCode": "V5N 1T2"}'
```

------

## 개발자 팁
<a name="geocode-postal-code-dev-tips"></a>

[ZIP\+4](https://en.wikipedia.org/wiki/ZIP_Code#ZIP+4)(미국) 및 [Eircode](https://en.wikipedia.org/wiki/Postal_addresses_in_the_Republic_of_Ireland)(아일랜드)에 대해 자세히 알아보세요. 또한 캐나다, 영국, 네덜란드, 싱가포르 및 이스라엘의 우편 번호 시스템에 대해서도 알아보세요.