Changes between Version 98 and Version 99 of GIS/Data


Ignore:
Timestamp:
10/01/15 11:29:54 (10 years ago)
Author:
Fran Boon
Comment:

+MG

Legend:

Unmodified
Added
Removed
Modified
  • GIS/Data

    v98 v99  
    128128#resource.import_xml(File, format="csv", stylesheet=stylesheet)
    129129#db.commit()
     130gis.update_location_tree()
     131db.commit()
     132}}}
     133
     134=== Madagascar ===
     135Admin Boundaries:
     136* [http://eden.sahanafoundation.org/downloads/MG_Lx.7z MG_Lx.7z]
     137
     138These have come originally from [http://cod.humanitarianresponse.info COD] with L0 & alternate names fronm [http://gadm.org GADM].
     139
     140Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this:
     141{{{
     142cd /home/web2py
     143p7zip -d MG_Lx.7z
     144python web2py.py -S eden -M
     145
     146auth.override = True
     147languages = s3.l10n_languages
     148languages["mg"] = "Malagasy"
     149stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl")
     150resource = s3db.resource("gis_location")
     151filename = "MG_L0.csv"
     152File = open(filename, "r")
     153resource.import_xml(File, format="csv", stylesheet=stylesheet)
     154db.commit()
     155filename = "MG_L1.csv"
     156File = open(filename, "r")
     157resource.import_xml(File, format="csv", stylesheet=stylesheet)
     158db.commit()
     159filename = "MG_L2.csv"
     160File = open(filename, "r")
     161resource.import_xml(File, format="csv", stylesheet=stylesheet)
     162db.commit()
     163filename = "MG_L3.csv"
     164File = open(filename, "r")
     165resource.import_xml(File, format="csv", stylesheet=stylesheet)
     166db.commit()
     167filename = "MG_L4.csv"
     168File = open(filename, "r")
     169resource.import_xml(File, format="csv", stylesheet=stylesheet)
     170db.commit()
    130171gis.update_location_tree()
    131172db.commit()