| | 1192 | === Hungary === |
| | 1193 | Admin Boundaries: |
| | 1194 | * [http://eden.sahanafoundation.org/downloads/HU_Lx.7z HU_Lx.7z] |
| | 1195 | |
| | 1196 | These have come originally from [http://gadm.org GADM]. |
| | 1197 | |
| | 1198 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| | 1199 | {{{ |
| | 1200 | cd /home/web2py |
| | 1201 | p7zip -d HU_Lx.7z |
| | 1202 | python web2py.py -S eden -M |
| | 1203 | |
| | 1204 | auth.override = True |
| | 1205 | languages = s3.l10n_languages |
| | 1206 | languages["hu"] = "Hungarian" |
| | 1207 | resource = s3db.resource("gis_location") |
| | 1208 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| | 1209 | import_file = "HU_L0.csv" |
| | 1210 | File = open(import_file, "r") |
| | 1211 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 1212 | db.commit() |
| | 1213 | import_file = "HU_L1.csv" |
| | 1214 | File = open(import_file, "r") |
| | 1215 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 1216 | db.commit() |
| | 1217 | import_file = "HU_L2.csv" |
| | 1218 | File = open(import_file, "r") |
| | 1219 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 1220 | db.commit() |
| | 1221 | gis.update_location_tree() |
| | 1222 | db.commit() |
| | 1223 | }}} |
| | 1224 | |