| | 132 | File = open(import_file, "r") |
| | 133 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 134 | db.commit() |
| | 135 | gis.update_location_tree() |
| | 136 | db.commit() |
| | 137 | }}} |
| | 138 | |
| | 139 | === Bangladesh === |
| | 140 | Admin Boundaries: |
| | 141 | * [http://eden.sahanafoundation.org/downloads/BD_Lx.7z BD_Lx.7z] |
| | 142 | |
| | 143 | These have come originally from [https://cod.humanitarianresponse.info COD] with Bangali names and better Romanised names from Wikipedia.[[BR]] |
| | 144 | |
| | 145 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| | 146 | {{{ |
| | 147 | cd /home/web2py |
| | 148 | p7zip -d BD_Lx.7z |
| | 149 | python web2py.py -S eden -M |
| | 150 | |
| | 151 | auth.override = True |
| | 152 | languages = s3.l10n_languages |
| | 153 | languages["bn"] = "Bengali" |
| | 154 | resource = s3db.resource("gis_location") |
| | 155 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| | 156 | import_file = "BD_L1.csv" |
| | 157 | File = open(import_file, "r") |
| | 158 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 159 | db.commit() |
| | 160 | import_file = "BD_L2.csv" |
| | 161 | File = open(import_file, "r") |
| | 162 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 163 | db.commit() |
| | 164 | import_file = "BD_L3.csv" |