Changes between Version 130 and Version 131 of GIS/Data


Ignore:
Timestamp:
10/24/17 15:46:39 (4 years ago)
Author:
Fran Boon
Comment:

+EC

Legend:

Unmodified
Added
Removed
Modified
  • GIS/Data

    v130 v131  
    493493db.commit()
    494494filename = "DO_L2.csv"
     495File = open(filename, "r")
     496resource.import_xml(File, format="csv", stylesheet=stylesheet)
     497db.commit()
     498gis.update_location_tree()
     499db.commit()
     500}}}
     501
     502=== Ecuador ===
     503Admin Boundaries:
     504* [http://eden.sahanafoundation.org/downloads/EC_Lx.7z EC_Lx.7z]
     505
     506Source is [http://gadm.org GADM] since the [https://data.humdata.org/dataset/ecuador-admin-level-1-boundaries HDX] version is based on an older export and is harder to use.
     507
     508Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this:
     509{{{
     510cd /home/web2py
     511p7zip -d EC_Lx.7z
     512python web2py.py -S eden -M
     513
     514auth.override = True
     515stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl")
     516resource = s3db.resource("gis_location")
     517filename = "EC_L0.csv"
     518File = open(filename, "r")
     519resource.import_xml(File, format="csv", stylesheet=stylesheet)
     520db.commit()
     521filename = "EC_L1.csv"
     522File = open(filename, "r")
     523resource.import_xml(File, format="csv", stylesheet=stylesheet)
     524db.commit()
     525filename = "EC_L2.csv"
     526File = open(filename, "r")
     527resource.import_xml(File, format="csv", stylesheet=stylesheet)
     528db.commit()
     529filename = "EC_L3.csv"
    495530File = open(filename, "r")
    496531resource.import_xml(File, format="csv", stylesheet=stylesheet)