GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
adm1code and adm2code strategy  XML
Forum Index -> Administrative Divisions
Author Message
david masclet



Joined: 26/11/2007 11:49:58
Messages: 67
Offline

hi

I would like to know how the adm1code and adm2code are assigned and how what can we do if we see an error in some admXcodes

exemple

feature with featureid 2635259 and 2634343 have the same adm2code '00' (i think an ADM2code+country should be unique) , and i 'd like to update them with a good value.


how can i determine the right code to set?

[WWW]
marc



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

Hi David

For the admin codes we use the most common national codes (like INSEE codes in France). The codes cannot be updated with the userinterface, I have to set them directly on the database.
The code '00' means 'not applicable' but it is often used as 'null'. This means the admincode should be unique for all exept '00' and 'null'. Administrative divisions should not have neither '00' nor 'null'.
If you want to help assigning missing admin codes then you should figure out the code from the national code system and then you can send me the code with the geonameid and I do the update.

Best

Marc

[WWW]
david masclet



Joined: 26/11/2007 11:49:58
Messages: 67
Offline

hi

my last post was ambiguous :
can you tell me the right unique association :

for an ADM2:
1/ the association countrycode+adm2code is unique
2/ the association countrycode+adm1code+adm2code is unique

i run an sql to detect duplicate code for adm2 (as example)
select from adm a1, adm a2 where a1.adm2code=a2.adm2code and a1.countrycode=a2.countrycode and a1.level=a2.level and a1.level=2 and a1.featureid<>a2.featureid;

and got near 90000 response that i divide by 2 to get the number of unique code that are duplicate. that give me 45000 duplicate code

i hope that the unique association is countrycode+adm1code+adm2code
[WWW]
marc



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

David

The unique key is countrycode + admincode1 + admincode2

Marc

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