Changes between Version 157 and Version 158 of GIS/Data


Ignore:
Timestamp:
09/18/18 08:52:31 (6 years ago)
Author:
Fran Boon
Comment:

+SC

Legend:

Unmodified
Added
Removed
Modified
  • GIS/Data

    v157 v158  
    199199db.commit()
    200200filename = "MG_L4.csv"
     201File = open(filename, "r")
     202resource.import_xml(File, format="csv", stylesheet=stylesheet)
     203db.commit()
     204gis.update_location_tree()
     205db.commit()
     206}}}
     207
     208=== Seychelles ===
     209Admin Boundaries:
     210* [http://eden.sahanafoundation.org/downloads/SC_Lx.7z SC_Lx.7z]
     211
     212The L0 / L1 polygons have come originally from [http://gadm.org GADM] including HASC codes. Creole names and L2 / L3 hierarchy came from Wikipedia.
     213
     214Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this:
     215{{{
     216cd /home/web2py
     217p7zip -d SC_Lx.7z
     218python web2py.py -S eden -M
     219
     220auth.override = True
     221languages = s3.l10n_languages
     222languages["fr"] = "French"
     223languages["crs"] = "Seychellois Creole"
     224stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl")
     225resource = s3db.resource("gis_location")
     226filename = "SC_L0.csv"
     227File = open(filename, "r")
     228resource.import_xml(File, format="csv", stylesheet=stylesheet)
     229db.commit()
     230filename = "SC_L1.csv"
     231File = open(filename, "r")
     232resource.import_xml(File, format="csv", stylesheet=stylesheet)
     233db.commit()
     234filename = "SC_L2.csv"
     235File = open(filename, "r")
     236resource.import_xml(File, format="csv", stylesheet=stylesheet)
     237db.commit()
     238filename = "SC_L3.csv"
    201239File = open(filename, "r")
    202240resource.import_xml(File, format="csv", stylesheet=stylesheet)