Changes between Version 142 and Version 143 of GIS/Data


Ignore:
Timestamp:
10/24/17 18:23:37 (4 years ago)
Author:
Fran Boon
Comment:

+PE

Legend:

Unmodified
Added
Removed
Modified
  • GIS/Data

    v142 v143  
    762762db.commit()
    763763filename = "PY_L2.csv"
     764File = open(filename, "r")
     765resource.import_xml(File, format="csv", stylesheet=stylesheet)
     766db.commit()
     767gis.update_location_tree()
     768db.commit()
     769}}}
     770
     771=== Peru ===
     772Admin Boundaries:
     773* [http://eden.sahanafoundation.org/downloads/PE_Lx.7z PE_Lx.7z]
     774
     775Source is Instituto Geográfico Nacional (IGN) via [https://data.humdata.org/dataset/limites-de-peru HDX]
     776
     777Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this:
     778{{{
     779cd /home/web2py
     780p7zip -d PE_Lx.7z
     781python web2py.py -S eden -M
     782
     783auth.override = True
     784stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl")
     785resource = s3db.resource("gis_location")
     786filename = "PE_L0.csv"
     787File = open(filename, "r")
     788resource.import_xml(File, format="csv", stylesheet=stylesheet)
     789db.commit()
     790filename = "PE_L1.csv"
     791File = open(filename, "r")
     792resource.import_xml(File, format="csv", stylesheet=stylesheet)
     793db.commit()
     794filename = "PE_L2.csv"
    764795File = open(filename, "r")
    765796resource.import_xml(File, format="csv", stylesheet=stylesheet)