| 671 | === Nicaragua === |
| 672 | Admin Boundaries: |
| 673 | * [http://eden.sahanafoundation.org/downloads/NI_Lx.7z NI_Lx.7z] |
| 674 | |
| 675 | Source is [http://gadm.org GADM] via [https://data.humdata.org/dataset/nicaragua-administrative-level-0 HDX] |
| 676 | |
| 677 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| 678 | {{{ |
| 679 | cd /home/web2py |
| 680 | p7zip -d NI_Lx.7z |
| 681 | python web2py.py -S eden -M |
| 682 | |
| 683 | auth.override = True |
| 684 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| 685 | resource = s3db.resource("gis_location") |
| 686 | filename = "NI_L0.csv" |
| 687 | File = open(filename, "r") |
| 688 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 689 | db.commit() |
| 690 | filename = "NI_L1.csv" |
| 691 | File = open(filename, "r") |
| 692 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 693 | db.commit() |
| 694 | filename = "NI_L2.csv" |
| 695 | File = open(filename, "r") |
| 696 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 697 | db.commit() |
| 698 | gis.update_location_tree() |
| 699 | db.commit() |
| 700 | }}} |