Changes between Version 126 and Version 127 of GIS/Data


Ignore:
Timestamp:
10/24/17 12:23:43 (4 years ago)
Author:
Fran Boon
Comment:

+CU

Legend:

Unmodified
Added
Removed
Modified
  • GIS/Data

    v126 v127  
    431431db.commit()
    432432filename = "CR_L2.csv"
     433File = open(filename, "r")
     434resource.import_xml(File, format="csv", stylesheet=stylesheet)
     435db.commit()
     436gis.update_location_tree()
     437db.commit()
     438}}}
     439
     440=== Cuba ===
     441Admin Boundaries:
     442* [http://eden.sahanafoundation.org/downloads/CU_Lx.7z CU_Lx.7z]
     443
     444Source is [http://gadm.org GADM] via [https://data.humdata.org/dataset/cuba-administrative-boundaries-levels-0-and-1-from-gadm HDX].
     445
     446Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this:
     447{{{
     448cd /home/web2py
     449p7zip -d CU_Lx.7z
     450python web2py.py -S eden -M
     451
     452auth.override = True
     453stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl")
     454resource = s3db.resource("gis_location")
     455filename = "CU_L0.csv"
     456File = open(filename, "r")
     457resource.import_xml(File, format="csv", stylesheet=stylesheet)
     458db.commit()
     459filename = "CU_L1.csv"
     460File = open(filename, "r")
     461resource.import_xml(File, format="csv", stylesheet=stylesheet)
     462db.commit()
     463filename = "CU_L2.csv"
    433464File = open(filename, "r")
    434465resource.import_xml(File, format="csv", stylesheet=stylesheet)