GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Difference between admin1 and admin1Ascii  XML
Forum Index -> General
Author Message
samokk



Joined: 13/10/2006 21:56:39
Messages: 82
Offline

Hi,

What is the difference between the 2 ADM1 files (Admin1Codes and Admin1CodesASCII) ?

It looks like the ASCII version contains more information (geonames ID for instance), but I am not sure whether it contains all ADM1 that are in the other file..

Also, it seems to be broken in some places :
GB. GB. Argyll and Bute 6457407

whereas the admin1Codes file is fine.

Is it possible for me to correct the ADM1 Code in the UI ? Will it affect the ascii file or the other ?

Thanks for your help,
Sami Dalouche
marc



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

Hi Sami

The file 'Admin1Codes' is just a list of the fips10-4 codes, whereas 'Admin1CodesASCII' at the other hand is populated from the geonames database.
The idea is to have only one file generated from the geonames database. As you see yourself there is still some work to do and improve the data in the geonames database to be able to drop the fips file and use only the pure geonames file.

Codes for adm1 cannot be changed on the UI, it has to be done directly on the database. The UI dropdownlist is generated from the database and it is a bootstraping problem to set the database to the correct value. Afterwards for places within this adm1 the dropdown list can be used.

You can send me a file or post problems you find here in the forum and I will update the database. Thanks a lot.

Cheers


Marc

[WWW]
samokk



Joined: 13/10/2006 21:56:39
Messages: 82
Offline

The first problem is

GB. GB. Argyll and Bute 6457407
which should be corrected into :

GB.T8 Argyll and Bute Argyll and Bute 6457407

Still have some problems to solve, but when I solve them, my importers should tell me the list of structural problems (wrong ADM codes and missing ones). I'll come back to you very soon
samokk



Joined: 13/10/2006 21:56:39
Messages: 82
Offline

Another problem :
I think the code in :

TJ. Region of Republican Subordination Region of Republican Subordination 6452615

should be corrected into
TJ.03

Regards,
Sami Dalouche
samokk



Joined: 13/10/2006 21:56:39
Messages: 82
Offline

OK, so I used a simple script to retrive the list of missing ADM codes that are missing from admin1Ascii :
Code:
 for i in $(cat admin1Codes.txt | awk -F ' ' '{ print $1 }' ) ; do grep $i admin1CodesASCII.txt > /dev/null; if [ "1" = $? ] ; then echo "$i" ; fi ; done > notPresent
 


Which outputs 995 results.

So, what would be needed now would be something that, for each of this codes, gets the name of the adm in admin1codes.txt, does a adm search on the features, and gets the geonamesId out of that.

Do you currently have something similar we can tweak ? If not, I can work out some script that would do the job.


Regards,
Sami Dalouche

Code:
 AD.00
 AD.01
 AE.00
 AF.00
 AF.15
 AF.16
 AF.20
 AF.21
 AF.40
 AF.41
 AF.42
 AG.00
 AI.00
 AL.00
 AM.00
 AN.00
 AO.00
 AR.00
 AT.00
 AU.00
 AZ.00
 BA.00
 BA.BD
 BB.00
 BD.00
 BD.80
 BE.00
 BF.00
 BF.16
 BF.17
 BF.18
 BF.22
 BF.23
 BF.24
 BF.25
 BF.26
 BF.27
 BF.29
 BF.30
 BF.31
 BF.32
 BF.35
 BF.37
 BF.38
 BF.39
 BF.41
 BF.43
 BG.00
 BG.29
 BG.30
 BG.31
 BG.32
 BG.33
 BG.34
 BG.35
 BG.36
 BG.37
 BH.00
 BH.07
 BI.00
 BI.05
 BJ.00
 BJ.01
 BJ.02
 BJ.03
 BJ.04
 BJ.05
 BJ.06
 BM.00
 BN.00
 BN.01
 BN.02
 BN.03
 BN.04
 BO.00
 BR.00
 BR.09
 BR.10
 BR.19
 BS.00
 BT.00
 BW.00
 BW.07
 BY.00
 BZ.00
 CA.00
 CC.00
 CD.00
 CF.00
 CG.00
 CG.03
 CH.00
 CI.00
 CI.01
 CI.03
 CI.04
 CI.05
 CI.06
 CI.07
 CI.11
 CI.12
 CI.14
 CI.16
 CI.17
 CI.18
 CI.20
 CI.21
 CI.23
 CI.25
 CI.26
 CI.27
 CI.28
 CI.29
 CI.30
 CI.31
 CI.32
 CI.33
 CI.34
 CI.35
 CI.36
 CI.37
 CI.38
 CI.39
 CI.40
 CI.41
 CI.42
 CI.43
 CI.44
 CI.45
 CI.46
 CI.47
 CI.48
 CI.49
 CI.50
 CI.51
 CI.52
 CI.53
 CI.54
 CI.55
 CI.56
 CI.57
 CI.58
 CI.59
 CI.60
 CI.61
 CI.62
 CI.63
 CI.64
 CI.65
 CI.66
 CI.67
 CI.68
 CI.69
 CI.70
 CI.71
 CI.72
 CI.73
 CK.00
 CL.00
 CM.00
 CN.00
 CN.0Z
 CN.99
 CO.00
 CO.05
 CO.06
 CO.07
 CO.18
 CR.00
 CS.00
 CS.01
 CS.02
 CU.00
 CV.00
 CV.06
 CV.09
 CV.12
 CX.00
 CY.00
 CZ.00
 CZ.20
 CZ.21
 CZ.23
 CZ.24
 CZ.30
 CZ.33
 CZ.36
 CZ.37
 CZ.39
 CZ.41
 CZ.45
 CZ.61
 CZ.70
 CZ.73
 DE.00
 DJ.00
 DJ.02
 DJ.03
 DK.01
 DK.02
 DK.03
 DK.04
 DK.05
 DK.06
 DK.07
 DK.08
 DK.09
 DK.10
 DK.11
 DK.12
 DK.13
 DK.14
 DK.15
 DK.16
 DM.00
 DO.00
 DZ.00
 EC.00
 EC.16
 EE.00
 EG.00
 EH.00
 ER.00
 ES.00
 ES.28
 ET.00
 ET.01
 ET.02
 ET.03
 ET.04
 ET.05
 ET.06
 ET.07
 ET.08
 ET.09
 ET.10
 ET.11
 ET.12
 ET.14
 ET.15
 ET.17
 ET.18
 ET.19
 ET.20
 ET.21
 ET.22
 ET.23
 ET.24
 ET.25
 ET.26
 ET.27
 ET.28
 ET.29
 ET.30
 ET.31
 ET.32
 ET.33
 ET.34
 ET.35
 ET.37
 ET.38
 ET.39
 ET.40
 ET.41
 ET.42
 ET.43
 FI.00
 FI.02
 FI.03
 FI.04
 FI.05
 FI.07
 FI.09
 FI.10
 FI.11
 FI.12
 FJ.00
 FK.00
 FM.00
 FM.FM
 FR.00
 GA.00
 GB.01
 GB.08
 GB.11
 GB.12
 GB.13
 GB.17
 GB.19
 GB.29
 GB.32
 GB.36
 GB.52
 GB.64
 GB.80
 GB.81
 GB.82
 GB.83
 GB.84
 GB.85
 GB.86
 GB.87
 GB.88
 GB.89
 GB.90
 GB.91
 GB.92
 GB.93
 GB.96
 GB.A4
 GB.J2
 GB.J3
 GB.J4
 GB.M6
 GB.T8
 GD.00
 GE.00
 GH.00
 GI.00
 GL.00
 GL.01
 GL.02
 GL.03
 GM.00
 GN.00
 GN.08
 GN.14
 GN.20
 GN.24
 GN.26
 GQ.00
 GS.00
 GT.00
 GW.00
 GY.00
 HK.00
 HN.00
 HR.00
 HT.00
 HU.00
 ID.00
 ID.06
 ID.09
 ID.10
 ID.19
 ID.20
 ID.23
 ID.25
 ID.28
 IE.00
 IL.00
 IL.04
 IN.00
 IN.04
 IN.11
 IN.15
 IN.27
 IQ.00
 IR.00
 IR.12
 IR.17
 IR.19
 IR.21
 IR.24
 IR.25
 IR.27
 IR.31
 IR.33
 IS.00
 IS.01
 IS.02
 IS.03
 IS.04
 IS.05
 IS.06
 IS.07
 IS.08
 IS.09
 IS.10
 IS.11
 IS.12
 IS.13
 IS.14
 IS.15
 IS.16
 IS.17
 IS.18
 IS.19
 IS.20
 IS.21
 IS.22
 IS.23
 IS.24
 IS.25
 IS.26
 IS.27
 IS.28
 IS.29
 IS.30
 IS.31
 IS.32
 IS.33
 IS.34
 IS.35
 IS.36
 IS.37
 IT.00
 JM.00
 JO.00
 JO.07
 JO.10
 JO.13
 JO.14
 JO.16
 JP.00
 KE.00
 KG.00
 KG.05
 KH.11
 KH.20
 KH.21
 KH.22
 KH.23
 KH.24
 KH.25
 KH.26
 KH.27
 KH.28
 KH.29
 KH.30
 KI.00
 KI.01
 KI.02
 KI.03
 KM.00
 KN.00
 KP.00
 KP.16
 KR.00
 KY.00
 KY.01
 KY.02
 KY.03
 KY.04
 KY.05
 KY.06
 KY.07
 KY.08
 LA.00
 LA.04
 LA.05
 LA.06
 LA.08
 LA.09
 LA.10
 LA.11
 LA.27
 LB.00
 LB.01
 LB.02
 LB.03
 LC.00
 LI.00
 LK.00
 LR.00
 LR.02
 LR.04
 LR.05
 LR.08
 LS.00
 LS.01
 LS.02
 LS.03
 LS.04
 LS.05
 LS.06
 LT.00
 LT.40
 LU.00
 LV.08
 LV.11
 LV.12
 LV.13
 LY.00
 LY.27
 LY.39
 MA.01
 MA.02
 MA.03
 MA.04
 MA.05
 MA.06
 MA.07
 MA.08
 MA.09
 MA.10
 MA.11
 MA.12
 MA.13
 MA.14
 MA.15
 MA.16
 MA.17
 MA.18
 MA.19
 MA.20
 MA.21
 MA.22
 MA.23
 MA.24
 MA.25
 MA.26
 MA.27
 MA.29
 MA.30
 MA.32
 MA.33
 MA.34
 MA.35
 MA.36
 MA.37
 MA.38
 MA.39
 MA.40
 MA.41
 MA.42
 MA.43
 MA.44
 MC.00
 MD.13
 MD.46
 MD.47
 MD.49
 MD.50
 MD.52
 MD.53
 MD.54
 MD.55
 MD.56
 ME.00
 MG.00
 MH.00
 MK.00
 ML.00
 ML.02
 MM.00
 MM.07
 MM.09
 MM.14
 MM.22
 MO.00
 MS.00
 MT.00
 MU.00
 MV.30
 MV.31
 MV.32
 MV.33
 MV.34
 MV.35
 MV.36
 MV.37
 MV.38
 MV.39
 MV.40
 MV.41
 MV.42
 MV.43
 MV.44
 MV.45
 MV.46
 MV.47
 MW.00
 MW.10
 MW.14
 MX.00
 MY.00
 MZ.00
 NA.00
 NE.00
 NF.00
 NG.10
 NG.12
 NG.17
 NG.18
 NG.20
 NG.34
 NI.00
 NI.16
 NL.00
 NP.01
 NP.02
 NP.03
 NP.04
 NP.05
 NP.06
 NP.07
 NP.08
 NP.09
 NP.10
 NP.11
 NP.12
 NP.13
 NP.14
 NR.00
 NR.01
 NR.02
 NR.03
 NR.04
 NR.05
 NR.06
 NR.07
 NR.08
 NR.09
 NR.10
 NR.11
 NR.12
 NR.13
 NR.14
 NU.00
 NZ.01
 NZ.03
 NZ.04
 NZ.07
 NZ.08
 NZ.09
 NZ.10
 NZ.11
 NZ.12
 NZ.13
 NZ.14
 NZ.16
 NZ.17
 NZ.18
 NZ.19
 NZ.20
 NZ.21
 NZ.22
 NZ.24
 NZ.26
 NZ.27
 NZ.28
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L.48
 PL.49
 PL.50
 PL.51
 PL.52
 PL.53
 PL.54
 PL.55
 PL.56
 PL.57
 PL.58
 PL.59
 PL.60
 PL.61
 PL.62
 PL.63
 PL.64
 PL.65
 PL.66
 PL.67
 PL.68
 PL.69
 PL.70
 PL.71
 PN.00
 PS.00
 PT.00
 PW.00
 PY.00
 PY.22
 QA.00
 QA.05
 QA.07
 RS.00
 RU.00
 RU.19
 RU.JA
 RW.00
 SA.00
 SB.03
 SB.04
 SB.05
 SB.06
 SB.07
 SB.08
 SB.09
 SB.11
 SB.12
 SC.00
 SC.13
 SC.15
 SC.16
 SC.21
 SC.31
 SC.32
 SC.33
 SC.34
 SC.35
 SC.36
 SC.37
 SC.38
 SC.39
 SC.40
 SC.41
 SC.42
 SC.43
 SD.00
 SD.26
 SD.30
 SE.00
 SE.04
 SE.13
 SG.00
 SH.00
 SH.01
 SH.02
 SH.03
 SK.00
 SL.00
 SM.00
 SN.00
 SN.04
 SN.08
 SO.00
 SO.17
 SR.00
 ST.01
 ST.02
 SV.00
 SY.00
 SZ.00
 TC.00
 TD.00
 TG.00
 TG.01
 TG.02
 TG.03
 TG.04
 TG.05
 TG.06
 TG.07
 TG.08
 TG.09
 TG.10
 TG.11
 TG.12
 TG.13
 TG.14
 TG.15
 TG.16
 TG.17
 TG.18
 TG.19
 TG.20
 TG.21
 TH.00
 TH.21
 TK.00
 TM.00
 TN.26
 TO.00
 TO.01
 TO.02
 TO.03
 TR.00
 TT.00
 TV.00
 TW.00
 TZ.00
 TZ.01
 UA.00
 UG.27
 UG.32
 UG.35
 UG.37
 UG.44
 UG.48
 UG.49
 UG.51
 UG.53
 UG.54
 UG.55
 UG.57
 UG.62
 UG.63
 UG.64
 UG.65
 UG.68
 UG.75
 US.00
 UY.00
 UZ.00
 VA.00
 VC.00
 VE.00
 VE.10
 VE.99
 VG.00
 VI.00
 VN.00
 VN.04
 VN.06
 VN.10
 VN.14
 VN.15
 VN.16
 VN.17
 VN.19
 VN.26
 VN.27
 VN.28
 VN.36
 VN.40
 VN.41
 VU.00
 WS.00
 WS.01
 WS.02
 WS.03
 WS.04
 WS.05
 WS.06
 WS.07
 WS.08
 WS.09
 WS.10
 WS.11
 YE.05
 YE.06
 YE.07
 YE.09
 YE.11
 YE.12
 YE.13
 YE.14
 YE.15
 YE.16
 YE.17
 YT.00
 ZA.00
 ZA.01
 ZA.04
 ZM.00
 ZW.00
 
samokk



Joined: 13/10/2006 21:56:39
Messages: 82
Offline

Actually, I tried feeding all the missing names to postgres, and took the minimum levensthein distance between the missing name and all ADM1s of the given country.. The result is really bad, and completly unusable...

Maybe you have a better heuristic ?

Regards,
Sami Dalouche
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team