| 2508 | === Cook Islands === |
| 2509 | Admin Boundaries: |
| 2510 | * [http://eden.sahanafoundation.org/downloads/CK_Lx.7z CK_Lx.7z] |
| 2511 | |
| 2512 | Source is [http://gadm.org GADM] with L1s (names only) added from Wikipedia. |
| 2513 | |
| 2514 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| 2515 | {{{ |
| 2516 | cd /home/web2py |
| 2517 | p7zip -d CK_Lx.7z |
| 2518 | python web2py.py -S eden -M |
| 2519 | |
| 2520 | auth.override = True |
| 2521 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| 2522 | resource = s3db.resource("gis_location") |
| 2523 | filename = "CK_L0.csv" |
| 2524 | File = open(filename, "r") |
| 2525 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 2526 | db.commit() |
| 2527 | filename = "CK_L1.csv" |
| 2528 | File = open(filename, "r") |
| 2529 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 2530 | db.commit() |
| 2531 | gis.update_location_tree() |
| 2532 | db.commit() |
| 2533 | }}} |
| 2534 | |
| 2564 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 2565 | db.commit() |
| 2566 | gis.update_location_tree() |
| 2567 | db.commit() |
| 2568 | }}} |
| 2569 | |
| 2570 | === Kiribati === |
| 2571 | Admin Boundaries: |
| 2572 | * [http://eden.sahanafoundation.org/downloads/KI_Lx.7z KI_Lx.7z] |
| 2573 | |
| 2574 | Source is [http://gadm.org GADM] with L1s (names only) added from Wikipedia. |
| 2575 | |
| 2576 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| 2577 | {{{ |
| 2578 | cd /home/web2py |
| 2579 | p7zip -d KI_Lx.7z |
| 2580 | python web2py.py -S eden -M |
| 2581 | |
| 2582 | auth.override = True |
| 2583 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| 2584 | resource = s3db.resource("gis_location") |
| 2585 | filename = "KI_L0.csv" |
| 2586 | File = open(filename, "r") |
| 2587 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 2588 | db.commit() |
| 2589 | filename = "KI_L1.csv" |
| 2590 | File = open(filename, "r") |
| 2686 | File = open(filename, "r") |
| 2687 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 2688 | db.commit() |
| 2689 | gis.update_location_tree() |
| 2690 | db.commit() |
| 2691 | }}} |
| 2692 | |
| 2693 | === Solomon Islands === |
| 2694 | Admin Boundaries: |
| 2695 | * [http://eden.sahanafoundation.org/downloads/SB_Lx.7z SB_Lx.7z] |
| 2696 | |
| 2697 | Source is [http://gadm.org GADM]. |
| 2698 | |
| 2699 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| 2700 | {{{ |
| 2701 | cd /home/web2py |
| 2702 | p7zip -d SB_Lx.7z |
| 2703 | python web2py.py -S eden -M |
| 2704 | |
| 2705 | auth.override = True |
| 2706 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| 2707 | resource = s3db.resource("gis_location") |
| 2708 | filename = "SB_L0.csv" |
| 2709 | File = open(filename, "r") |
| 2710 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 2711 | db.commit() |
| 2712 | filename = "SB_L1.csv" |
| 2713 | File = open(filename, "r") |
| 2714 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 2715 | db.commit() |
| 2716 | filename = "SB_L2.csv" |
| 2717 | File = open(filename, "r") |
| 2718 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 2719 | db.commit() |
| 2720 | gis.update_location_tree() |
| 2721 | db.commit() |
| 2722 | }}} |
| 2723 | |
| 2724 | === Tonga === |
| 2725 | Admin Boundaries: |
| 2726 | * [http://eden.sahanafoundation.org/downloads/TO_Lx.7z TO_Lx.7z] |
| 2727 | |
| 2728 | Source is [http://gadm.org GADM] with L2s (names only) added from Wikipedia. |
| 2729 | |
| 2730 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| 2731 | {{{ |
| 2732 | cd /home/web2py |
| 2733 | p7zip -d TO_Lx.7z |
| 2734 | python web2py.py -S eden -M |
| 2735 | |
| 2736 | auth.override = True |
| 2737 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| 2738 | resource = s3db.resource("gis_location") |
| 2739 | filename = "TO_L0.csv" |
| 2740 | File = open(filename, "r") |
| 2741 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 2742 | db.commit() |
| 2743 | filename = "TO_L1.csv" |
| 2744 | File = open(filename, "r") |
| 2745 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 2746 | db.commit() |
| 2747 | filename = "TO_L2.csv" |
| 2748 | File = open(filename, "r") |
| 2749 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 2750 | db.commit() |
| 2751 | gis.update_location_tree() |
| 2752 | db.commit() |
| 2753 | }}} |
| 2754 | |
| 2755 | === Tuvalu === |
| 2756 | Admin Boundaries: |
| 2757 | * [http://eden.sahanafoundation.org/downloads/TV_Lx.7z TV_Lx.7z] |
| 2758 | |
| 2759 | Source is [http://gadm.org GADM]. |
| 2760 | |
| 2761 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| 2762 | {{{ |
| 2763 | cd /home/web2py |
| 2764 | p7zip -d TV_Lx.7z |
| 2765 | python web2py.py -S eden -M |
| 2766 | |
| 2767 | auth.override = True |
| 2768 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| 2769 | resource = s3db.resource("gis_location") |
| 2770 | filename = "TV_L0.csv" |
| 2771 | File = open(filename, "r") |
| 2772 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 2773 | db.commit() |
| 2774 | filename = "TV_L1.csv" |
| 2775 | File = open(filename, "r") |
| 2776 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 2777 | db.commit() |
| 2778 | gis.update_location_tree() |
| 2779 | db.commit() |
| 2780 | }}} |
| 2781 | |
| 2782 | === Vanuatu === |
| 2783 | Admin Boundaries: |
| 2784 | * [http://eden.sahanafoundation.org/downloads/VU_Lx.7z VU_Lx.7z] |
| 2785 | |
| 2786 | Source is [http://gadm.org GADM]. |
| 2787 | |
| 2788 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| 2789 | {{{ |
| 2790 | cd /home/web2py |
| 2791 | p7zip -d VU_Lx.7z |
| 2792 | python web2py.py -S eden -M |
| 2793 | |
| 2794 | auth.override = True |
| 2795 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| 2796 | resource = s3db.resource("gis_location") |
| 2797 | filename = "VU_L0.csv" |
| 2798 | File = open(filename, "r") |
| 2799 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 2800 | db.commit() |
| 2801 | filename = "VU_L1.csv" |
| 2802 | File = open(filename, "r") |
| 2803 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 2804 | db.commit() |
| 2805 | filename = "VU_L2.csv" |