| | 97 | === Kenya === |
| | 98 | Admin Boundaries: |
| | 99 | * [http://eden.sahanafoundation.org/downloads/KE_Lx.7z KE_Lx.7z] |
| | 100 | |
| | 101 | These have come originally from [https://data.humdata.org/group/ken HDX]. |
| | 102 | |
| | 103 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| | 104 | {{{ |
| | 105 | cd /home/web2py |
| | 106 | p7zip -d LR_Lx.7z |
| | 107 | python web2py.py -S eden -M |
| | 108 | |
| | 109 | auth.override = True |
| | 110 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| | 111 | resource = s3db.resource("gis_location") |
| | 112 | filename = "KE_L0.csv" |
| | 113 | File = open(filename, "r") |
| | 114 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 115 | db.commit() |
| | 116 | filename = "KE_L1.csv" |
| | 117 | File = open(filename, "r") |
| | 118 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 119 | db.commit() |
| | 120 | filename = "KE_L2.csv" |
| | 121 | File = open(filename, "r") |
| | 122 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 123 | db.commit() |
| | 124 | gis.update_location_tree() |
| | 125 | db.commit() |
| | 126 | }}} |
| | 127 | |
| | 128 | |