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 know if an entry is a country?  XML
Forum Index -> FAQ - frequently asked questions
Author Message

Joined: 27/09/2008 10:15:28
Messages: 5

Is there a way to determine if the Row is representing a country? Like 'Republic of Philippines' with country PR and fclass='A' is specifically a row for a country?

Joined: 08/12/2005 07:39:47
Messages: 4088

Countries have the feature code PCLI.



Joined: 23/02/2009 17:21:45
Messages: 1

marc wrote:
Countries have the feature code PCLI.  

Are you sure that this is still strictly true? As of Feb. 23, 2009, the download server page shows 245 country codes in use, but the allCountries.txt file has only 191 lines whose feature code is PCLI.

If we include PCLD features, the number goes up to 222. If we also include PCLS, it goes up to 227, and with PCLF, 230.

If we try to add PCL, however, we run into a problem. Mayotte (country code YT) then shows up twice: once as a PCLD under its own country code, and once as a PCL with the country code KM (Comoros). The two entries have the exact same latitude and longitude, but different geonameid's (1024031 and 921810, respectively). I must therefore conclude that the feature code "PCL" does not necessarily indicate a distinct country.

So, two questions:

1. Is there meant to be some semantic distinction between these two Mayotte entries that would justify the presence of both records, or should one of them be considered redundant?

2. In light of the above, is there any set of feature codes (PCLI + others) that can reliably indicate whether a given record represents a "country", i.e. an entity with a ISO-3166 country code that refers to itself?

Thanks for your help!
-Dave Hickernell

Joined: 02/04/2009 00:28:18
Messages: 1

I had the same problems. With my tests I defined that country entry are PCLF, PCLI, PCLIX, PCLS and Saint Helena (3370751).

Saint Helena is a special problem because it is a PCLD, like Ascension (2411430) and Tristan da Cunha (3370684) in SH country , but it is used as country at fulltext search and countryInfo.txt.

I hope this help you!
Forum Index -> FAQ - frequently asked questions
Go to:   
Powered by JForum 2.1.5 © JForum Team