| | 273 | File = open(import_file, "r") |
| | 274 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 275 | db.commit() |
| | 276 | gis.update_location_tree() |
| | 277 | db.commit() |
| | 278 | }}} |
| | 279 | |
| | 280 | === Korea, Republic of === |
| | 281 | 'South Korea' |
| | 282 | |
| | 283 | Admin Boundaries: |
| | 284 | * [http://eden.sahanafoundation.org/downloads/KR_Lx.7z KR_Lx.7z] |
| | 285 | |
| | 286 | These have come originally from [http://gadm.org GADM] |
| | 287 | |
| | 288 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| | 289 | {{{ |
| | 290 | cd /home/web2py |
| | 291 | p7zip -d KR_Lx.7z |
| | 292 | python web2py.py -S eden -M |
| | 293 | |
| | 294 | auth.override = True |
| | 295 | languages = s3.l10n_languages |
| | 296 | languages["ko"] = "Korean" |
| | 297 | resource = s3db.resource("gis_location") |
| | 298 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| | 299 | import_file = "KR_L0.csv" |