| | 273 | File = open(filename, "r") |
| | 274 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 275 | db.commit() |
| | 276 | gis.update_location_tree() |
| | 277 | db.commit() |
| | 278 | }}} |
| | 279 | |
| | 280 | === Bolivia === |
| | 281 | Admin Boundaries: |
| | 282 | * [http://eden.sahanafoundation.org/downloads/BO_Lx.7z BO_Lx.7z] |
| | 283 | |
| | 284 | Source is Ministerio de Desarrollo Sostenible via [https://data.humdata.org/dataset/bolivia-admin-level-2-boundaries HDX] |
| | 285 | |
| | 286 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| | 287 | {{{ |
| | 288 | cd /home/web2py |
| | 289 | p7zip -d BO_Lx.7z |
| | 290 | python web2py.py -S eden -M |
| | 291 | |
| | 292 | auth.override = True |
| | 293 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| | 294 | resource = s3db.resource("gis_location") |
| | 295 | filename = "BO_L0.csv" |
| | 296 | File = open(filename, "r") |
| | 297 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 298 | db.commit() |
| | 299 | filename = "BO_L1.csv" |
| | 300 | File = open(filename, "r") |
| | 301 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 302 | db.commit() |
| | 303 | filename = "BO_L2.csv" |
| | 304 | File = open(filename, "r") |
| | 305 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 306 | db.commit() |
| | 307 | filename = "BO_L3.csv" |