-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdata.py
More file actions
30 lines (22 loc) · 1.03 KB
/
data.py
File metadata and controls
30 lines (22 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import common
import cycle
# download
start_date = cycle.get_version_start(cycle.get_cycle_download()) # to download which cycle
all_charts = [
"https://nfdc.faa.gov/webContent/28DaySub/28DaySubscription_Effective_" + start_date + ".zip",
"https://nfdc.faa.gov/webContent/28DaySub/" + start_date + "/aixm5.0.zip",
"https://aeronav.faa.gov/Obst_Data/DAILY_DOF_DAT.ZIP",
"https://aeronav.faa.gov/Upload_313-d/cifp/CIFP_" + start_date[2:].replace("-", "") + ".zip"
]
common.download_list(all_charts)
# copy all files from legacy folder
common.call_script("cp legacy/* .")
common.make_data()
common.make_db()
# copy all files from x folder
common.call_script("cp x/* .")
common.make_data()
# Convert shapefile to GeoJSON and generate airspace tiles before creating databasesx.zip
common.call_script("ogr2ogr -f GeoJSON Additional_Data/Shape_Files/Class_Airspace.geojson Additional_Data/Shape_Files/Class_Airspace.shp")
common.call_script("chmod +x generate_airspace_tiles.sh && ./generate_airspace_tiles.sh")
common.make_db("x")