GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
admin codes 3166-2 numeric vs. alpha  XML
Forum Index -> General
Author Message
gonfi



Joined: 17/02/2011 20:30:43
Messages: 11
Offline

for switzerland this works as expected:

http://api.geonames.org/search?country=CH&username=DEMO&featureCode=ADM1&adminCode1=AG

just as wiki documents it: http://de.wikipedia.org/wiki/ISO_3166-2:CH

for germany (and other countries) however the wiki alpha codes don't work:

http://api.geonames.org/search?country=DE&username=DEMO&featureCode=ADM1&adminCode1=BW

see http://de.wikipedia.org/wiki/ISO_3166-2:DE

instead i must use numeric codes (01=BW) which are not documented on wiki.

the codes can be found by: http://api.geonames.org/search?country=DE&username=DEMO&featureCode=ADM1&style=FULL

<adminCode1>02</adminCode1>

1) why is that difference?
2) how do i get to the geonameId or geoname adminCode1 when i have the wiki-documented alpha codes?

gonfi



Joined: 17/02/2011 20:30:43
Messages: 11
Offline

so according to this http://forum.geonames.org/gforum/posts/list/1358.page it's not 3166-2 that geonames is using.

is there a mapping?
gonfi



Joined: 17/02/2011 20:30:43
Messages: 11
Offline

According to http://forum.geonames.org/gforum/posts/list/363.page you still use the FIPS codes sometimes, and planned to migrate to 3166-2.

"woran wir noch arbeiten sind die ISO 3166-2 codes für so viele Länder wie möglich bevor wir wechseln. Es ist mir nicht bekannt, dass die opengeodb diese Daten enthält."

I don't mind using other codes ... as long as there is a web service for converting from one to the other
gonfi



Joined: 17/02/2011 20:30:43
Messages: 11
Offline

basically this kind of data as a webservice http://www.geonames.org/DE/administrative-division-germany.html

of course i still don't know if the internal admin1 is the fips (for each country), but i could try and see if there is something.
gonfi



Joined: 17/02/2011 20:30:43
Messages: 11
Offline

No, that would be sufficient, it includes the internal geonameId that's all i would need. So you do have there data that maps 3166-2 to geonameId. I just can't find the ws for it.
marc



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

I see you basically answered your own question.

There a lot of different codes to describe admin division. Among the most popular are ISO and FIPS. Unfortunately there is no 1:1 relation between the different coding systems. GeoNames started with FIPS and has made some changes to keep up with political changes not yet reflected in FIPS or for other reasons.

At this time there is no service available to translate between the different coding systems. We have started mapping ISO, but other important codes like the European NUTS are missing completely.
I will put it on the todo list.

Marc

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