| | 13 | |
| | 14 | === Central African Republic === |
| | 15 | Admin Boundaries: |
| | 16 | * [http://eden.sahanafoundation.org/downloads/CF_Lx.7z CF_Lx.7z] |
| | 17 | |
| | 18 | These have come originally from [http://cod.humanitarianresponse.info COD]. |
| | 19 | |
| | 20 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| | 21 | {{{ |
| | 22 | cd /home/web2py |
| | 23 | p7zip -d CF_Lx.7z |
| | 24 | python web2py.py -S eden -M |
| | 25 | |
| | 26 | auth.override = True |
| | 27 | languages = s3.l10n_languages |
| | 28 | languages["fr"] = "French" |
| | 29 | languages["sg"] = "Sango" |
| | 30 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| | 31 | resource = s3db.resource("gis_location") |
| | 32 | filename = "CF_L0.csv" |
| | 33 | File = open(filename, "r") |
| | 34 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 35 | db.commit() |
| | 36 | filename = "CF_L1.csv" |
| | 37 | File = open(filename, "r") |
| | 38 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 39 | db.commit() |
| | 40 | filename = "CF_L2.csv" |
| | 41 | File = open(filename, "r") |
| | 42 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 43 | db.commit() |
| | 44 | filename = "CF_L3.csv" |
| | 45 | File = open(filename, "r") |
| | 46 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 47 | db.commit() |
| | 48 | gis.update_location_tree() |
| | 49 | db.commit() |
| | 50 | }}} |