| | 2492 | === United Kingdon === |
| | 2493 | Admin Boundaries: |
| | 2494 | * [http://eden.sahanafoundation.org/downloads/GB_Lx.7z GB_Lx.7z] |
| | 2495 | |
| | 2496 | These have come originally from [http://gadm.org GADM] v3.6. |
| | 2497 | |
| | 2498 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| | 2499 | {{{ |
| | 2500 | cd /home/web2py |
| | 2501 | p7zip -d GB_Lx.7z |
| | 2502 | python web2py.py -S eden -M |
| | 2503 | |
| | 2504 | auth.override = True |
| | 2505 | resource = s3db.resource("gis_location") |
| | 2506 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| | 2507 | import_file = "GB_L0.csv" |
| | 2508 | File = open(import_file, "r") |
| | 2509 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 2510 | db.commit() |
| | 2511 | import_file = "GB_L1.csv" |
| | 2512 | File = open(import_file, "r") |
| | 2513 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 2514 | db.commit() |
| | 2515 | import_file = "GB_L2.csv" |
| | 2516 | File = open(import_file, "r") |
| | 2517 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 2518 | db.commit() |
| | 2519 | import_file = "GB_L3.csv" |
| | 2520 | File = open(import_file, "r") |
| | 2521 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 2522 | db.commit() |
| | 2523 | gis.update_location_tree() |
| | 2524 | db.commit() |
| | 2525 | }}} |
| | 2526 | |