Changes between Version 125 and Version 126 of GIS/Data


Ignore:
Timestamp:
10/24/17 12:14:16 (5 years ago)
Author:
Fran Boon
Comment:

+CR

Legend:

Unmodified
Added
Removed
Modified
  • GIS/Data

    v125 v126  
    400400db.commit()
    401401filename = "CO_L2.csv"
     402File = open(filename, "r")
     403resource.import_xml(File, format="csv", stylesheet=stylesheet)
     404db.commit()
     405gis.update_location_tree()
     406db.commit()
     407}}}
     408
     409=== Costa Rica ===
     410Admin Boundaries:
     411* [http://eden.sahanafoundation.org/downloads/CR_Lx.7z CR_Lx.7z]
     412
     413Source is [http://gadm.org GADM].
     414
     415Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this:
     416{{{
     417cd /home/web2py
     418p7zip -d CR_Lx.7z
     419python web2py.py -S eden -M
     420
     421auth.override = True
     422stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl")
     423resource = s3db.resource("gis_location")
     424filename = "CR_L0.csv"
     425File = open(filename, "r")
     426resource.import_xml(File, format="csv", stylesheet=stylesheet)
     427db.commit()
     428filename = "CR_L1.csv"
     429File = open(filename, "r")
     430resource.import_xml(File, format="csv", stylesheet=stylesheet)
     431db.commit()
     432filename = "CR_L2.csv"
    402433File = open(filename, "r")
    403434resource.import_xml(File, format="csv", stylesheet=stylesheet)