| | 1183 | === Bulgaria === |
| | 1184 | Admin Boundaries: |
| | 1185 | * [http://eden.sahanafoundation.org/downloads/BG_Lx.7z BG_Lx.7z] |
| | 1186 | |
| | 1187 | These have come originally from [http://gadm.org GADM]. |
| | 1188 | |
| | 1189 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| | 1190 | {{{ |
| | 1191 | cd /home/web2py |
| | 1192 | p7zip -d BG_Lx.7z |
| | 1193 | python web2py.py -S eden -M |
| | 1194 | |
| | 1195 | auth.override = True |
| | 1196 | languages = s3.l10n_languages |
| | 1197 | languages["bg"] = "Bulgarian" |
| | 1198 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| | 1199 | resource = s3db.resource("gis_location") |
| | 1200 | filename = "BG_L0.csv" |
| | 1201 | File = open(filename, "r") |
| | 1202 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 1203 | db.commit() |
| | 1204 | filename = "BG_L1.csv" |
| | 1205 | File = open(filename, "r") |
| | 1206 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 1207 | db.commit() |
| | 1208 | filename = "BG_L2.csv" |
| | 1209 | File = open(filename, "r") |
| | 1210 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 1211 | db.commit() |
| | 1212 | gis.update_location_tree() |
| | 1213 | db.commit() |
| | 1214 | }}} |
| | 1215 | |