| 1031 | === Albania === |
| 1032 | Admin Boundaries: |
| 1033 | * [http://eden.sahanafoundation.org/downloads/AL_Lx.7z AL_Lx.7z] |
| 1034 | |
| 1035 | These have come originally from [http://gadm.org GADM]. |
| 1036 | |
| 1037 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| 1038 | {{{ |
| 1039 | cd /home/web2py |
| 1040 | p7zip -d AL_Lx.7z |
| 1041 | python web2py.py -S eden -M |
| 1042 | |
| 1043 | auth.override = True |
| 1044 | languages = s3.l10n_languages |
| 1045 | languages["al"] = "Albanian" |
| 1046 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| 1047 | resource = s3db.resource("gis_location") |
| 1048 | filename = "AL_L0.csv" |
| 1049 | File = open(filename, "r") |
| 1050 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 1051 | db.commit() |
| 1052 | filename = "AL_L1.csv" |
| 1053 | File = open(filename, "r") |
| 1054 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 1055 | db.commit() |
| 1056 | filename = "AL_L2.csv" |
| 1057 | File = open(filename, "r") |
| 1058 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 1059 | db.commit() |
| 1060 | filename = "AL_L3.csv" |
| 1061 | File = open(filename, "r") |
| 1062 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 1063 | db.commit() |
| 1064 | gis.update_location_tree() |
| 1065 | db.commit() |
| 1066 | }}} |
| 1067 | |