| 1089 | === Germany === |
| 1090 | Admin Boundaries: |
| 1091 | * [http://eden.sahanafoundation.org/downloads/DE_Lx.7z DE_Lx.7z] |
| 1092 | |
| 1093 | These have come originally from [http://gadm.org GADM]. |
| 1094 | |
| 1095 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| 1096 | {{{ |
| 1097 | cd /home/web2py |
| 1098 | p7zip -d DE_Lx.7z |
| 1099 | python web2py.py -S eden -M |
| 1100 | |
| 1101 | auth.override = True |
| 1102 | resource = s3db.resource("gis_location") |
| 1103 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| 1104 | import_file = "DE_L0.csv" |
| 1105 | File = open(import_file, "r") |
| 1106 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 1107 | db.commit() |
| 1108 | import_file = "DE_L1.csv" |
| 1109 | File = open(import_file, "r") |
| 1110 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 1111 | db.commit() |
| 1112 | import_file = "DE_L2.csv" |
| 1113 | File = open(import_file, "r") |
| 1114 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 1115 | db.commit() |
| 1116 | import_file = "DE_L3.csv" |
| 1117 | File = open(import_file, "r") |
| 1118 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 1119 | db.commit() |
| 1120 | gis.update_location_tree() |
| 1121 | db.commit() |
| 1122 | }}} |
| 1123 | |