| | 84 | gis.update_location_tree() |
| | 85 | db.commit() |
| | 86 | }}} |
| | 87 | |
| | 88 | === Sierra Leone === |
| | 89 | Admin Boundaries: |
| | 90 | * [http://eden.sahanafoundation.org/downloads/SL_Lx.7z SL_Lx.7z] |
| | 91 | |
| | 92 | These have come originally from [http://cod.humanitarianresponse.info COD] including PCodes & UNMIL 'Health' codes. PCodes have been made full where incomplete. Missing Western Urban L3s recreated from dissolved L4s. |
| | 93 | |
| | 94 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| | 95 | {{{ |
| | 96 | cd /home/web2py |
| | 97 | p7zip -d SL_Lx.7z |
| | 98 | python web2py.py -S eden -M |
| | 99 | |
| | 100 | auth.override = True |
| | 101 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| | 102 | resource = s3db.resource("gis_location") |
| | 103 | filename = "SL_L0.csv" |
| | 104 | File = open(filename, "r") |
| | 105 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 106 | db.commit() |
| | 107 | filename = "SL_L1.csv" |
| | 108 | File = open(filename, "r") |
| | 109 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 110 | db.commit() |
| | 111 | filename = "SL_L2.csv" |
| | 112 | File = open(filename, "r") |
| | 113 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 114 | db.commit() |
| | 115 | filename = "SL_L3.csv" |
| | 116 | File = open(filename, "r") |
| | 117 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 118 | db.commit() |
| | 119 | filename = "SL_L4.csv" |
| | 120 | File = open(filename, "r") |
| | 121 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 122 | db.commit() |