Changes between Version 127 and Version 128 of GIS/Data


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

+DO

Legend:

Unmodified
Added
Removed
Modified
  • GIS/Data

    v127 v128  
    462462db.commit()
    463463filename = "CU_L2.csv"
     464File = open(filename, "r")
     465resource.import_xml(File, format="csv", stylesheet=stylesheet)
     466db.commit()
     467gis.update_location_tree()
     468db.commit()
     469}}}
     470
     471=== Dominican Republic ===
     472Admin Boundaries:
     473* [http://eden.sahanafoundation.org/downloads/DO_Lx.7z DO_Lx.7z]
     474
     475Source is [https://www.one.gob.do/cartografia/281/shapefiles Oficina Nacional de Estadística] via [https://data.humdata.org/dataset/dominican-republic-administrative-boundaries-levels-0-6 HDX].
     476
     477Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this:
     478{{{
     479cd /home/web2py
     480p7zip -d DO_Lx.7z
     481python web2py.py -S eden -M
     482
     483auth.override = True
     484stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl")
     485resource = s3db.resource("gis_location")
     486filename = "DO_L0.csv"
     487File = open(filename, "r")
     488resource.import_xml(File, format="csv", stylesheet=stylesheet)
     489db.commit()
     490filename = "DO_L1.csv"
     491File = open(filename, "r")
     492resource.import_xml(File, format="csv", stylesheet=stylesheet)
     493db.commit()
     494filename = "DO_L2.csv"
     495File = open(filename, "r")
     496resource.import_xml(File, format="csv", stylesheet=stylesheet)
     497db.commit()
     498filename = "DO_L3.csv"
     499File = open(filename, "r")
     500resource.import_xml(File, format="csv", stylesheet=stylesheet)
     501db.commit()
     502filename = "DO_L4.csv"
     503File = open(filename, "r")
     504resource.import_xml(File, format="csv", stylesheet=stylesheet)
     505db.commit()
     506filename = "DO_L5.csv"
    464507File = open(filename, "r")
    465508resource.import_xml(File, format="csv", stylesheet=stylesheet)