| 1764 | === Fiji === |
| 1765 | Admin Boundaries: |
| 1766 | * [http://eden.sahanafoundation.org/downloads/FJ_Lx.7z FJ_Lx.7z] |
| 1767 | |
| 1768 | These have come originally from [https://data.hdx.rwlabs.org HDX] and [http://gadm.org GADM] (L0, Eastern L1). |
| 1769 | |
| 1770 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| 1771 | {{{ |
| 1772 | cd /home/web2py |
| 1773 | p7zip -d FJ_Lx.7z |
| 1774 | python web2py.py -S eden -M |
| 1775 | |
| 1776 | auth.override = True |
| 1777 | resource = s3db.resource("gis_location") |
| 1778 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| 1779 | import_file = "FJ_L0.csv" |
| 1780 | File = open(import_file, "r") |
| 1781 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 1782 | db.commit() |
| 1783 | import_file = "FJ_L1.csv" |
| 1784 | File = open(import_file, "r") |
| 1785 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 1786 | db.commit() |
| 1787 | import_file = "FJ_L2.csv" |
| 1788 | File = open(import_file, "r") |
| 1789 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 1790 | db.commit() |
| 1791 | import_file = "FJ_L3.csv" |
| 1792 | File = open(import_file, "r") |
| 1793 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 1794 | db.commit() |
| 1795 | gis.update_location_tree() |
| 1796 | db.commit() |
| 1797 | }}} |
| 1798 | |