

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

# 올바른 결과를 위한 역방향 지오코딩하는 방법
<a name="reverse-geocode-filter-right-result"></a>

이 가이드에서는 역방향 지오코딩 결과를 구체화하여 반환된 데이터가 특정 비즈니스 요구 사항에 부합하도록 하는 방법을 제공합니다. 필터를 사용하면 사용자는 결과를 좁혀 주소 지점, 거리 또는 지역과 같은 유형을 보다 정확하게 일치시킬 수 있습니다.

## 잠재적 사용 사례
<a name="reverse-geocode-potential-use"></a>
+ **특정 요구 사항에 대한 결과 제한:** 필터를 사용하여 비즈니스 요구 사항에 따라 정확한 주소 또는 광범위한 로컬리티 데이터와 같은 가장 관련성이 높은 정보만 검색합니다.

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

### 포인트 주소 필터링
<a name="reverse-geocode-point-address"></a>

`PointAddress`에 대해 필터링하면 특정 거리 주소를 검색하여 위치 정확도를 높일 수 있습니다.

------
#### [ Sample Request ]

```
{
    "QueryPosition": [
        -97.721, 30.404
    ],
    "Filter": {
        "IncludePlaceTypes": [
            "PointAddress"
        ]
    }
}
```

------
#### [ Sample Response ]

```
{
    "ResultItems": [
        {
            "PlaceId": "<Redacted>",
            "PlaceType": "PointAddress",
            "Title": "11721 Domain Blvd, Austin, TX 78758-0051, United States",
            "Address": {
                "Label": "11721 Domain Blvd, Austin, TX 78758-0051, United States",
                "Country": {
                    "Code2": "US",
                    "Code3": "USA",
                    "Name": "United States"
                },
                "Region": {
                    "Code": "TX",
                    "Name": "Texas"
                },
                "SubRegion": {
                    "Name": "Travis"
                },
                "Locality": "Austin",
                "District": "North Burnet",
                "PostalCode": "78758-0051",
                "Street": "Domain Blvd",
                "StreetComponents": [
                    {
                        "BaseName": "Domain",
                        "Type": "Blvd",
                        "TypePlacement": "AfterBaseName",
                        "TypeSeparator": " ",
                        "Language": "en"
                    }
                ],
                "AddressNumber": "11721"
            },
            "Position": [
                -97.72087,
                30.404
            ],
            "Distance": 5,
            "MapView": [
                -97.72219,
                30.40273,
                -97.72057,
                30.40649
            ]
        }
    ]
}
```

------
#### [ 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": [
        -97.721,  30.404
    ],
    "Filter": {
        "IncludePlaceTypes": [
            "PointAddress"
        ]
    }'
```

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

```
aws geo-places reverse-geocode --key ${YourKey} --query-position -97.721 30.404 --filter '{"IncludePlaceTypes": ["PointAddress"]}'
```

------

### 거리 필터링
<a name="reverse-geocode-street"></a>

`Street`에 대해 필터링하면 API는 특정 주소 번호 없이 거리 수준 데이터를 반환합니다.

------
#### [ Sample Request ]

```
{
    "QueryPosition": [
        -97.721, 30.404
    ],
    "Filter": {
        "IncludePlaceTypes": [
            "Street"
        ]
    }
}
```

------
#### [ Sample Response ]

```
{
    "ResultItems": [
        {
            "PlaceId": "<Redacted>",
            "PlaceType": "Street",
            "Title": "Domain Blvd, Austin, TX 78758, United States",
            "Address": {
                "Label": "Domain Blvd, Austin, TX 78758, United States",
                "Country": {
                    "Code2": "US",
                    "Code3": "USA",
                    "Name": "United States"
                },
                "Region": {
                    "Code": "TX",
                    "Name": "Texas"
                },
                "SubRegion": {
                    "Name": "Travis"
                },
                "Locality": "Austin",
                "District": "North Burnet",
                "PostalCode": "78758",
                "Street": "Domain Blvd",
                "StreetComponents": [
                    {
                        "BaseName": "Domain",
                        "Type": "Blvd",
                        "TypePlacement": "AfterBaseName",
                        "TypeSeparator": " ",
                        "Language": "en"
                    }
                ]
            },
            "Position": [
                -97.72103,
                30.40399
            ],
            "Distance": 3,
            "MapView": [
                -97.72219,
                30.40273,
                -97.72057,
                30.40649
            ]
        }
    ]
}
```

------
#### [ 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": [
        -97.721,  30.404
    ],
    "Filter": {
        "IncludePlaceTypes": [
            "Street"
        ]
    }'
```

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

```
aws geo-places reverse-geocode --key ${YourKey} --query-position -97.721 30.404 --filter '{"IncludePlaceTypes": ["Street"]}'
```

------

### 로컬리티 필터링
<a name="reverse-geocode-locality"></a>

`Locality`에 대해 필터링하면 도시 이름을 포함하여 더 광범위한 위치 데이터를 검색할 수 있습니다.

------
#### [ Sample Request ]

```
{
    "QueryPosition": [
        -97.721, 30.404
    ],
    "Filter": {
        "IncludePlaceTypes": [
            "Locality"
        ]
    }
}
```

------
#### [ Sample Response ]

```
{
    "ResultItems": [
        {
            "PlaceId": "<Redacted>",
            "PlaceType": "Locality",
            "Title": "Austin, TX, United States",
            "Address": {
                "Label": "Austin, TX, United States",
                "Country": {
                    "Code2": "US",
                    "Code3": "USA",
                    "Name": "United States"
                },
                "Region": {
                    "Code": "TX",
                    "Name": "Texas"
                },
                "SubRegion": {
                    "Name": "Travis"
                },
                "Locality": "Austin",
                "PostalCode": "78701"
            },
            "Position": [
                -97.74299,
                30.26759
            ],
            "Distance": 0,
            "MapView": [
                -98.06484,
                30.06592,
                -97.55914,
                30.51965
            ]
        }
    ]
}
```

------
#### [ 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": [
        -97.721,  30.404
    ],
    "Filter": {
        "IncludePlaceTypes": [
            "Locality"
        ]
    }'
```

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

```
aws geo-places reverse-geocode --key ${YourKey} --query-position -97.721 30.404 --filter '{"IncludePlaceTypes": ["Locality"]}'
```

------