| | 466 | File = open(import_file, "r") |
| | 467 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 468 | db.commit() |
| | 469 | gis.update_location_tree() |
| | 470 | db.commit() |
| | 471 | }}} |
| | 472 | |
| | 473 | === Brunei Darussalam === |
| | 474 | Admin Boundaries: |
| | 475 | * [http://eden.sahanafoundation.org/downloads/BN_Lx.7z BN_Lx.7z] |
| | 476 | |
| | 477 | These have come originally from [http://gadm.org GADM]. |
| | 478 | |
| | 479 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| | 480 | {{{ |
| | 481 | cd /home/web2py |
| | 482 | p7zip -d BN_Lx.7z |
| | 483 | python web2py.py -S eden -M |
| | 484 | |
| | 485 | auth.override = True |
| | 486 | resource = s3db.resource("gis_location") |
| | 487 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| | 488 | import_file = "BN_L0.csv" |
| | 489 | File = open(import_file, "r") |
| | 490 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 491 | db.commit() |
| | 492 | import_file = "BN_L1.csv" |
| | 493 | File = open(import_file, "r") |
| | 494 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 495 | db.commit() |
| | 496 | import_file = "BN_L2.csv" |