| | 532 | File = open(filename, "r") |
| | 533 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 534 | db.commit() |
| | 535 | gis.update_location_tree() |
| | 536 | db.commit() |
| | 537 | }}} |
| | 538 | |
| | 539 | === El Salvador === |
| | 540 | Admin Boundaries: |
| | 541 | * [http://eden.sahanafoundation.org/downloads/SV_Lx.7z SV_Lx.7z] |
| | 542 | |
| | 543 | Source is [http://gadm.org GADM] via [https://data.humdata.org/dataset/el-salvador-administrative-level-0-1-and-2-boundaries HDX]. |
| | 544 | |
| | 545 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| | 546 | {{{ |
| | 547 | cd /home/web2py |
| | 548 | p7zip -d SV_Lx.7z |
| | 549 | python web2py.py -S eden -M |
| | 550 | |
| | 551 | auth.override = True |
| | 552 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| | 553 | resource = s3db.resource("gis_location") |
| | 554 | filename = "SV_L0.csv" |
| | 555 | File = open(filename, "r") |
| | 556 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 557 | db.commit() |
| | 558 | filename = "SV_L1.csv" |
| | 559 | File = open(filename, "r") |
| | 560 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 561 | db.commit() |
| | 562 | filename = "SV_L2.csv" |