| 2709 | === Yemen === |
| 2710 | Admin Boundaries: |
| 2711 | * [http://eden.sahanafoundation.org/downloads/YE_Lx.7z YE_Lx.7z] |
| 2712 | |
| 2713 | These have come originally from [https://data.humdata.org HDX]. |
| 2714 | |
| 2715 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| 2716 | {{{ |
| 2717 | cd /home/web2py |
| 2718 | p7zip -d YE_Lx.7z |
| 2719 | python web2py.py -S eden -M |
| 2720 | |
| 2721 | auth.override = True |
| 2722 | languages = s3.l10n_languages |
| 2723 | languages["ar"] = "Arabic" |
| 2724 | resource = s3db.resource("gis_location") |
| 2725 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| 2726 | import_file = "YE_L0.csv" |
| 2727 | File = open(import_file, "r") |
| 2728 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 2729 | db.commit() |
| 2730 | import_file = "YE_L1.csv" |
| 2731 | File = open(import_file, "r") |
| 2732 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 2733 | db.commit() |
| 2734 | import_file = "YE_L2.csv" |
| 2735 | File = open(import_file, "r") |
| 2736 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 2737 | db.commit() |
| 2738 | gis.update_location_tree() |
| 2739 | db.commit() |
| 2740 | }}} |