| 158 | === Timor-Leste === |
| 159 | Admin Boundaries: |
| 160 | * [http://eden.sahanafoundation.org/downloads/TL_Lx.7z TL_Lx.7z] |
| 161 | |
| 162 | These have come originally from [https://cod.humanitarianresponse.info COD] |
| 163 | |
| 164 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| 165 | {{{ |
| 166 | cd /home/web2py |
| 167 | p7zip -d TL_Lx.7z |
| 168 | python web2py.py -S eden -M |
| 169 | |
| 170 | auth.override = True |
| 171 | resource = s3db.resource("gis_location") |
| 172 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| 173 | import_file = "TL_L1.csv" |
| 174 | File = open(import_file, "r") |
| 175 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 176 | db.commit() |
| 177 | import_file = "TL_L2.csv" |
| 178 | File = open(import_file, "r") |
| 179 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 180 | db.commit() |
| 181 | import_file = "TL_L3.csv" |
| 182 | File = open(import_file, "r") |
| 183 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 184 | db.commit() |
| 185 | gis.update_location_tree() |
| 186 | db.commit() |
| 187 | }}} |
| 305 | === Iraq=== |
| 306 | Admin Boundaries: |
| 307 | * [http://eden.sahanafoundation.org/downloads/IQ_Lx.7z IQ_Lx.7z] |
| 308 | |
| 309 | These have come originally from [https://cod.humanitarianresponse.info COD] |
| 310 | |
| 311 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| 312 | {{{ |
| 313 | cd /home/web2py |
| 314 | p7zip -d IQ_Lx.7z |
| 315 | python web2py.py -S eden -M |
| 316 | |
| 317 | auth.override = True |
| 318 | resource = s3db.resource("gis_location") |
| 319 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| 320 | import_file = "IQ_L0.csv" |
| 321 | File = open(import_file, "r") |
| 322 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 323 | db.commit() |
| 324 | import_file = "IQ_L1.csv" |
| 325 | File = open(import_file, "r") |
| 326 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 327 | db.commit() |
| 328 | import_file = "IQ_L2.csv" |
| 329 | File = open(import_file, "r") |
| 330 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 331 | db.commit() |
| 332 | import_file = "IQ_L3.csv" |
| 333 | File = open(import_file, "r") |
| 334 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 335 | db.commit() |
| 336 | gis.update_location_tree() |
| 337 | db.commit() |
| 338 | }}} |
| 339 | |
| 449 | |
| 450 | === Turkey === |
| 451 | Admin Boundaries: |
| 452 | * [http://eden.sahanafoundation.org/downloads/TR_Lx.7z TR_Lx.7z] |
| 453 | |
| 454 | These have come originally from [https://cod.humanitarianresponse.info COD] |
| 455 | |
| 456 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| 457 | {{{ |
| 458 | cd /home/web2py |
| 459 | p7zip -d TR_Lx.7z |
| 460 | python web2py.py -S eden -M |
| 461 | |
| 462 | auth.override = True |
| 463 | resource = s3db.resource("gis_location") |
| 464 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| 465 | import_file = "TR_L0.csv" |
| 466 | File = open(import_file, "r") |
| 467 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 468 | db.commit() |
| 469 | import_file = "TR_L1.csv" |
| 470 | File = open(import_file, "r") |
| 471 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 472 | db.commit() |
| 473 | import_file = "TR_L2.csv" |
| 474 | File = open(import_file, "r") |
| 475 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 476 | db.commit() |
| 477 | gis.update_location_tree() |
| 478 | db.commit() |
| 479 | }}} |
| 480 | |