Changes between Version 19 and Version 20 of GIS/Data


Ignore:
Timestamp:
02/03/14 11:24:00 (8 years ago)
Author:
Fran Boon
Comment:

+Indonesia Admin Boundaries

Legend:

Unmodified
Added
Removed
Modified
  • GIS/Data

    v19 v20  
    3333db.commit()
    3434import_file = "IN_L3.csv"
     35File = open(import_file, "r")
     36resource.import_xml(File, format="csv", stylesheet=stylesheet)
     37db.commit()
     38gis.update_location_tree()
     39db.commit()
     40}}}
     41
     42=== Indonesia ===
     43Admin Boundaries:
     44* [http://eden.sahanafoundation.org/downloads/ID_Lx.7z ID_Lx.7z]
     45
     46These have come originally from [http://gadm.org GADM]
     47
     48Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this:
     49{{{
     50cd /home/web2py
     51p7zip -d ID_Lx.7z
     52python web2py.py -S eden -M
     53
     54auth.override = True
     55resource = s3db.resource("gis_location")
     56stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl")
     57import_file = "ID_L0.csv"
     58File = open(import_file, "r")
     59resource.import_xml(File, format="csv", stylesheet=stylesheet)
     60db.commit()
     61import_file = "ID_L1.csv"
     62File = open(import_file, "r")
     63resource.import_xml(File, format="csv", stylesheet=stylesheet)
     64db.commit()
     65import_file = "ID_L2.csv"
    3566File = open(import_file, "r")
    3667resource.import_xml(File, format="csv", stylesheet=stylesheet)