| 1381 | === Italy === |
| 1382 | Admin Boundaries: |
| 1383 | * [http://eden.sahanafoundation.org/downloads/IT_Lx.7z IT_Lx.7z] |
| 1384 | |
| 1385 | These have come originally from [http://gadm.org GADM] with the 2x BAT L2 dissolved to 1. |
| 1386 | |
| 1387 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| 1388 | {{{ |
| 1389 | cd /home/web2py |
| 1390 | p7zip -d IT_Lx.7z |
| 1391 | python web2py.py -S eden -M |
| 1392 | |
| 1393 | auth.override = True |
| 1394 | languages = s3.l10n_languages |
| 1395 | languages["it"] = "Italian" |
| 1396 | resource = s3db.resource("gis_location") |
| 1397 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| 1398 | import_file = "IT_L0.csv" |
| 1399 | File = open(import_file, "r") |
| 1400 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 1401 | db.commit() |
| 1402 | import_file = "IT_L1.csv" |
| 1403 | File = open(import_file, "r") |
| 1404 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 1405 | db.commit() |
| 1406 | import_file = "IT_L2.csv" |
| 1407 | File = open(import_file, "r") |
| 1408 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 1409 | db.commit() |
| 1410 | import_file = "IT_L3.csv" |
| 1411 | File = open(import_file, "r") |
| 1412 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 1413 | db.commit() |
| 1414 | gis.update_location_tree() |
| 1415 | db.commit() |
| 1416 | }}} |
| 1417 | |