Changes between Version 77 and Version 78 of GIS/Data


Ignore:
Timestamp:
10/15/14 14:53:42 (10 years ago)
Author:
Fran Boon
Comment:

+SL

Legend:

Unmodified
Added
Removed
Modified
  • GIS/Data

    v77 v78  
    8282#resource.import_xml(File, format="csv", stylesheet=stylesheet)
    8383#db.commit()
     84gis.update_location_tree()
     85db.commit()
     86}}}
     87
     88=== Sierra Leone ===
     89Admin Boundaries:
     90* [http://eden.sahanafoundation.org/downloads/SL_Lx.7z SL_Lx.7z]
     91
     92These have come originally from [http://cod.humanitarianresponse.info COD] including PCodes & UNMIL 'Health' codes. PCodes have been made full where incomplete. Missing Western Urban L3s recreated from dissolved L4s.
     93
     94Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this:
     95{{{
     96cd /home/web2py
     97p7zip -d SL_Lx.7z
     98python web2py.py -S eden -M
     99
     100auth.override = True
     101stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl")
     102resource = s3db.resource("gis_location")
     103filename = "SL_L0.csv"
     104File = open(filename, "r")
     105resource.import_xml(File, format="csv", stylesheet=stylesheet)
     106db.commit()
     107filename = "SL_L1.csv"
     108File = open(filename, "r")
     109resource.import_xml(File, format="csv", stylesheet=stylesheet)
     110db.commit()
     111filename = "SL_L2.csv"
     112File = open(filename, "r")
     113resource.import_xml(File, format="csv", stylesheet=stylesheet)
     114db.commit()
     115filename = "SL_L3.csv"
     116File = open(filename, "r")
     117resource.import_xml(File, format="csv", stylesheet=stylesheet)
     118db.commit()
     119filename = "SL_L4.csv"
     120File = open(filename, "r")
     121resource.import_xml(File, format="csv", stylesheet=stylesheet)
     122db.commit()
    84123gis.update_location_tree()
    85124db.commit()