| | 249 | === Paraguay === |
| | 250 | Admin Boundaries: |
| | 251 | * [http://eden.sahanafoundation.org/downloads/PY_Lx.7z PY_Lx.7z] |
| | 252 | |
| | 253 | These have come originally from [http://gadm.org GADM] with ISO-3166-2 codes from Wikipedia |
| | 254 | |
| | 255 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| | 256 | {{{ |
| | 257 | cd /home/web2py |
| | 258 | p7zip -d PY_Lx.7z |
| | 259 | python web2py.py -S eden -M |
| | 260 | |
| | 261 | auth.override = True |
| | 262 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| | 263 | resource = s3db.resource("gis_location") |
| | 264 | filename = "PY_L0.csv" |
| | 265 | File = open(filename, "r") |
| | 266 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 267 | db.commit() |
| | 268 | filename = "PY_L1.csv" |
| | 269 | File = open(filename, "r") |
| | 270 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 271 | db.commit() |
| | 272 | filename = "PY_L2.csv" |
| | 273 | File = open(filename, "r") |
| | 274 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 275 | db.commit() |
| | 276 | gis.update_location_tree() |
| | 277 | db.commit() |
| | 278 | }}} |