Changes between Version 135 and Version 136 of GIS/Data


Ignore:
Timestamp:
10/24/17 16:59:30 (4 years ago)
Author:
Fran Boon
Comment:

+MX

Legend:

Unmodified
Added
Removed
Modified
  • GIS/Data

    v135 v136  
    629629db.commit()
    630630filename = "HN_L2.csv"
     631File = open(filename, "r")
     632resource.import_xml(File, format="csv", stylesheet=stylesheet)
     633db.commit()
     634gis.update_location_tree()
     635db.commit()
     636}}}
     637
     638=== Mexico ===
     639Admin Boundaries:
     640* [http://eden.sahanafoundation.org/downloads/MX_Lx.7z MX_Lx.7z]
     641
     642Source is [http://gadm.org GADM] via [https://data.humdata.org/dataset/mexico-administrative-level-0-national-1-state-and-mexico-city-and-2-boundaries HDX]
     643
     644Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this:
     645{{{
     646cd /home/web2py
     647p7zip -d MX_Lx.7z
     648python web2py.py -S eden -M
     649
     650auth.override = True
     651stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl")
     652resource = s3db.resource("gis_location")
     653filename = "MX_L0.csv"
     654File = open(filename, "r")
     655resource.import_xml(File, format="csv", stylesheet=stylesheet)
     656db.commit()
     657filename = "MX_L1.csv"
     658File = open(filename, "r")
     659resource.import_xml(File, format="csv", stylesheet=stylesheet)
     660db.commit()
     661filename = "MX_L2.csv"
    631662File = open(filename, "r")
    632663resource.import_xml(File, format="csv", stylesheet=stylesheet)