Changes between Version 159 and Version 160 of GIS/Data


Ignore:
Timestamp:
06/19/19 17:56:20 (6 years ago)
Author:
Fran Boon
Comment:

+CD

Legend:

Unmodified
Added
Removed
Modified
  • GIS/Data

    v159 v160  
    5151db.commit()
    5252filename = "CF_L5.csv"
     53File = open(filename, "r")
     54resource.import_xml(File, format="csv", stylesheet=stylesheet)
     55db.commit()
     56gis.update_location_tree()
     57db.commit()
     58}}}
     59
     60=== Democratic Republic of Congo ===
     61Admin Boundaries:
     62* [http://eden.sahanafoundation.org/downloads/CD_Lx.7z CD_Lx.7z]
     63
     64These have come originally from [https://data.humdata.org/dataset/drc-administrative-boundaries-levels-0-2 HDX].
     65
     66Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this:
     67{{{
     68cd /home/web2py
     69p7zip -d CD_Lx.7z
     70python web2py.py -S eden -M
     71
     72auth.override = True
     73languages = s3.l10n_languages
     74languages["fr"] = "French"
     75languages["kg"] = "Kongo"
     76languages["ln"] = "Lingala"
     77languages["sw"] = "Swahili"
     78languages["lu"] = "Luba-Katanga"
     79stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl")
     80resource = s3db.resource("gis_location")
     81filename = "CD_L0.csv"
     82File = open(filename, "r")
     83resource.import_xml(File, format="csv", stylesheet=stylesheet)
     84db.commit()
     85filename = "CD_L1.csv"
     86File = open(filename, "r")
     87resource.import_xml(File, format="csv", stylesheet=stylesheet)
     88db.commit()
     89filename = "CD_L2.csv"
    5390File = open(filename, "r")
    5491resource.import_xml(File, format="csv", stylesheet=stylesheet)