| | 248 | |
| | 249 | === Argentina === |
| | 250 | Admin Boundaries: |
| | 251 | * [http://eden.sahanafoundation.org/downloads/AR_Lx.7z AR_Lx.7z] |
| | 252 | |
| | 253 | Source is [http://gadm.org GADM] via [https://data.humdata.org/dataset/argentina-administrative-level-0-boundaries HDX] |
| | 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 AR_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 = "AR_L0.csv" |
| | 265 | File = open(filename, "r") |
| | 266 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 267 | db.commit() |
| | 268 | filename = "AR_L1.csv" |
| | 269 | File = open(filename, "r") |
| | 270 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 271 | db.commit() |
| | 272 | filename = "AR_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 | }}} |