| 1432 | === New Zealand === |
| 1433 | Admin Boundaries: |
| 1434 | * [http://eden.sahanafoundation.org/downloads/NZ_Lx.7z NZ_Lx.7z] |
| 1435 | |
| 1436 | These have come originally from [http://gadm.org GADM]. |
| 1437 | |
| 1438 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| 1439 | {{{ |
| 1440 | cd /home/web2py |
| 1441 | p7zip -d NZ_Lx.7z |
| 1442 | python web2py.py -S eden -M |
| 1443 | |
| 1444 | auth.override = True |
| 1445 | resource = s3db.resource("gis_location") |
| 1446 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| 1447 | import_file = "NZ_L0.csv" |
| 1448 | File = open(import_file, "r") |
| 1449 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 1450 | db.commit() |
| 1451 | import_file = "NZ_L1.csv" |
| 1452 | File = open(import_file, "r") |
| 1453 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 1454 | db.commit() |
| 1455 | import_file = "NZ_L2.csv" |
| 1456 | File = open(import_file, "r") |
| 1457 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 1458 | db.commit() |
| 1459 | gis.update_location_tree() |
| 1460 | db.commit() |
| 1461 | }}} |
| 1462 | |