| | 1028 | Airports & Heliports: |
| | 1029 | * [http://eden.sahanafoundation.org/downloads/US_Transport.7z US_Transport.7z] |
| | 1030 | |
| | 1031 | These have come originally from [https://data.humdata.org/dataset/ourairports-usa HDX] with L1 fixed & L2 added |
| | 1032 | |
| | 1033 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| | 1034 | {{{ |
| | 1035 | cd /home/web2py |
| | 1036 | p7zip -d US_Transport.7z |
| | 1037 | python web2py.py -S eden -M |
| | 1038 | |
| | 1039 | auth.override = True |
| | 1040 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "transport", "airport.xsl") |
| | 1041 | resource = s3db.resource("transport_airport") |
| | 1042 | filename = "airport.csv" |
| | 1043 | File = open(filename, "r") |
| | 1044 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 1045 | db.commit() |
| | 1046 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "transport", "heliport.xsl") |
| | 1047 | resource = s3db.resource("transport_heliport") |
| | 1048 | filename = "heliport.csv" |
| | 1049 | File = open(filename, "r") |
| | 1050 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| | 1051 | db.commit() |
| | 1052 | gis.update_location_tree() |
| | 1053 | db.commit() |
| | 1054 | }}} |