GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Access to 3-digit ISO3166 country numbers  XML
Forum Index -> General
Author Message
Rowan



Joined: 29/12/2012 13:51:47
Messages: 1
Offline

My system needs real time access to an up-to-date list of country names and ISO3166 3-digit country numbers. It could either access such a list in real time using (e.g.) a public web service, or it could download a complete file, say every day, and store it in a local database. I do not need masses of information - latitude and longitude, area, population, regions etc. etc. - just the 3-digit country numbers and the names for all countries in the world. The actual system needs to look up the number and find the name (not the other way round) so a web service would have to work like this.

What's the easiest, cheapest and best way of doing this? Can GeoNames do it?

Thanks - Rowan
Karaca


[Avatar]
Joined: 09/12/2012 21:53:03
Messages: 9
Location: Frankfurt / Germany
Offline

Dear Rowan,

the best way IMHO is downloading the file:
http://download.geonames.org/export/dump/countryInfo.txt

write a script/program in your favorite computer language and save the information you need in some kind of array, hash map, list ... etc.
so you can read from memory very fast each time.

There is no need for a web service or daily refresh because it is not common that a new country is introduced to the United Nations and get a new ISO Code. May be you can reload the list once or twice a year if your program needs an update anyway.

Happy new year.
Karaca
[WWW]
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team