| | 273 | File = open(filename, "r") |
| | 274 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 275 | db.commit() |
| | 276 | gis.update_location_tree() |
| | 277 | db.commit() |
| | 278 | }}} |
| | 279 | |
| | 280 | === Belize === |
| | 281 | Admin Boundaries: |
| | 282 | * [http://eden.sahanafoundation.org/downloads/BZ_Lx.7z BZ_Lx.7z] |
| | 283 | |
| | 284 | Source is [http://gadm.org GADM]. |
| | 285 | |
| | 286 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| | 287 | {{{ |
| | 288 | cd /home/web2py |
| | 289 | p7zip -d BZ_Lx.7z |
| | 290 | python web2py.py -S eden -M |
| | 291 | |
| | 292 | auth.override = True |
| | 293 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| | 294 | resource = s3db.resource("gis_location") |
| | 295 | filename = "BZ_L0.csv" |
| | 296 | File = open(filename, "r") |
| | 297 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 298 | db.commit() |
| | 299 | filename = "BZ_L1.csv" |