GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
How to identify a true city from the geoname dumps?  XML
Forum Index -> General
Author Message
petervk



Joined: 30/01/2012 20:25:04
Messages: 7
Offline

I´m trying to offer my site visitors a list of cities, based on geonames.

In this case on http://download.geonames.org/export/dump/NL.zip

I filtered on feature class P, since that would be a city-village according to this page= http://www.geonames.org/export/codes.html

See below a small extract of this file.
However, I then looked up the geonames and found that ONLY the 2nd row (52.555 ,5.91111) is an actual city, whereas the other 2 are a street and something which I can't even define.
I noticed that the only thing truly different to row 2 is that the population is greater than 0.

But I'm not sure that this is the way to identify a true city.

Basically my question now is: how do I get ONLY the cities from the entire dump? I took NL.zip as an example, but I need the same logic applied on many more other countrues such as US, CA, DE, AU, FR, ID.

geonameid name asciiname latitude longitude feature class feature code country code cc2 admin1 code admin2 code admin3 code admin4 code population elevation gtopo30 timezone modification date
2753105 Kampen Kampen 53.10456 5.45166 P PPL NL 2 1900 0 1 Europe/Amsterdam 14-4-2012
2753106 Kampen Kampen 52.555 5.91111 P PPL NL 15 166 48980 2 Europe/Amsterdam 22-9-2013
2753107 Kampen Kampen 51.35333 3.95833 P PPL NL NL 10 677 0 1 Europe/Amsterdam 3-6-2007

Thanks!
Robertll



Joined: 24/03/2016 18:29:24
Messages: 1
Offline

I am trying to do the same sort of thing, and would also like to be able to tell the difference between places that are cities or towns as opposed to other places like apartment complexes, trail parks, etc. All of these show up with the Feature code "PPL". I am currently only looking at the "US" dump.

Filtering out places with population of zero does pretty well, but does at least leave out some small towns.

Thanks.
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team