翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。
郵便番号を使用して住所番号をジオコードする方法
郵便番号が非常に具体的である国 (同じ通りの住所をいくつかしかリンクしない) では、住所は自宅番号と郵便番号のみを使用して見つけることができます。この方法は、輸送と小包配送の物流で一般的です。この機能は、カナダ、英国、オランダ、米国 (ZIP+4)、イスラエル、アイルランド、シンガポールでサポートされています。アイルランドとシンガポールの両方で、郵便番号は特定の住宅番号までの正確な場所の詳細を提供します。
例
- 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"}'
アイルランドでは、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"}'
開発者向けのヒント
ZIP+4
ジオコード POI
地理空間コンテキストを使用したジオコード