= GIS Data = [[TOC]] This page lists sources for data, including some which has been pre-formatted for easy import into Sahana Eden. '''IMPORTANT NOTE:'''[[BR]] BE VERY CAREFUL WITH WHAT PROGRAMS YOU EDIT THESE FILES IN! * Excel can lose placenames in unicode languages * Excel and Open Office can truncate WKTs It is safest (and fastest) to use a plain text editor (eg. Notepad++) == Africa == === Central African Republic === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/CF_Lx.7z CF_Lx.7z] These have come originally from [http://cod.humanitarianresponse.info COD]. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d CF_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["fr"] = "French" languages["sg"] = "Sango" stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "CF_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "CF_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "CF_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "CF_L3.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "CF_L4.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "CF_L5.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Democratic Republic of Congo === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/CD_Lx.7z CD_Lx.7z] These have come originally from [https://data.humdata.org/dataset/drc-administrative-boundaries-levels-0-2 HDX]. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d CD_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["fr"] = "French" languages["kg"] = "Kongo" languages["ln"] = "Lingala" languages["sw"] = "Swahili" languages["lu"] = "Luba-Katanga" stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "CD_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "CD_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "CD_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Guinea === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/GN_Lx.7z GN_Lx.7z] These have come originally from [http://gadm.org GADM] with PCodes added from OCHA and UNMIL 'Health' codes. Conarky spelt correctly as Conakry. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d GN_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["fr"] = "French" stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "GN_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "GN_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "GN_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "GN_L3.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Kenya === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/KE_Lx.7z KE_Lx.7z] These have come originally from [https://data.humdata.org/group/ken HDX]. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d LR_Lx.7z python web2py.py -S eden -M auth.override = True stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "KE_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "KE_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "KE_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Liberia === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/LR_Lx.7z LR_Lx.7z] These have come originally from [http://gadm.org GADM] for L0/L1 and [http://cod.humanitarianresponse.info COD] for L2...adding PCodes & UNMIL 'Health' codes. Boundary changes noted for L1s with historical boundaries included for statistical analysis. NB L3 is included (data from GADM), but not recommended to import as it will add several L2s which no longer exist. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d LR_Lx.7z python web2py.py -S eden -M auth.override = True stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "LR_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "LR_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "LR_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() #filename = "LR_L3.csv" #File = open(filename, "r") #resource.import_xml(File, format="csv", stylesheet=stylesheet) #db.commit() gis.update_location_tree() db.commit() }}} === Madagascar === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/MG_Lx.7z MG_Lx.7z] These have come originally from [http://cod.humanitarianresponse.info COD] with L0 & alternate names from [http://gadm.org GADM]. Truncated names in Antananarivo II fixed using http://www.ceni-madagascar.mg/dossier/TEXTES_COMMUNALE/DECRETS/Decret_classement_communes_Fokontany_consolid%C3%A9_01-04-15.pdf Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d MG_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["mg"] = "Malagasy" stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "MG_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "MG_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "MG_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "MG_L3.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "MG_L4.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Seychelles === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/SC_Lx.7z SC_Lx.7z] The L0 / L1 polygons have come originally from [http://gadm.org GADM] including HASC codes. Creole names and L2 / L3 hierarchy came from Wikipedia. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d SC_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["fr"] = "French" languages["crs"] = "Seychellois Creole" stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "SC_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "SC_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "SC_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "SC_L3.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Sierra Leone === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/SL_Lx.7z SL_Lx.7z] These have come originally from [http://cod.humanitarianresponse.info COD] including PCodes & UNMIL 'Health' codes. PCodes have been made full where incomplete. Missing Western Urban L3s recreated from dissolved L4s. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d SL_Lx.7z python web2py.py -S eden -M auth.override = True stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "SL_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "SL_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "SL_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "SL_L3.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "SL_L4.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === South Africa === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/ZA_Lx.7z ZA_Lx.7z] These have come originally from [https://data.humdata.org/dataset/south-africa-admin-level-1-boundaries HDX] with local names from Wikipedia. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d ZA_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["nso"] = "Sepedi" # Northern Sotho languages["st"] = "Sesotho" # Southern Sotho languages["tn"] = "Setswana" languages["ss"] = "siSwati" languages["ve"] = "Tshivenda" languages["ts"] = "Xitsonga" languages["af"] = "Afrikaans" languages["nr"] = "isiNdebele" # Southern Ndebele languages["xh"] = "isiXhosa" languages["zu"] = "isiZulu" stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "ZA_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "ZA_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "ZA_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "ZA_L3.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "ZA_L4.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} == Americas == === Argentina === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/AR_Lx.7z AR_Lx.7z] Source is [http://gadm.org GADM] via [https://data.humdata.org/dataset/argentina-administrative-level-0-boundaries HDX] Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d AR_Lx.7z python web2py.py -S eden -M auth.override = True stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "AR_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "AR_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "AR_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Belize === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/BZ_Lx.7z BZ_Lx.7z] Source is [http://gadm.org GADM]. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d BZ_Lx.7z python web2py.py -S eden -M auth.override = True stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "BZ_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "BZ_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Bolivia === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/BO_Lx.7z BO_Lx.7z] Source for Polygons is Ministerio de Desarrollo Sostenible via [https://data.humdata.org/dataset/bolivia-admin-level-2-boundaries HDX], but the hierarchy was missing so got this from Wikipedia (along with correct Accents & some alternate names). Muñecas L2 was merged between the one with the accent & the one with the mangled accent. The 4x different Cercado L2s in different provinces have been unmerged. Lakes and Salt Flats moved out to a separate file. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d BO_Lx.7z python web2py.py -S eden -M auth.override = True stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "BO_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "BO_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "BO_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "BO_L3.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Brazil === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/BR_Lx.7z BR_Lx.7z] Source for Polygons is [https://gadm.org/download_country_v3.html GADM 3.6] ([https://data.humdata.org/dataset/brazil-administrative-level-0-boundaries HDX] has an older version uploaded there by OCHA FISS]). Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d BR_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["pt"] = "Portuguese" stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "BR_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "BR_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "BR_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "BR_L3.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Canada === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/CA_Lx.7z CA_Lx.7z] Source for Polygons is [http://gadm.org GADM] with translations from Wikipedia. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d CA_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["fr"] = "French" languages["ath"] = "Athabaskan" languages["ikt"] = "Inuinnaqtun" languages["iu"] = "Inuktitut" languages["moe"] = "Innu-aimun" stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "CA_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "CA_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "CA_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "CA_L3.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Chile === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/CL_Lx.7z CL_Lx.7z] Source for Polygons is [http://gadm.org GADM] via [https://data.humdata.org/dataset/chile-administrative-level-0-country-1-region-region HDX], then corrections: * Ultima Esperanza and Magallanes duplications * San Jose de Maipo * Add a few missing accents on L3s (with unaccented left as alt_name) Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d CL_Lx.7z python web2py.py -S eden -M auth.override = True stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "CL_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "CL_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "CL_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "CL_L3.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Colombia === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/CO_Lx.7z CO_Lx.7z] Source is [https://data.humdata.org/dataset/colombia-administrative-boundaries-levels-0-3 HDX]. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d CO_Lx.7z python web2py.py -S eden -M auth.override = True stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "CO_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "CO_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "CO_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Costa Rica === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/CR_Lx.7z CR_Lx.7z] Source is [http://gadm.org GADM]. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d CR_Lx.7z python web2py.py -S eden -M auth.override = True stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "CR_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "CR_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "CR_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Cuba === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/CU_Lx.7z CU_Lx.7z] Source is [http://gadm.org GADM] via [https://data.humdata.org/dataset/cuba-administrative-boundaries-levels-0-and-1-from-gadm HDX]. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d CU_Lx.7z python web2py.py -S eden -M auth.override = True stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "CU_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "CU_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "CU_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Dominican Republic === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/DO_Lx.7z DO_Lx.7z] Source 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], ignoring the Regions (L1 in that dataset), DM, SEC and BP as not Administrative Units. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d DO_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["es"] = "Spanish" stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "DO_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "DO_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "DO_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Ecuador === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/EC_Lx.7z EC_Lx.7z] Source is [http://gadm.org GADM] since the [https://data.humdata.org/dataset/ecuador-admin-level-1-boundaries HDX] version is based on an older export and is harder to use. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d EC_Lx.7z python web2py.py -S eden -M auth.override = True stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "EC_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "EC_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "EC_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "EC_L3.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === El Salvador === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/SV_Lx.7z SV_Lx.7z] Source is [http://gadm.org GADM] via [https://data.humdata.org/dataset/el-salvador-administrative-level-0-1-and-2-boundaries HDX]. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d SV_Lx.7z python web2py.py -S eden -M auth.override = True stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "SV_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "SV_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "SV_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Guatemala === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/GT_Lx.7z GT_Lx.7z] Source is [http://gadm.org GADM] via [https://data.humdata.org/dataset/guatemala-administrative-level-0-national-1-departments-and-2-municipalities HDX]. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d GT_Lx.7z python web2py.py -S eden -M auth.override = True stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "GT_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "GT_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "GT_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Haiti === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/HT_Lx.7z HT_Lx.7z] Source is Centre National de l'Information Géo-Spatiale (CNIGS) via [https://data.humdata.org/dataset/hti-polbndl-adm1-cnigs-zip HDX] Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d HT_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["es"] = "Spanish" languages["fr"] = "French" languages["ht"] = "Haitian Creole" stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "HT_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "HT_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "HT_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "HT_L3.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Honduras === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/HN_Lx.7z HN_Lx.7z] L0 and L1 have come originally from [http://cod.humanitarianresponse.info COD] with L2 from [http://gadm.org GADM] Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d HN_Lx.7z python web2py.py -S eden -M auth.override = True stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "HN_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "HN_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "HN_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Mexico === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/MX_Lx.7z MX_Lx.7z] Source 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] Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d MX_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["es"] = "Spanish" stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "MX_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "MX_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "MX_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Nicaragua === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/NI_Lx.7z NI_Lx.7z] Source is [http://gadm.org GADM] via [https://data.humdata.org/dataset/nicaragua-administrative-level-0 HDX] with the names for the Automonomous regions corrected and updated using Wikipedia. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d NI_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["es"] = "Spanish" stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "NI_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "NI_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "NI_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Panama === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/PA_Lx.7z PA_Lx.7z] Source is [http://gadm.org GADM] via [https://data.humdata.org/dataset/panama-administrative-level-0-1-2-and-3-boundaries HDX]. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d PA_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["es"] = "Spanish" stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "PA_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "PA_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "PA_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "PA_L3.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Paraguay === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/PY_Lx.7z PY_Lx.7z] These have come originally from [http://gadm.org GADM] with ISO-3166-2 codes from Wikipedia Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d PY_Lx.7z python web2py.py -S eden -M auth.override = True stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "PY_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "PY_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "PY_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Peru === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/PE_Lx.7z PE_Lx.7z] Source is [http://gadm.org GADM] suince the Instituto Geográfico Nacional (IGN) via [https://data.humdata.org/dataset/limites-de-peru HDX] has the out-dated Departments still rather than the newer Regions. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d PE_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["es"] = "Spanish" languages["qu"] = "Quechua" languages["ay"] = "Aymara" stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "PE_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "PE_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "PE_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "PE_L3.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === United States === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/US_Lx.7z US_Lx.7z] These have come originally from [http://gadm.org GADM] There is also good socioeconomic data available at the Census Tract and Census Block Group, so those Polygons are useful. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this (NB This takes a fair bit of memory to import...if running 1Gb RAM=swap then upgrade before import & then can can downgrade again afterwards): {{{ cd /home/web2py p7zip -d US_Lx.7z python web2py.py -S eden -M auth.override = True stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "US_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "US_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "US_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} Airports & Heliports: * [http://eden.sahanafoundation.org/downloads/US_Transport.7z US_Transport.7z] These have come originally from [https://data.humdata.org/dataset/ourairports-usa HDX] with L1 fixed & L2 added Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d US_Transport.7z python web2py.py -S eden -M auth.override = True stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "transport", "airport.xsl") resource = s3db.resource("transport_airport") filename = "airport.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "transport", "heliport.xsl") resource = s3db.resource("transport_heliport") filename = "heliport.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} == Asia == === Afghanistan === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/AF_Lx.7z AF_Lx.7z] These have come originally from [https://cod.humanitarianresponse.info COD] with Pashto names and better Romanised names from Wikipedia. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d AF_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["prs"] = "Dari" languages["ps"] = "Pashto" stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "AF_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "AF_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "AF_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "AF_L3.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Armenia === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/AM_Lx.7z AM_Lx.7z] These have come originally from [http://gadm.org GADM] with Armenian & Russian names added from Wikipedia. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d AM_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["hy"] = "Armenian" languages["ru"] = "Russian" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "AM_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Azerbaijan === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/AZ_Lx.7z AZ_Lx.7z] These have come originally from [http://gadm.org GADM] with Azerbaijani & Russian names added from Wikipedia. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d AZ_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["az"] = "Azerbaijani" languages["ru"] = "Russian" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "AZ_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Bangladesh === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/BD_Lx.7z BD_Lx.7z] These have come originally from [https://cod.humanitarianresponse.info COD] (L0 from GADM) with Bengali names and better Romanised names from Wikipedia.[[BR]] Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d BD_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["bn"] = "Bengali" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "BD_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "BD_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "BD_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "BD_L3.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Bhutan === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/BT_Lx.7z BT_Lx.7z] L1s/L2s have come originally from [https://data.humdata.org/dataset/bhutan-administrative-boundaries-levels-0-2 HDX] with Dzongkha names and alternate names from Wikipedia and DMIS.[[BR]] L3s have come from [wiki:GIS/OpenStreetMap][[BR]] Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d BT_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["dz"] = "Dzongkha" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "BT_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "BT_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "BT_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "BT_L3.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Brunei Darussalam === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/BN_Lx.7z BN_Lx.7z] These have come originally from [http://gadm.org GADM]. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d BN_Lx.7z python web2py.py -S eden -M auth.override = True resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "BN_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "BN_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "BN_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Cambodia === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/KH_Lx.7z KH_Lx.7z] These have come originally from [https://cod.humanitarianresponse.info COD] with Khmer names, Hierarchy, Newer locations and better Romanised names from Wikipedia.[[BR]] (The COD dataset is a little more complete than the GADM one, although is very similar) Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d KH_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["km"] = "Khmer" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "KH_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "KH_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "KH_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "KH_L3.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === India === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/IN_Lx.7z IN_Lx.7z] These have come from [http://gadm.org GADM]. The state name 'Orissa' has been updated to 'Odisha'. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d IN_Lx.7z python web2py.py -S eden -M auth.override = True resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "IN_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "IN_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "IN_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "IN_L3.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Indonesia === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/ID_Lx.7z ID_Lx.7z] These have come originally from [http://gadm.org GADM] Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d ID_Lx.7z python web2py.py -S eden -M auth.override = True resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "ID_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "ID_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "ID_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Korea, Republic of === 'South Korea' Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/KR_Lx.7z KR_Lx.7z] These have come originally from [http://gadm.org GADM] Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d KR_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["ko"] = "Korean" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "KR_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Kazakhstan === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/KZ_Lx.7z KZ_Lx.7z] These have come originally from [http://gadm.org GADM] with Kazakh & Russian names added from Wikipedia. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d KG_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["kk"] = "Kazakh" languages["ru"] = "Russian" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "KZ_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Kyrgyzstan === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/KG_Lx.7z KG_Lx.7z] These have come originally from OCHA with Kyrgyz names added from Wikipedia. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d KG_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["ky"] = "Kyrgyz" languages["ru"] = "Russian" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "KG_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "KG_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "KG_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Lao People's Democratic Republic === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/LA_Lx.7z LA_Lx.7z] These have come originally from [https://data.humdata.org/group/lao HDX]. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d LA_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["lo"] = "Lao" stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "LA_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "LA_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "LA_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Malaysia === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/MY_Lx.7z MY_Lx.7z] These have come originally from [http://gadm.org GADM] Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d MY_Lx.7z python web2py.py -S eden -M auth.override = True resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "MY_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "MY_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "MY_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Maldives === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/MV_Lx.7z MV_Lx.7z] These have come originally from [http://gadm.org GADM] Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d MV_Lx.7z python web2py.py -S eden -M auth.override = True resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "MV_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Mongolia === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/MN_Lx.7z MN_Lx.7z] These have come originally from [https://cod.humanitarianresponse.info COD] with the names (both English & Mongolian) updated from Wikipedia (COD name moved to alt_name in case of conflict)....and the 1994 creation of Govisümber noted. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d MN_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["mn"] = "Mongolian" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "MN_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "MN_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "MN_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "MN_L3.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Myanmar === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/MM_Lx.7z MM_Lx.7z] These have come originally from [https://cod.humanitarianresponse.info COD] with the Bago & Shan substates removed & the L2 boundaries created by dissolving the L3 polygons. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d MM_Lx.7z python web2py.py -S eden -M auth.override = True resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "MM_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "MM_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "MM_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "MM_L3.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "MM_L4.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "MM_L5.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Nepal === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/NP_Lx.7z NP_Lx.7z] To download via terminal, {{{ cd /home/web2py/ wget "http://eden.sahanafoundation.org/downloads/NP_Lx.7z" }}} These have come originally from [http://gadm.org GADM] Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d NP_Lx.7z python web2py.py -S eden -M auth.override = True resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "NP_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "NP_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "NP_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "NP_L3.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "NP_L4.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Philippines === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/PH_Lx.7z PH_Lx.7z] These have come originally from [http://gadm.org GADM] but have had these changes: * L1s inserted by [http://www.philgis.org/freegisdata.htm PhilGIS] so their L1s become L2s, etc * New region created: NIR [Negros Island Region] * Lakes removed from L3s (available in PH_Lakes.csv if-desired) * Davao Occidental has been created from Davao del Sur: http://en.wikipedia.org/wiki/Davao_Occidental * Hinunangan is all in Southern Leyte (San Pablo & San Pedro Islands were listed as being in Quezon!) * Manila is split up into Districts and Municipalities: http://www.nscb.gov.ph/activestats/psgc/regview.asp?region=13 * Shariff Kabunsuan has merged back into Maguindanao: http://en.wikipedia.org/wiki/Shariff_Kabunsuan * Omar has been created from Luuk: http://en.wikipedia.org/wiki/Omar,_Sulu * Region Names have been modified to the format used by DSWD (Department of Social Welfare & Development) * PSGC codes added for L1, L2 and L3 from http://www.nscb.gov.ph/activestats/psgc/listprov.asp * A couple of other names have been corrected * Kalookan -> Caloocan * Albuquerque -> Alburquerque * Ozamis -> Ozamiz * Sagnay -> Sagñay * Santo Nino -> Santo Niño (x2) * Sofronio Española * Taguig -> Taguig City * Names for Barangays in Cavite City, San Pablo City and Tacloban City which have unique ones * Barangay numbers have been added for Bacarra and San Nicolas * Cotabato City & Isabela City marked as being directly in their L1s not in the L2s that they're capitals of NB The L4s are split into 4 files as otherwise they may fail to import. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d PH_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["tl"] = "Tagalog" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "PH_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "PH_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "PH_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "PH_L3.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "PH_L4_1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "PH_L4_2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "PH_L4_3.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "PH_L4_4.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Singapore === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/SG_Lx.7z SG_Lx.7z] These have come originally from [http://gadm.org GADM]. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d SG_Lx.7z python web2py.py -S eden -M auth.override = True resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "SG_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "SG_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Sri Lanka === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/LK_Lx.7z LK_Lx.7z] These have come originally from [http://cod.humanitarianresponse.info COD] with Sinhala & Tamil names added from Wikipedia. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d LK_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["si"] = "Sinhala" languages["ta"] = "Tamil" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "LK_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "LK_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "LK_L3.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "LK_L4.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Tajikistan === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/TJ_Lx.7z TJ_Lx.7z] These have come originally from [http://gadm.org GADM] with Tajik & Russian names added from Wikipedia. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d TJ_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["tg"] = "Tajik" languages["ru"] = "Russian" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "TJ_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "TJ_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Thailand === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/TH_Lx.7z TH_Lx.7z] These have come originally from [https://data.humdata.org/group/tha HDX] with L3 LINESTRINGs converted to POLYGONs. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d TH_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["th"] = "Thai" stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "TH_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "TH_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "TH_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "TH_L3.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Timor-Leste === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/TL_Lx.7z TL_Lx.7z] These have come originally from [https://cod.humanitarianresponse.info COD] Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d TL_Lx.7z python web2py.py -S eden -M auth.override = True resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "TL_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "TL_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "TL_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "TL_L3.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Turkmenistan === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/TM_Lx.7z TM_Lx.7z] These have come originally from [http://gadm.org GADM] with Turkmen & Russian names added from Wikipedia. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d TM_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["tk"] = "Turkmen" languages["ru"] = "Russian" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "TM_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Uzbekistan === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/UZ_Lx.7z UZ_Lx.7z] These have come originally from [http://gadm.org GADM] with Uzbek & Russian names added from Wikipedia. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d UZ_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["uz"] = "Uzbek" languages["ru"] = "Russian" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "UZ_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Vietnam === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/VN_Lx.7z VN_Lx.7z] These have come from Viet Nam Red Cross. * Old boundaries have been left and start / end dates have been added from Wikipedia. - the latest changes have unknown dates currently so are using 2015-01-01 until these are known. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d VN_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["vi"] = "Vietnamese" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "VN_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "VN_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "VN_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "VN_L3.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} == Europe == === Albania === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/AL_Lx.7z AL_Lx.7z] These have come originally from [https://data.humdata.org/group/alb HDX]. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d AL_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["sq"] = "Albanian" stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "AL_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "AL_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "AL_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "AL_L3.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Austria === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/AT_Lx.7z AT_Lx.7z] These have come originally from [http://gadm.org GADM]. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d AT_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["de"] = "German" stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "AT_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "AT_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "AT_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Belgium === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/BE_Lx.7z BE_Lx.7z] These have come originally from [http://gadm.org GADM] with the Commune of Gingelom moved from Wallonia to Flanders and names sorted out with the help of Wikipedia. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d BE_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["fr"] = "French" languages["nl"] = "Dutch" languages["de"] = "German" stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "BE_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "BE_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "BE_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "BE_L3.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "BE_L4.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Bosnia and Herzegovina === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/BA_Lx.7z BA_Lx.7z] These have come originally from [http://gadm.org GADM] with Bosnian, Croatian & Serbian names added from Wikipedia. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d BA_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["bs"] = "Bosnian" languages["hr"] = "Croatian" languages["sr"] = "Serbian" stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "BA_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "BA_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "BA_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "BA_L3.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Bulgaria === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/BG_Lx.7z BG_Lx.7z] These have come originally from [http://gadm.org GADM]. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d BG_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["bg"] = "Bulgarian" stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "BG_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "BG_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "BG_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Croatia === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/HR_Lx.7z HR_Lx.7z] These have come originally from [http://gadm.org GADM] with Names fixed using Wikipedia. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d HR_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["hr"] = "Croatian" languages["hu"] = "Hungarian" languages["it"] = "Italian" languages["sr"] = "Serbian" stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "HR_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "HR_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "HR_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Georgia === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/GE_Lx.7z GE_Lx.7z] These have come originally from [http://gadm.org GADM] with Georgian & Russian names added from Wikipedia. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d GE_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["ka"] = "Georgian" languages["ru"] = "Russian" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "GE_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Germany === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/DE_Lx.7z DE_Lx.7z] These have come originally from [http://gadm.org GADM] with NUTS1 codes added from Wikipedia. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d DE_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["de"] = "German" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "DE_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "DE_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "DE_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "DE_L3.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "DE_L4.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Greece === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/GR_Lx.7z GR_Lx.7z] The data came from [http://gadm.org GADM] with L3s inserted from Wikipedia Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d JO_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["el"] = "Greek" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "GR_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "GR_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "GR_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "GR_L3.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "GR_L4.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Hungary === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/HU_Lx.7z HU_Lx.7z] These have come originally from [http://gadm.org GADM]. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d HU_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["hu"] = "Hungarian" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "HU_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "HU_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "HU_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Italy === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/IT_Lx.7z IT_Lx.7z] These have come originally from [http://gadm.org GADM] with the 2x BAT L2 dissolved to 1. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d IT_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["it"] = "Italian" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "IT_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "IT_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "IT_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "IT_L3.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Kosovo === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/XK_Lx.7z XK_Lx.7z] These have come originally from [http://gadm.org GADM] with names and new Municipalities (without boundaries) from Wikipedia. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d XK_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["sq"] = "Albanian" languages["sr"] = "Serbian" languages["tr"] = "Turkish" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "XK_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "XK_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "XK_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Macedonia === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/MK_Lx.7z MK_Lx.7z] These have come originally from [http://gadm.org GADM]. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d MK_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["mk"] = "Macedonian" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "MK_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "MK_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Poland === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/PL_Lx.7z PL_Lx.7z] These have come originally from [http://gadm.org GADM] with Translations from Wikipedia Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d PL_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["pl"] = "Polish" languages["be"] = "Belorussian" languages["cs"] = "Czech" languages["csb"] = "Kashubian" # Pomeranian languages["de"] = "German" languages["lt"] = "Lithuanian" languages["sk"] = "Slovak" languages["uk"] = "Ukrainian" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "PL_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "PL_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "PL_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "PL_L3.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Serbia === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/RS_Lx.7z RS_Lx.7z] These have come originally from [http://gadm.org GADM]. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d RS_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["sr"] = "Serbian" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "RS_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "RS_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "RS_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Ukraine === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/UA_Lx.7z UA_Lx.7z] These have come originally from [http://gadm.org GADM] with Ukrainian, Russian & Crimean Tatar names added from Wikipedia. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d UA_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["uk"] = "Ukrainian" languages["ru"] = "Russian" languages["crh"] = "Crimean Tatar" languages["ro"] = "Romanian" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "UA_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "UA_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "UA_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === United Kingdom === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/GB_Lx.7z GB_Lx.7z] L0-L3 have come originally from [http://gadm.org GADM] v3.6. The L4s (& a missing L2 & L3) have come from the [https://www.ordnancesurvey.co.uk/business-government/products/boundaryline Ordnance Survey's Boundary Line]. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d GB_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["cy"] = "Welsh" languages["gd"] = "Scots" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "GB_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "GB_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "GB_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "GB_L3.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "GB_L4.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} == Middle East == === Iraq=== Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/IQ_Lx.7z IQ_Lx.7z] These have come originally from [https://cod.humanitarianresponse.info COD] Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d IQ_Lx.7z python web2py.py -S eden -M auth.override = True resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "IQ_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "IQ_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "IQ_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "IQ_L3.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Jordan === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/JO_Lx.7z JO_Lx.7z] Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d JO_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["ar"] = "Arabic" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "JO_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "JO_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "JO_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "JO_L3.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "JO_Zaatari.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Lebanon === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/LB_Lx.7z LB_Lx.7z] Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d LB_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["ar"] = "Arabic" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "LB_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "LB_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "LB_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "LB_L3.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "LB_Wadi_Khaled.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Syria === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/SY_Lx.7z SY_Lx.7z] Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d SY_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["ar"] = "Arabic" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "SY_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "SY_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "SY_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "SY_L3.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Turkey === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/TR_Lx.7z TR_Lx.7z] These have come originally from [https://cod.humanitarianresponse.info COD] with L2 Polygons added from [http://gadm.org GADM]. The new L1, Düzce, was created & L1 polygons corrected. New L2s from GADM were added. Turkish Names, ISO3166 & NUTS codes were added from Wikipedia, and some Alternate Names. (Several Turkish Names can still be added) Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d TR_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["tr"] = "Turkish" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "TR_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "TR_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "TR_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Yemen === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/YE_Lx.7z YE_Lx.7z] These have come originally from [https://data.humdata.org HDX]. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d YE_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["ar"] = "Arabic" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "YE_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "YE_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "YE_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} == Oceania == === Christmas Island === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/CX_Lx.7z CX_Lx.7z] These have come originally from [http://gadm.org GADM]. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d CX_Lx.7z python web2py.py -S eden -M auth.override = True resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "CX_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Cook Islands === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/CK_Lx.7z CK_Lx.7z] Source is [http://gadm.org GADM] with L1s (names only) added from Wikipedia. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d CK_Lx.7z python web2py.py -S eden -M auth.override = True stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "CK_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "CK_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Fiji === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/FJ_Lx.7z FJ_Lx.7z] These have come originally from [https://data.hdx.rwlabs.org HDX] and [http://gadm.org GADM] (L0, Eastern L1). Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d FJ_Lx.7z python web2py.py -S eden -M auth.override = True resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "FJ_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "FJ_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "FJ_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "FJ_L3.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Kiribati === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/KI_Lx.7z KI_Lx.7z] Source is [http://gadm.org GADM] with L1s (names only) added from Wikipedia. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d KI_Lx.7z python web2py.py -S eden -M auth.override = True stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "KI_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "KI_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Micronesia === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/FM_Lx.7z FM_Lx.7z] These have come originally from [http://gadm.org GADM]. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d FM_Lx.7z python web2py.py -S eden -M auth.override = True resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "FM_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === New Zealand === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/NZ_Lx.7z NZ_Lx.7z] These have come originally from [http://gadm.org GADM]. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d NZ_Lx.7z python web2py.py -S eden -M auth.override = True resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "NZ_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "NZ_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "NZ_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Papua New Guinea === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/PG_Lx.7z PG_Lx.7z] These have come originally from [http://gadm.org GADM] updated for new provinces with name corrections and L3 & L4 added from Wikipedia. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d PG_Lx.7z python web2py.py -S eden -M auth.override = True languages = s3.l10n_languages languages["tpi"] = "Tok Pisin" languages["ho"] = "Hiri Motu" resource = s3db.resource("gis_location") stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") import_file = "PG_L0.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "PG_L1.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() import_file = "PG_L2.csv" File = open(import_file, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "PG_L3.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "PG_L4.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Solomon Islands === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/SB_Lx.7z SB_Lx.7z] Source is [http://gadm.org GADM]. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d SB_Lx.7z python web2py.py -S eden -M auth.override = True stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "SB_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "SB_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "SB_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Tonga === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/TO_Lx.7z TO_Lx.7z] Source is [http://gadm.org GADM] with L2s (names only) added from Wikipedia. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d TO_Lx.7z python web2py.py -S eden -M auth.override = True stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "TO_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "TO_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "TO_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Tuvalu === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/TV_Lx.7z TV_Lx.7z] Source is [http://gadm.org GADM]. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d TV_Lx.7z python web2py.py -S eden -M auth.override = True stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "TV_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "TV_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} === Vanuatu === Admin Boundaries: * [http://eden.sahanafoundation.org/downloads/VU_Lx.7z VU_Lx.7z] Source is [http://gadm.org GADM]. Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: {{{ cd /home/web2py p7zip -d VU_Lx.7z python web2py.py -S eden -M auth.override = True stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") resource = s3db.resource("gis_location") filename = "VU_L0.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "VU_L1.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() filename = "VU_L2.csv" File = open(filename, "r") resource.import_xml(File, format="csv", stylesheet=stylesheet) db.commit() gis.update_location_tree() db.commit() }}} == Other Data Sources == * https://cod.humanitarianresponse.info - official UN source of boundaries & P-Codes * [wiki:GIS/OpenStreetMap OpenStreetMap] * Admin 0 & 1, Hydro features, Raster & Vector: http://www.naturalearthdata.com/ * http://opencrisis.org/datastores * https://docs.google.com/spreadsheet/ccc?key=0AmVWKgWFwEyodE40Uk94bl9jZWdQTy1weEh4NVhzSWc#gid=16 * [http://data.un.org UN Data] * [http://data.worldbank.org World Bank Data] === L0 === * http://www.gadm.org * http://nils.weidmann.ws/projects/cshapes <- varying over time * http://www.naturalearthdata.com/ * http://quattroshapes.com * VMap0: http://en.wikipedia.org/wiki/Vector_Map * http://freegisdata.rtwilson.com * http://barendgehrels.blogspot.com/2010/12/free-shapefile-of-countries-of-world.html * http://barendgehrels.blogspot.com/2010/12/free-shapefiles-of-of-world-2.html * http://barendgehrels.blogspot.com/2010/12/free-shapefiles-of-of-world-3.html * http://barendgehrels.blogspot.com/2011/01/free-shapefiles-of-countries-of-world-4.html * http://thematicmapping.org/downloads/world_borders.php * UN (North Africa): http://unosat-sdn.web.cern.ch/unosat-sdn/northafrica/region/ungiwg_level0_region.zip === L1 === * http://www.gadm.org * http://www.naturalearthdata.com/ * http://geonames.org * http://quattroshapes.com * US: http://www.mapcruzin.com/free-united-states-arcgis-maps-shapefiles.htm === L2 === * SALB (High-quality, country-verified, but not all countries): http://www.unsalb.org/ * http://www.gadm.org * http://geonames.org * http://quattroshapes.com * California: http://swdb.igs.berkeley.edu/pub/data/GEOGRAPHY/DECENNIAL2010/state_county_2010_shp.zip === OGC (WMS/WFS) === * http://geonetwork-opensource.org/gallery.html#geonetwork-nodes * http://www.ogc-services.net * !BlueMarble & Mosaic (!LandSat7): http://onearth.jpl.nasa.gov/ * Hazard Layers: http://preview.grid.unep.ch:8080/geoserver/ows?service=WMS&request=GetCapabilities * Hazard Layers: http://www.pdc.org/mde/services.jsp * Massachusetts: http://lyceum.massgis.state.ma.us/wiki/doku.php === Aerial Imagery === See [wiki:GIS/AerialImagery GIS/AerialImagery] == See Also == * [wiki:UserGuidelines/GIS/Data UserGuidelines/GIS/Data]