Changes between Version 146 and Version 147 of GIS/Data


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

--

Legend:

Unmodified
Added
Removed
Modified
  • GIS/Data

    v146 v147  
    530530db.commit()
    531531filename = "EC_L3.csv"
     532File = open(filename, "r")
     533resource.import_xml(File, format="csv", stylesheet=stylesheet)
     534db.commit()
     535gis.update_location_tree()
     536db.commit()
     537}}}
     538
     539=== El Salvador ===
     540Admin Boundaries:
     541* [http://eden.sahanafoundation.org/downloads/SV_Lx.7z SV_Lx.7z]
     542
     543Source is [http://gadm.org GADM] via [https://data.humdata.org/dataset/el-salvador-administrative-level-0-1-and-2-boundaries HDX].
     544
     545Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this:
     546{{{
     547cd /home/web2py
     548p7zip -d SV_Lx.7z
     549python web2py.py -S eden -M
     550
     551auth.override = True
     552stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl")
     553resource = s3db.resource("gis_location")
     554filename = "SV_L0.csv"
     555File = open(filename, "r")
     556resource.import_xml(File, format="csv", stylesheet=stylesheet)
     557db.commit()
     558filename = "SV_L1.csv"
     559File = open(filename, "r")
     560resource.import_xml(File, format="csv", stylesheet=stylesheet)
     561db.commit()
     562filename = "SV_L2.csv"
    532563File = open(filename, "r")
    533564resource.import_xml(File, format="csv", stylesheet=stylesheet)