| | 688 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 689 | db.commit() |
| | 690 | gis.update_location_tree() |
| | 691 | db.commit() |
| | 692 | }}} |
| | 693 | |
| | 694 | === Lao People's Democratic Republic === |
| | 695 | Admin Boundaries: |
| | 696 | * [http://eden.sahanafoundation.org/downloads/LA_Lx.7z LA_Lx.7z] |
| | 697 | |
| | 698 | These have come originally from [https://data.humdata.org/group/lao HDX]. |
| | 699 | |
| | 700 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| | 701 | {{{ |
| | 702 | cd /home/web2py |
| | 703 | p7zip -d LA_Lx.7z |
| | 704 | python web2py.py -S eden -M |
| | 705 | |
| | 706 | auth.override = True |
| | 707 | languages = s3.l10n_languages |
| | 708 | languages["lo"] = "Lao" |
| | 709 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| | 710 | resource = s3db.resource("gis_location") |
| | 711 | filename = "LA_L0.csv" |
| | 712 | File = open(filename, "r") |
| | 713 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 714 | db.commit() |
| | 715 | filename = "LA_L1.csv" |
| | 716 | File = open(filename, "r") |
| | 717 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 718 | db.commit() |
| | 719 | filename = "LA_L2.csv" |
| | 720 | File = open(filename, "r") |
| | 1071 | === Thailand === |
| | 1072 | Admin Boundaries: |
| | 1073 | * [http://eden.sahanafoundation.org/downloads/TH_Lx.7z TH_Lx.7z] |
| | 1074 | |
| | 1075 | These have come originally from [https://data.humdata.org/group/tha HDX] with L3 LINESTRINGs converted to POLYGONs. |
| | 1076 | |
| | 1077 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| | 1078 | {{{ |
| | 1079 | cd /home/web2py |
| | 1080 | p7zip -d TH_Lx.7z |
| | 1081 | python web2py.py -S eden -M |
| | 1082 | |
| | 1083 | auth.override = True |
| | 1084 | languages = s3.l10n_languages |
| | 1085 | languages["th"] = "Thai" |
| | 1086 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| | 1087 | resource = s3db.resource("gis_location") |
| | 1088 | filename = "TH_L0.csv" |
| | 1089 | File = open(filename, "r") |
| | 1090 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 1091 | db.commit() |
| | 1092 | filename = "TH_L1.csv" |
| | 1093 | File = open(filename, "r") |
| | 1094 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 1095 | db.commit() |
| | 1096 | filename = "TH_L2.csv" |
| | 1097 | File = open(filename, "r") |
| | 1098 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 1099 | db.commit() |
| | 1100 | filename = "TH_L3.csv" |
| | 1101 | File = open(filename, "r") |
| | 1102 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 1103 | db.commit() |
| | 1104 | gis.update_location_tree() |
| | 1105 | db.commit() |
| | 1106 | }}} |
| | 1107 | |