Hi I'm wondering how I can retrieve the 2 letter abbreviations for states/provinces/territories from GeoNames. The country data has the two letter abbreviation for the country ie CA for Canada and US for United States but when I look at the countries children I don't see that 2 letter abbreviation.
I'm sorry if I'm posting in the wrong area or if this question has been asked before. I tried searching for the answer but couldn't find it.
I've found the admin1 feature, but, this give me a list of numbers for the states of Spain (for example) and I need the two abbreviation letters to get the postal code of a city given the country, the two letters of the state and the place name with the PostalCodeSearchCriteria of java client.
so basically:
for each area:
- lookup alternateName with lang="abbr"
- use that if it is found
- if no alternateName lang="abbr" found
- lookup adminCode1 with attribute ISO3166-2
- use value of ISO3166-2 if found
yes, the ISO 3166 subdivision codes are only available with the premium data subscription and the webservice. It is not yet included in the free daily extract.