Retrieving Country (ISO 3166-1) and Region (ISO 3166-2) codes from address (using existing web services) [duplicate]
-
19-02-2021 - |
Pergunta
Are there any web services or DBs available that will be able to return the ISO 3166-1 and ISO 3166-2 (Country & region) codes given a particular address or latitude/longitude coordinates?
I'm currently using the Google Geocode API in a PHP app, and would like to augment that info with the above mentioned ISO codes.
Thanks very much.
Prembo.
Solução
How to reverse geocode without Google? contains an answer that would do the job. (Thanks @peter-szymkowski)
The Web Service that can be used is provided by: www.geonames.org
- Country Code: http://api.geonames.org/countryCode
- ISO 3166-2 Region Code: http://api.geonames.org/countrySubdivision
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow