| | 1297 | === Serbia === |
| | 1298 | Admin Boundaries: |
| | 1299 | * [http://eden.sahanafoundation.org/downloads/RS_Lx.7z RS_Lx.7z] |
| | 1300 | |
| | 1301 | These have come originally from [http://gadm.org GADM]. |
| | 1302 | |
| | 1303 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| | 1304 | {{{ |
| | 1305 | cd /home/web2py |
| | 1306 | p7zip -d RS_Lx.7z |
| | 1307 | python web2py.py -S eden -M |
| | 1308 | |
| | 1309 | auth.override = True |
| | 1310 | languages = s3.l10n_languages |
| | 1311 | languages["sr"] = "Serbian" |
| | 1312 | resource = s3db.resource("gis_location") |
| | 1313 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| | 1314 | import_file = "RS_L0.csv" |
| | 1315 | File = open(import_file, "r") |
| | 1316 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 1317 | db.commit() |
| | 1318 | import_file = "RS_L1.csv" |
| | 1319 | File = open(import_file, "r") |
| | 1320 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 1321 | db.commit() |
| | 1322 | import_file = "RS_L2.csv" |
| | 1323 | File = open(import_file, "r") |
| | 1324 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 1325 | db.commit() |
| | 1326 | gis.update_location_tree() |
| | 1327 | db.commit() |
| | 1328 | }}} |
| | 1329 | |