Changes between Version 75 and Version 76 of GIS/Data


Ignore:
Timestamp:
10/15/14 13:38:03 (10 years ago)
Author:
Fran Boon
Comment:

+LR

Legend:

Unmodified
Added
Removed
Modified
  • GIS/Data

    v75 v76  
    4545resource.import_xml(File, format="csv", stylesheet=stylesheet)
    4646db.commit()
     47gis.update_location_tree()
     48db.commit()
     49}}}
     50
     51=== Liberia ===
     52Admin Boundaries:
     53* [http://eden.sahanafoundation.org/downloads/LR_Lx.7z LR_Lx.7z]
     54
     55These have come originally from [http://gadm.org GADM] for !L0/L1 and [http://cod.humanitarianresponse.info COD] for L2...adding PCodes & UNMIL 'Health' codes.
     56
     57NB L3 is included (data from GADM), but not recommended to import as it will add several L2s which no longer exist.
     58
     59Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this:
     60{{{
     61cd /home/web2py
     62p7zip -d LR_Lx.7z
     63python web2py.py -S eden -M
     64
     65auth.override = True
     66stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl")
     67resource = s3db.resource("gis_location")
     68filename = "LR_L0.csv"
     69File = open(filename, "r")
     70resource.import_xml(File, format="csv", stylesheet=stylesheet)
     71db.commit()
     72filename = "LR_L1.csv"
     73File = open(filename, "r")
     74resource.import_xml(File, format="csv", stylesheet=stylesheet)
     75db.commit()
     76filename = "LR_L2.csv"
     77File = open(filename, "r")
     78resource.import_xml(File, format="csv", stylesheet=stylesheet)
     79db.commit()
     80#filename = "LR_L3.csv"
     81#File = open(filename, "r")
     82#resource.import_xml(File, format="csv", stylesheet=stylesheet)
     83#db.commit()
    4784gis.update_location_tree()
    4885db.commit()