| 993 | === Croatia === |
| 994 | Admin Boundaries: |
| 995 | * [http://eden.sahanafoundation.org/downloads/HR_Lx.7z HR_Lx.7z] |
| 996 | |
| 997 | These have come originally from [http://gadm.org GADM] with Names fixed using Wikipedia. |
| 998 | |
| 999 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| 1000 | {{{ |
| 1001 | cd /home/web2py |
| 1002 | p7zip -d HR_Lx.7z |
| 1003 | python web2py.py -S eden -M |
| 1004 | |
| 1005 | auth.override = True |
| 1006 | languages = s3.l10n_languages |
| 1007 | languages["hr"] = "Croatian" |
| 1008 | languages["it"] = "Italian" |
| 1009 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| 1010 | resource = s3db.resource("gis_location") |
| 1011 | filename = "HR_L0.csv" |
| 1012 | File = open(filename, "r") |
| 1013 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 1014 | db.commit() |
| 1015 | filename = "HR_L1.csv" |
| 1016 | File = open(filename, "r") |
| 1017 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 1018 | db.commit() |
| 1019 | filename = "HR_L2.csv" |
| 1020 | File = open(filename, "r") |
| 1021 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 1022 | db.commit() |
| 1023 | gis.update_location_tree() |
| 1024 | db.commit() |
| 1025 | }}} |
| 1026 | |