All countries, states and cities in the world

286 views
Skip to first unread message

M.L. N.Z.

unread,
Mar 7, 2018, 2:20:16 PM3/7/18
to GeoNames
Hi All, 

I need all countries, states, and cities in the world related together just in one language because I want to have three selectors to first select countries than the states which limited by selected country and same story for cities and selected state.

But I need that data be just in one language (prefer in English) 

Thank you beforehand  

Barry Hunter

unread,
Mar 7, 2018, 2:44:20 PM3/7/18
to geonames
Ok, that can be built from the geoname data. 

Do you have a particular question? A part stuck on. 


I guess the main problem is not every country has a concept of 'States'. There are 'administrative divisions', which vary by country. for the US for example states should be in the first level administrative division. But other countries are different. and some are even more complicated, eg for the UK, constituent country is the first level admin division, and counties are the second level. Actully County would probably the closest analogy to State, but could just choose to stick with first level. 




--
You received this message because you are subscribed to the Google Groups "GeoNames" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geonames+unsubscribe@googlegroups.com.
To post to this group, send email to geon...@googlegroups.com.
Visit this group at https://groups.google.com/group/geonames.
For more options, visit https://groups.google.com/d/optout.

M.L. N.Z.

unread,
Mar 8, 2018, 5:11:22 AM3/8/18
to GeoNames
thanks for your answer.
actually, my question was if there is a DB or API which I can use for this case. About the country which doesn't have a concept of state, I would say it does not matter for me because I need just countries which have states. 


On Wednesday, March 7, 2018 at 8:44:20 PM UTC+1, barryhunter wrote:
Ok, that can be built from the geoname data. 

Do you have a particular question? A part stuck on. 


I guess the main problem is not every country has a concept of 'States'. There are 'administrative divisions', which vary by country. for the US for example states should be in the first level administrative division. But other countries are different. and some are even more complicated, eg for the UK, constituent country is the first level admin division, and counties are the second level. Actully County would probably the closest analogy to State, but could just choose to stick with first level. 



On 7 March 2018 at 17:23, M.L. N.Z. <mila...@gmail.com> wrote:
Hi All, 

I need all countries, states, and cities in the world related together just in one language because I want to have three selectors to first select countries than the states which limited by selected country and same story for cities and selected state.

But I need that data be just in one language (prefer in English) 

Thank you beforehand  

--
You received this message because you are subscribed to the Google Groups "GeoNames" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geonames+u...@googlegroups.com.

Barry Hunter

unread,
Mar 8, 2018, 5:32:30 AM3/8/18
to geonames
Well can get it from the API, 
.. the main API can get a list of countries. Given a country it can get a list of first level admin divsions. given a divsion, can get cities. 
Or may prefer the Hierarchy versions, which put them into the tree structure for you

or from the dumps
can get it from the full dump. Or there are dedicated files for admin devisions, and cities, which give you some smaller datasets to work with. 

Suspect the download data would be better, as you would be making repetitve queries to the API, which doesnt make sence (or just heavily cache I guess) 


Filtering to just countries 'with states' might be a bit more trickly, have just found this:
which gives a overview of how different countries handle it. Havnt checked how closely geonames data sticks to those breakdowns. 

To unsubscribe from this group and stop receiving emails from it, send an email to geonames+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages