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 link postalcode db with admincode1 and admincode2?  XML
Forum Index -> Postal Codes
Author Message
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
[WWW]
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
[WWW]
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

[WWW]
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
[WWW]
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

[WWW]
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 ?
 
Forum Index -> Postal Codes
Go to:   
Powered by JForum 2.1.5 © JForum Team