| Author |
Message |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 18/07/2009 16:12:25
|
lorizon
Joined: 18/07/2009 15:56:44
Messages: 3
Offline
|
Hi,
In first thanks for the nice job on geonames.
I'discover geonames, i've downloaded
allCountries with postalcode, amin1code and admincodes2
How can i from postal database get admin1code or admincodes2?
SELECT * FROM admin1codes a where code LIKE'BE.%';
'BE.WA', 'Wallonia'
SELECT country,postal_code,admin_code1,admin_code2 FROM countryzipcode where country='BE';
'BE', '5590', 'BEWAL', ''
Then this is not the same key for admin_code ! 'BE.WA'!='BEWAL'.
What is the best way to get the admin_code1 from admincode1 database from the admin_code1 from postal_code database?
Thanks for your help.
|
Rencontre http://www.lorizon.com |
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 19/07/2009 14:39:20
|
lorizon
Joined: 18/07/2009 15:56:44
Messages: 3
Offline
|
Hi,
Is it could help you if for postalcode db I give the update sql to change on admincode1 admincode2 in postalcodeDB?
postalcodeDB.admin_code1<->admincodes1DB.code
postalcodeDB.admin_code1="Country.XX" (from admincode1DB)
postalcodeDB.admin_code2="Country.XX.YYYY" (from admincode2DB)
Maybe someone always working on this?
|
Rencontre http://www.lorizon.com |
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 19/07/2009 22:58:46
|
marc
Joined: 08/12/2005 07:39:47
Messages: 4501
Offline
|
the toponym database and the postalcode database are not yet normalized and are not using the same admin codes for all countries. For some countries they do, for other not. If you have scripts for some country it would be nice to post it for others with the same wish.
Best
Marc
|
 |
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 26/07/2009 09:44:45
|
lorizon
Joined: 18/07/2009 15:56:44
Messages: 3
Offline
|
I'm started to update postal zip database for admin 1& admin2
Where can i found the normalized codes? admin1 database? geonames database?
And for admin2? geonames?
Thanks
|
Rencontre http://www.lorizon.com |
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 30/07/2009 22:47:49
|
marc
Joined: 08/12/2005 07:39:47
Messages: 4501
Offline
|
There are many codes to choose from. One of the challenges is to figure out which code in which country makes sense and is applicable. Some countries for instance have reorganizations of admin divisions and it will also depend on which year the codes are from.
Best
Marc
|
 |
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 17/06/2010 19:04:27
|
drzraf
Joined: 10/06/2010 11:27:15
Messages: 19
Offline
|
UP ^^
I attempted :
http://ws.geonames.org/get?geonameId=2802845
<adminCode1>WAL</adminCode1>
<adminName1>Wallonia</adminName1>
Then :
http://ws.geonames.org/postalCodeSearch?country=BE&postalcode_startsWith=4400
<adminCode1>BEWAL</adminCode1>
<adminName1/>
[notice: no more adminName1]
While :
http://geotree.geonames.org/2802845/
[the hierarchy shows up correctly]
any advices ?
|
|
|
 |
|
|