| 416 | === Canada === |
| 417 | Admin Boundaries: |
| 418 | * [http://eden.sahanafoundation.org/downloads/CA_Lx.7z CA_Lx.7z] |
| 419 | |
| 420 | Source for Polygons is [http://gadm.org GADM] with translations from Wikipedia. |
| 421 | |
| 422 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| 423 | {{{ |
| 424 | cd /home/web2py |
| 425 | p7zip -d CA_Lx.7z |
| 426 | python web2py.py -S eden -M |
| 427 | |
| 428 | auth.override = True |
| 429 | languages = s3.l10n_languages |
| 430 | languages["fr"] = "French" |
| 431 | languages["ath"] = "Athabaskan" |
| 432 | languages["ikt"] = "Inuinnaqtun" |
| 433 | languages["iu"] = "Inuktitut" |
| 434 | languages["moe"] = "Innu-aimun" |
| 435 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| 436 | resource = s3db.resource("gis_location") |
| 437 | filename = "CA_L0.csv" |
| 438 | File = open(filename, "r") |
| 439 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 440 | db.commit() |
| 441 | filename = "CA_L1.csv" |
| 442 | File = open(filename, "r") |
| 443 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 444 | db.commit() |
| 445 | filename = "CA_L2.csv" |
| 446 | File = open(filename, "r") |
| 447 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 448 | db.commit() |
| 449 | filename = "CA_L3.csv" |
| 450 | File = open(filename, "r") |
| 451 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 452 | db.commit() |
| 453 | gis.update_location_tree() |
| 454 | db.commit() |
| 455 | }}} |
| 456 | |