wiki:GIS/Data

Version 113 (modified by Fran Boon, 8 years ago) ( diff )

+KE

GIS Data

This page lists sources for data, including some which has been pre-formatted for easy import into Sahana Eden.

IMPORTANT NOTE:
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:

These have come originally from COD.

Use 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()

Guinea

Admin Boundaries:

These have come originally from GADM with PCodes added from OCHA and UNMIL 'Health' codes. Conarky spelt correctly as Conakry.

Use 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:

These have come originally from HDX.

Use 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:

These have come originally from GADM for L0/L1 and 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 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:

These have come originally from COD with L0 & alternate names from 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 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()

Sierra Leone

Admin Boundaries:

These have come originally from COD including PCodes & UNMIL 'Health' codes. PCodes have been made full where incomplete. Missing Western Urban L3s recreated from dissolved L4s.

Use 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()

Americas

Honduras

Admin Boundaries:

L0 and L1 have come originally from COD with L2 from GADM

Use 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()

Paraguay

Admin Boundaries:

These have come originally from GADM with ISO-3166-2 codes from Wikipedia

Use 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()

United States

Admin Boundaries:

These have come originally from GADM

There is also good socioeconomic data available at the Census Tract and Census Block Group, so those Polygons are useful.

Use 7-Zip to extract to your web2py folder & then install like this:

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()

Asia

Afghanistan

Admin Boundaries:

These have come originally from COD with Pashto names and better Romanised names from Wikipedia.

Use 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:

These have come originally from GADM with Armenian & Russian names added from Wikipedia.

Use 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:

These have come originally from GADM with Azerbaijani & Russian names added from Wikipedia.

Use 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:

These have come originally from COD (L0 from GADM) with Bengali names and better Romanised names from Wikipedia.

Use 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()

Cambodia

Admin Boundaries:

These have come originally from COD with Khmer names, Hierarchy, Newer locations and better Romanised names from Wikipedia.
(The COD dataset is a little more complete than the GADM one, although is very similar)

Use 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:

These have come from GADM. The state name 'Orissa' has been updated to 'Odisha'.

Use 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:

These have come originally from GADM

Use 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:

These have come originally from GADM

Use 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:

These have come originally from GADM with Kazakh & Russian names added from Wikipedia.

Use 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:

These have come originally from OCHA with Kyrgyz names added from Wikipedia.

Use 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()

Malaysia

Admin Boundaries:

These have come originally from GADM

Use 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:

These have come originally from GADM

Use 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:

These have come originally from 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 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:

These have come originally from COD with the Bago & Shan substates removed & the L2 boundaries created by dissolving the L3 polygons.

Use 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:

These have come originally from GADM

Use 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:

These have come originally from GADM but have had these changes:

NB The L4s are split into 4 files as otherwise they may fail to import.

Use 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()

Sri Lanka

Admin Boundaries:

These have come originally from COD with Sinhala & Tamil names added from Wikipedia.

Use 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:

These have come originally from GADM with Tajik & Russian names added from Wikipedia.

Use 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()

Timor-Leste

Admin Boundaries:

These have come originally from COD

Use 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:

These have come originally from GADM with Turkmen & Russian names added from Wikipedia.

Use 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:

These have come originally from GADM with Uzbek & Russian names added from Wikipedia.

Use 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:

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 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:

These have come originally from GADM.

Use 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["al"] = "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:

These have come originally from GADM.

Use 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:

These have come originally from GADM with the Commune of Gingelom moved from Wallonia to Flanders and names sorted out with the help of Wikipedia.

Use 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:

These have come originally from GADM with Bosnian, Croatian & Serbian names added from Wikipedia.

Use 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:

These have come originally from GADM.

Use 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:

These have come originally from GADM with Names fixed using Wikipedia.

Use 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:

These have come originally from GADM with Georgian & Russian names added from Wikipedia.

Use 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:

These have come originally from GADM with NUTS1 codes added from Wikipedia.

Use 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
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()
gis.update_location_tree()
db.commit()

Greece

Admin Boundaries:

The data came from GADM with L3s inserted from Wikipedia

Use 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:

These have come originally from GADM.

Use 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:

These have come originally from GADM with the 2x BAT L2 dissolved to 1.

Use 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:

These have come originally from GADM with names and new Municipalities (without boundaries) from Wikipedia.

Use 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:

These have come originally from GADM.

Use 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()

Serbia

Admin Boundaries:

These have come originally from GADM.

Use 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:

These have come originally from GADM with Ukrainian, Russian & Crimean Tatar names added from Wikipedia.

Use 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()

Middle East

Iraq

Admin Boundaries:

These have come originally from COD

Use 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:

Use 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:

Use 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:

Use 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:

These have come originally from COD with L2 Polygons added from 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 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()

Oceania

Christmas Island

Admin Boundaries:

These have come originally from GADM.

Use 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()

Fiji

Admin Boundaries:

These have come originally from HDX and GADM (L0, Eastern L1).

Use 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()

Micronesia

Admin Boundaries:

These have come originally from GADM.

Use 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:

These have come originally from GADM.

Use 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:

These have come originally from GADM updated for new provinces with name corrections and L3 & L4 added from Wikipedia.

Use 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()

Other Data Sources

L0

L1

L2

OGC (WMS/WFS)

Aerial Imagery

See GIS/AerialImagery

See Also

Note: See TracWiki for help on using the wiki.