Changes between Version 40 and Version 41 of GIS/Data


Ignore:
Timestamp:
06/09/14 19:48:47 (7 years ago)
Author:
Fran Boon
Comment:

+SL

Legend:

Unmodified
Added
Removed
Modified
  • GIS/Data

    v40 v41  
    422422import_file = "PH_L4.csv"
    423423File = open(import_file, "r")
     424resource.import_xml(File, format="csv", stylesheet=stylesheet)
     425db.commit()
     426gis.update_location_tree()
     427db.commit()
     428}}}
     429
     430=== Sri Lanka ===
     431Admin Boundaries:
     432* [http://eden.sahanafoundation.org/downloads/SL_Lx.7z SL_Lx.7z]
     433
     434These have come originally from [http://cod.humanitarianresponse.info COD] with Sinhala & Tamil names added from Wikipedia.
     435
     436Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this:
     437{{{
     438cd /home/web2py
     439p7zip -d SL_Lx.7z
     440python web2py.py -S eden -M
     441
     442auth.override = True
     443languages = s3.l10n_languages
     444languages["si"] = "Sinhala"
     445languages["ta"] = "Tamil"
     446resource = s3db.resource("gis_location")
     447stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl")
     448import_file = "SL_L1.csv"
     449File = open(import_file, "r")
     450resource.import_xml(File, format="csv", stylesheet=stylesheet)
     451db.commit()
     452filename = "SL_L2.csv"
     453File = open(filename, "r")
     454resource.import_xml(File, format="csv", stylesheet=stylesheet)
     455db.commit()
     456filename = "SL_L3.csv"
     457File = open(filename, "r")
     458resource.import_xml(File, format="csv", stylesheet=stylesheet)
     459db.commit()
     460filename = "SL_L4.csv"
     461File = open(filename, "r")
    424462resource.import_xml(File, format="csv", stylesheet=stylesheet)
    425463db.commit()