| |
| | |

CodersClub

 Forgot password?
 Register
Search
View: 5312|Reply: 2
Collapse the left

Countries & Cities

[Copy link]
Post time: 2014-05-14 20:25
| Show all posts |Read mode
Here, we can start discussion about new feature that appeared out from 329 revision.

 Russia

Post time: 2014-05-15 13:53
| Show all posts
Current Location Database (International) Status:

Level 1 = Countries - DONE.
Level 2 = States/Provinces/Regions - DONE.
Level 3 = Cities/counties inside provinces/states - YET NOT READY. (Only China is ready 100%!)

Dear friends, your help appreciated!

We need to add all the third-level subdivisions! I.e. cities, counties etc.

Just add your cities into your country/provinces from your AdminCP.

USAGE (How to use):

1) PREREQUISITES:

You MUST have already imported the district files from the /install/data/ folder:
common_district_1.sql
common_district_2.sql
common_district_3.sql

2) Import the common_district_4.sql for setup all the countries

3) Import the common_district_5.sql for setup all the country subdivisions

P.S.
The job is not finished yet!
You can help with this job too!
Just verify the data, correct mistakes, add new deeper subdivisions and publish your job here.

Attention:
for this stage we are working with ENGLISH version only!!! ENGLISH NAMES ONLY!


HOW TO ADD NEW CITIES:

1) If required, you can GET your country provinces/states from the STATOIDS.COM site.
In most of cases YOUR COUNTRY 2-level subdivisions placed in the page:
//statoids.com/u##.html
where "##" is the code of your country.
I.e.
http://statoids.com/uin.html = States of India
http://statoids.com/uir.html = Provinces of Iran
http://statoids.com/upl.html = Voivodships of Poland
etc.

1) GET your cities from the STATOIDS.COM site.
In most of cases YOUR COUNTRY 3-level subdivisions placed in the page:
//statoids.com/y##.html
where "##" is the code of your country.
I.e.
http://statoids.com/yin.html = Districts of India
http://statoids.com/yir.html = Counties of Iran
http://statoids.com/ypl.html = Counties of Poland
etc.

Pay attention to the code:
We need the "HASC" location code!!!
I.e. For Iran:
Abadan county = IR.KZ.AB

Here: IR = Iran, KZ = Khuzestan
So the code for Abadan will be "AB".



2) Go to AdminCP -> Global -> Regions,
and add new cities into your Country/Province manually...

OR as an alternative,
you can prepare a SQL patch for your cities in the next format:

-- Country "AA", Province "BB"
INSERT INTO `pre_common_district`
(`level`, `upid`, `usetype`, `code`, `name`) VALUES
(3, BB_ProvinceID, 3, 'XX', 'City 1'),
(3, BB_ProvinceID, 3, 'YY', 'City 2'),
(3, BB_ProvinceID, 3, 'ZZ', 'City 3');

Where "BB_ProvinceID" is a real numeric ID of the province with the code "BB" in our database, i.e.
ID for "US/AL = USA/Alabama" = 81301,
ID for "China / Fujian Province" = 13.

"XX, YY, ZZ" - It is a HASC Code of your cities/counties.



 Russia

Post time: 2014-05-15 16:36
| Show all posts
I have prepared a real 3-level locations for "Abkhazia",
that can be a good sample of city SQL patch:
  1. --  'AB.GG', 'Abkhazia/Gagra', 48001
  2. INSERT INTO `pre_common_district`
  3. (`level`, `upid`, `usetype`, `code`, `name`) VALUES
  4. (3, 48001, 3, 'AL', 'Alakhadzi'),
  5. (3, 48001, 3, 'AM', 'Amzara'),
  6. (3, 48001, 3, 'BR', 'Baghripsh'),
  7. (3, 48001, 3, 'BZ', 'Bzyb'),
  8. (3, 48001, 3, 'GC', 'Gagra city'),
  9. (3, 48001, 3, 'GR', 'Gyachripsh'),
  10. (3, 48001, 3, 'KS', 'Khashupse'),
  11. (3, 48001, 3, 'KY', 'Khyshkha (Bagnary)'),
  12. (3, 48001, 3, 'LA', 'Lapstarkha'),
  13. (3, 48001, 3, 'LZ', 'Ldzaa'),
  14. (3, 48001, 3, 'LC', 'Leselidze city'),
  15. (3, 48001, 3, 'MD', 'Mekhadiri'),
  16. (3, 48001, 3, 'MR', 'Mikelrypsh'),
  17. (3, 48001, 3, 'PI', 'Pitsunda city'),
  18. (3, 48001, 3, 'PH', 'Psakhara'),
  19. (3, 48001, 3, 'PS', 'Psou (village)'),
  20. (3, 48001, 3, 'TR', 'Tsandripsh');

  21. --  'AB.GD', 'Abkhazia/Gudauta', 48002
  22. INSERT INTO `pre_common_district`
  23. (`level`, `upid`, `usetype`, `code`, `name`) VALUES
  24. (3, 48002, 3, 'AA', 'Aatsy'),
  25. (3, 48002, 3, 'AH', 'Abgarkhook'),
  26. (3, 48002, 3, 'AD', 'Achandara'),
  27. (3, 48002, 3, 'AM', 'Amghikukhua'),
  28. (3, 48002, 3, 'AN', 'Ankhva'),
  29. (3, 48002, 3, 'BA', 'Barmysh'),
  30. (3, 48002, 3, 'BL', 'Blabyrkhua'),
  31. (3, 48002, 3, 'DH', 'Dzhirhua'),
  32. (3, 48002, 3, 'DR', 'Durypsh'),
  33. (3, 48002, 3, 'KL', 'Kaldakhuara'),
  34. (3, 48002, 3, 'KU', 'Khuap'),
  35. (3, 48002, 3, 'KY', 'Khypsta'),
  36. (3, 48002, 3, 'KN', 'Kulanyrkhua'),
  37. (3, 48002, 3, 'LY', 'Lykhny'),
  38. (3, 48002, 3, 'MG', 'Mgudzyrhua'),
  39. (3, 48002, 3, 'MT', 'Mtsara'),
  40. (3, 48002, 3, 'MU', 'Myussera'),
  41. (3, 48002, 3, 'NA', 'New Athos city'),
  42. (3, 48002, 3, 'PS', 'Psyrdzkha'),
  43. (3, 48002, 3, 'TS', 'Tskuara'),
  44. (3, 48002, 3, 'UA', 'Uathara'),
  45. (3, 48002, 3, 'ZV', 'Zhvandripsh');

  46. --  'AB.SH', 'Abkhazia/Sukhum', 48003
  47. INSERT INTO `pre_common_district`
  48. (`level`, `upid`, `usetype`, `code`, `name`) VALUES
  49. (3, 48003, 3, 'AK', 'Akapa'),
  50. (3, 48003, 3, 'BA', 'Baslata'),
  51. (3, 48003, 3, 'DZ', 'Dzyguta'),
  52. (3, 48003, 3, 'ES', 'Eshera'),
  53. (3, 48003, 3, 'EU', 'Eshera Upper'),
  54. (3, 48003, 3, 'GU', 'Guma'),
  55. (3, 48003, 3, 'GI', 'Gumista'),
  56. (3, 48003, 3, 'PU', 'Pskhu'),
  57. (3, 48003, 3, 'SU', 'Sukhum city'),
  58. (3, 48003, 3, 'YA', 'Yashthua');

  59. --  'AB.GR', 'Abkhazia/Gulripsh', 48004
  60. INSERT INTO `pre_common_district`
  61. (`level`, `upid`, `usetype`, `code`, `name`) VALUES
  62. (3, 48004, 3, 'AZ', 'Azhara'),
  63. (3, 48004, 3, 'BA', 'Babushara'),
  64. (3, 48004, 3, 'BG', 'Bagmaran'),
  65. (3, 48004, 3, 'DR', 'Dranda'),
  66. (3, 48004, 3, 'GC', 'Gulripsh city'),
  67. (3, 48004, 3, 'KK', 'Katsikyt'),
  68. (3, 48004, 3, 'MC', 'Machara'),
  69. (3, 48004, 3, 'MR', 'Markhyaul'),
  70. (3, 48004, 3, 'PS', 'Pshap'),
  71. (3, 48004, 3, 'TB', 'Tsebelda');

  72. --  'AB.OC', 'Abkhazia/Ochamchira', 48005
  73. INSERT INTO `pre_common_district`
  74. (`level`, `upid`, `usetype`, `code`, `name`) VALUES
  75. (3, 48005, 3, 'AD', 'Adzyubzha'),
  76. (3, 48005, 3, 'AK', 'Akuaskia'),
  77. (3, 48005, 3, 'AD', 'Aradu'),
  78. (3, 48005, 3, 'AK', 'Arakich'),
  79. (3, 48005, 3, 'AS', 'Arasadzykh'),
  80. (3, 48005, 3, 'AT', 'Atara'),
  81. (3, 48005, 3, 'AA', 'Atara Armenian'),
  82. (3, 48005, 3, 'AG', 'Achguara'),
  83. (3, 48005, 3, 'BL', 'Baslakhu'),
  84. (3, 48005, 3, 'CH', 'Chlou'),
  85. (3, 48005, 3, 'GD', 'Gudava'),
  86. (3, 48005, 3, 'GU', 'Guup'),
  87. (3, 48005, 3, 'GA', 'Guada'),
  88. (3, 48005, 3, 'DG', 'Dzhgerda'),
  89. (3, 48005, 3, 'IL', 'Ilori'),
  90. (3, 48005, 3, 'KD', 'Kyndyg'),
  91. (3, 48005, 3, 'KO', 'Kochara'),
  92. (3, 48005, 3, 'KU', 'Kutol'),
  93. (3, 48005, 3, 'LA', 'Labra'),
  94. (3, 48005, 3, 'ME', 'Merkula'),
  95. (3, 48005, 3, 'MO', 'Mokva'),
  96. (3, 48005, 3, 'OC', 'Ochamchira city'),
  97. (3, 48005, 3, 'OT', 'Otap');
  98. (3, 48005, 3, 'OH', 'Okhurey'),
  99. (3, 48005, 3, 'PA', 'Pakuash'),
  100. (3, 48005, 3, 'RE', 'Reka'),
  101. (3, 48005, 3, 'TA', 'Tamysh'),
  102. (3, 48005, 3, 'TH', 'Tkhina'),
  103. (3, 48005, 3, 'SH', 'Shashalat');

  104. --  'AB.TQ', 'Abkhazia/Tquarchal', 48006
  105. INSERT INTO `pre_common_district`
  106. (`level`, `upid`, `usetype`, `code`, `name`) VALUES
  107. (3, 48006, 3, 'AG', 'Agubedia'),
  108. (3, 48006, 3, 'B1', 'Bedia First'),
  109. (3, 48006, 3, 'BE', 'Bedia (village)'),
  110. (3, 48006, 3, 'CH', 'Chuartal'),
  111. (3, 48006, 3, 'GU', 'Gumrysh'),
  112. (3, 48006, 3, 'MH', 'Makhur'),
  113. (3, 48006, 3, 'OK', 'Okum'),
  114. (3, 48006, 3, 'G1', 'Gal First'),
  115. (3, 48006, 3, 'RC', 'Rechkhu'),
  116. (3, 48006, 3, 'TQ', 'Tquarchal city'),
  117. (3, 48006, 3, 'TS', 'Tsarcha');

  118. --  'AB.GL', 'Abkhazia/Gali', 48007
  119. INSERT INTO `pre_common_district`
  120. (`level`, `upid`, `usetype`, `code`, `name`) VALUES
  121. (3, 48007, 3, 'AL', 'Alakumkhara (Lekukhona)'),
  122. (3, 48007, 3, 'BL', 'Barghebi Lower'),
  123. (3, 48007, 3, 'BU', 'Barghebi Upper'),
  124. (3, 48007, 3, 'CH', 'Chuburkhindzhi'),
  125. (3, 48007, 3, 'DH', 'Dikhazurga'),
  126. (3, 48007, 3, 'GD', 'Gagida'),
  127. (3, 48007, 3, 'GC', 'Gal city'),
  128. (3, 48007, 3, 'GN', 'Ganakhleba (Marchkhapon)'),
  129. (3, 48007, 3, 'MH', 'Makhundzhia'),
  130. (3, 48007, 3, 'MB', 'Nabakevi'),
  131. (3, 48007, 3, 'O1', 'Otobaya First'),
  132. (3, 48007, 3, 'O2', 'Otobaya Second'),
  133. (3, 48007, 3, 'PP', 'Papynrhua (Saberio)'),
  134. (3, 48007, 3, 'PC', 'Pichori'),
  135. (3, 48007, 3, 'PR', 'Primorsk'),
  136. (3, 48007, 3, 'RY', 'Ryap (Repo Etsery)'),
  137. (3, 48007, 3, 'SD', 'Sida'),
  138. (3, 48007, 3, 'TG', 'Taglan'),
  139. (3, 48007, 3, 'SV', 'Shashikvara');
Copy the Code
You have to log in before you can reply Login | Register

Points Rules

Archive|Mobile|Dark room|CodersClub

Top.Mail.Ru
Top.Mail.Ru

2024-11-22 21:49 GMT+3 , Processed in 0.034518 sec., 9 queries .

Powered by Discuz! X3.4 Release 20230520

© 2001-2024 Discuz! Team.

MultiLingual version, Rev. 4301, © codersclub.org

Quick Reply To Top Return to the list