-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathsec.py
More file actions
23 lines (19 loc) · 841 Bytes
/
sec.py
File metadata and controls
23 lines (19 loc) · 841 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import common
import glob
import cycle
# Chart specific code
# download
start_date = cycle.get_version_start(cycle.get_cycle_download()) # to download which cycle
all_charts = common.list_crawl("https://www.faa.gov/air_traffic/flight_info/aeronav/digital_products/vfr/", "^http.*" + start_date + "/sectional-files/.*.zip$")
all_charts_2 = common.list_crawl("https://www.faa.gov/air_traffic/flight_info/aeronav/digital_products/vfr/", "^http.*" + start_date + "/Caribbean/.*.zip$")
for nn in all_charts_2:
all_charts.append(nn)
common.download_list(all_charts)
all_files = common.get_files("SEC")
# make tiles
vrts = common.make_vrt_list(all_files, True, "SEC")
common.make_main_vrt(vrts, "SEC")
common.make_tiles("0", "10", "SEC")
# zip
all_tiles = glob.glob("tiles/0/**/*.webp", recursive=True)
common.zip_charts(all_tiles, "SEC")