GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Confused about UN Locodes and GeonameID  XML
Forum Index -> General
Author Message
jonaserikssonfareoff



Joined: 02/05/2013 23:13:18
Messages: 2
Offline

Hi,

I am trying to build a system so people can search for a location, eg Heathrow Airport, in any language, and then get the UNlocode for that location.

According to the UN website Heathrow Airport has the UN locode GB LHR, however when searching on locode LHR I get 3 other places not in the UK. When I do a free text search, it returns some place in the US!

I have also been searching the Alternate Names DB. If I search that for Heathrow Airport, I get a country ID 2647216 and a geoname ID of 2422758.

Neither of these numbers seem to have any reference to the geonameID field in the UNlocode dataset.

Am I missing something ?

marc



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

The following places are assigned with the UNLOCODE LHR:

Code:
         DE      LHR     Lahr    Lahr    RP      --3--6--        RL      901             5007N 00722E
         FR      LHR     Les Hautes-Rivières    Les Hautes-Rivieres     8       --3-----        RL      212             4953N 00450E
         GB      LHR     Heathrow Apt/London     Heathrow Apt/London     GTL     ---4----        AF      9511
         US      LHR     Liberty Liberty MI      --3-----        RL      0701            4206N 08424W
 


The unlocode is not globally unique. You need to add the country to make it unique.
The mapping with UNLocodes is part of the premium data extract:
http://www.geonames.org/products/premium-data.html

Marc

[WWW]
jonaserikssonfareoff



Joined: 02/05/2013 23:13:18
Messages: 2
Offline

Hi,

We are premium data subscribers.

Which file do you get that info from ? I have looked in unlocode-geonameid.txt

I am doing this:
Code:
grep LHR /Users/williammacdonald/Downloads/unlocode-geonameid-3.txt
 DE	LHR	Lahr	2881882
 FR	LHR	Les Hautes-Rivières	3000674
 US	LHR	Liberty	4999177
stampere


[Avatar]

Joined: 06/02/2016 18:13:18
Messages: 1
Offline

I'm confused by the

"mapping with UNLocodes is part of the premium data extract"

Is there no API to find the LOCODES even with the "Premium" service?

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