Changes between Version 124 and Version 125 of GIS/Data


Ignore:
Timestamp:
10/24/17 11:37:44 (5 years ago)
Author:
Fran Boon
Comment:

+CO

Legend:

Unmodified
Added
Removed
Modified
  • GIS/Data

    v124 v125  
    369369db.commit()
    370370filename = "CL_L3.csv"
     371File = open(filename, "r")
     372resource.import_xml(File, format="csv", stylesheet=stylesheet)
     373db.commit()
     374gis.update_location_tree()
     375db.commit()
     376}}}
     377
     378=== Colombia ===
     379Admin Boundaries:
     380* [http://eden.sahanafoundation.org/downloads/CO_Lx.7z CO_Lx.7z]
     381
     382Source is [https://data.humdata.org/dataset/colombia-administrative-boundaries-levels-0-3 HDX].
     383
     384Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this:
     385{{{
     386cd /home/web2py
     387p7zip -d CO_Lx.7z
     388python web2py.py -S eden -M
     389
     390auth.override = True
     391stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl")
     392resource = s3db.resource("gis_location")
     393filename = "CO_L0.csv"
     394File = open(filename, "r")
     395resource.import_xml(File, format="csv", stylesheet=stylesheet)
     396db.commit()
     397filename = "CO_L1.csv"
     398File = open(filename, "r")
     399resource.import_xml(File, format="csv", stylesheet=stylesheet)
     400db.commit()
     401filename = "CO_L2.csv"
    371402File = open(filename, "r")
    372403resource.import_xml(File, format="csv", stylesheet=stylesheet)