위치의 지오코딩을 되돌리는 방법 - Amazon Location Service

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

위치의 지오코딩을 되돌리는 방법

역방향 지오코드 API를 사용하면 위치 쿼리를 기반으로 지오코드를 지리적 영역으로 변환할 수 있습니다. API 응답에는 특정 좌표와 연결된 위치에 대한 정보를 제공하는 장소 세부 정보가 포함됩니다.

잠재적 사용 사례

  • 장소 정보 저장: 지리 좌표가 포함된 데이터 스토어에 장소 세부 정보를 추가합니다.

  • 맵 시각화: 장소 정보를 사용하여 맵에 데이터를 표시합니다.

  • 사용자 위치 감지: 디바이스 위치를 기반으로 사용자의 위치를 식별합니다.

Sample request
{ "QueryPosition": [ -123.11694, 49.28126 ] }
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], "AccessPoints": [ { "Position": [-123.11656, 49.28151] } ] } ] }
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 ] }'
AWS CLI
aws geo-places reverse-geocode --key ${YourKey} --query-position "-123.11694,49.28126"
Sample request
{ "QueryPosition": [ -123.11694, 49.28126 ], "MaxResults": "3" }
Sample response
{ "ResultItems": [ { "PlaceId": "<Redacted>", "PlaceType": "PointAddress", "Title": "510 W Georgia St, Vancouver, BC V6B 0M3, Canada", "Address": { /* Address details */ }, "Position": [-123.11694, 49.28126], "Distance": 0, "MapView": [/* Map view details */], "AccessPoints": [/* Access point details */] }, { "PlaceId": "<Redacted>", "PlaceType": "PointOfInterest", "Title": "ChargePoint", "Address": { /* Address details */ }, "Position": [-123.11663, 49.28116], "Distance": 25, "Categories": [/* Category details */], "AccessPoints": [/* Access point details */] }, { "PlaceId": "<Redacted>", "PlaceType": "PointOfInterest", "Title": "Zipcar", "Address": { /* Address details */ }, "Position": [-123.11715, 49.28094], "Distance": 29, "Categories": [/* Category details */], "AccessPoints": [/* Access point details */] } ] }
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 ], "MaxResults": "3" }'
AWS CLI
aws geo-places reverse-geocode --key ${YourKey} --query-position "-123.11694,49.28126" --max-results "3"

개발자 팁

대상 결과의 경우 필터IncludePlaceTypes에를 사용합니다.

{ "QueryPosition": [ -123.11694, 49.28126 ], "Filter": { "IncludePlaceTypes": ["PointAddress"] } }