GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Download Country and Cities with geocoordinates  XML
Forum Index -> General
Author Message
andyspears



Joined: 01/02/2023 15:22:57
Messages: 1
Offline

I'm looking to download a list of countries and cities along with their geocoordinates.

For the list of countries, I downloaded the allCountries.txt file, but it contains more than countries. For country entries, should I only look at entries with a feature_class of "A" and feature_code of "PCLI"?

For a list of cities, I'm a bit unsure of what file to use. It appears the allCountries.txt file contains cities as well, but I'm not sure which cities are included in it vs those in the citiesxxxx.txt files. From what I can tell, I can narrow down the entries in the countries.txt file by feature_class "P" and feature_code "PPLC", but I'm not very confident in this assumption. Then there are the citiesxxxx.txt files. I would think if a city is included in the cities5000.txt file, then it should also be included in the cities1000.txt file (after all, if a city has a population of more than 5000, it should be included in both files, right?). However, I found entries in the citities5000.txt file that were not in the citities1000.txt file. So I'm not sure the best way to get a list of cities. I'm not looking for an exhausted list, but at least one that includes the majority of cities (>500 or 1000 in population) would be nice.

Any help in deciphering which files to download and then how to filter the entries by country/city would be greatly appreciated. Thanks in advance.
marc



Joined: 08/12/2005 07:39:47
Messages: 4359
Offline

Hi Andy

the feature codes are described here:
https://www.geonames.org/export/codes.html

The citiesXX files are experpts from the allCountries file. Feature in cities5000 should also be included in cities1000.

Best Regards

Marc

[WWW]
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team