Open Source Aviation Maps

marklit2 pts0 comments

Open Source Aviation Maps

Mark Litwintschik

I'm a Big Data, AI, GIS & Networking Consultant with clients in the UK, USA, Sweden, Ireland & Germany. Past clients include BAA plc, Bank of America Merrill Lynch, Blackberry, Bloomberg, British Telecom, Ford, Google, ITV, IMG, Nando's, News UK, Pizza Hut, Royal Mail, T-Mobile, Williams Formula 1, Wise & UBS. I hold both a Canadian and a British passport as well as permanent residence in Estonia. Find me on LinkedIn & X.

Open Source Aviation Maps

The US Federal Aviation Administration (FAA) maintains a National Airspace System Resource (NASR) system. This system produces data feeds that are freely available and have been used by firms such as Jeppesen for producing aviation charts.

Jesse McGraw has been working on two GitHub repositories for the past 12 years that convert these feeds into SQLite3 databases that can then be rendered in QGIS.

His first repository contains a QGIS workspace as well as a BASH script that downloads SVGs, CSVs, Natural Earth Shapefiles from a Dropbox link.

His second repository contains an ETL codebase and is made up of 4,039 lines of Python. Its earliest commit was in 2014 and has received updates as recently as three weeks ago. This codebase can be run on a regular basis and in order to the aviation charts up to date with the latest FAA data.

In this post, I'll analyse the map produced and its underlying datasets.

My Workstation

I'm using a 5.7 GHz AMD Ryzen 9 9950X CPU. It has 16 cores and 32 threads and 1.2 MB of L1, 16 MB of L2 and 64 MB of L3 cache. It has a liquid cooler attached and is housed in a spacious, full-sized Cooler Master HAF 700 computer case.

The system has 96 GB of DDR5 RAM clocked at 4,800 MT/s and a 5th-generation, Crucial T700 4 TB NVMe M.2 SSD which can read at speeds up to 12,400 MB/s. There is a heatsink on the SSD to help keep its temperature down. This is my system's C drive.

The system is powered by a 1,200-watt, fully modular Corsair Power Supply and is sat on an ASRock X870E Nova 90 Motherboard.

I'm running Ubuntu 24 LTS via Microsoft's Ubuntu for Windows on Windows 11 Pro. In case you're wondering why I don't run a Linux-based desktop as my primary work environment, I'm still using an Nvidia GTX 1080 GPU which has better driver support on Windows and ArcGIS Pro only supports Windows natively.

Installing Prerequisites

I'll use Python, jq and SQLite3 to help analyse the data in this post.

$ sudo add-apt-repository ppa:deadsnakes/ppa<br>$ sudo apt update<br>$ sudo apt install \<br>jq \<br>libsqlite3-mod-spatialite \<br>python3-pip \<br>python3.12-venv

I'll set up a Python Virtual Environment and install the FAA NASR ETL codebase.

$ python3 -m venv ~/.aviation_maps<br>$ source ~/.aviation_maps/bin/activate

$ git clone \<br>https://github.com/jlmcgraw/processFaaData \<br>~/processFaaData<br>$ cd ~/processFaaData<br>$ pip install .

I'll use DuckDB, along with its H3, JSON, Lindel, Parquet and Spatial extensions in this post.

$ cd ~<br>$ wget -c https://github.com/duckdb/duckdb/releases/download/v1.5.1/duckdb_cli-linux-amd64.zip<br>$ unzip -j duckdb_cli-linux-amd64.zip<br>$ chmod +x duckdb<br>$ ~/duckdb

INSTALL h3 FROM community;<br>INSTALL lindel FROM community;<br>INSTALL json;<br>INSTALL parquet;<br>INSTALL spatial;

I'll set up DuckDB to load every installed extension each time it launches.

$ vi ~/.duckdbrc

.timer on<br>.width 180<br>LOAD h3;<br>LOAD lindel;<br>LOAD json;<br>LOAD parquet;<br>LOAD spatial;

The maps in this post were rendered with QGIS version 4.0.2. QGIS is a desktop application that runs on Windows, macOS and Linux. The application has grown in popularity in recent years and has ~15M application launches from users all around the world each month.

The maps in this post use the Droid Sans and Liberation Sans fonts.

An Aviation Chart Template

I'll clone the repository containing the QGIS workspace template (Aviation map.qgs) along with the script to pull down some of its assets.

$ git clone \<br>https://github.com/jlmcgraw/aviationMap \<br>~/aviationMap<br>$ cd ~/aviationMap

The following will download a tar file from Dropbox. This codebase is more than a decade old and I suspect that if built from scratch today, these assets would just sit in the repository as is.

$ bash -x freshenLocalData.sh

Chart Assets

Below, I'll break down the contents by file type in the data.tar.xz file pulled off of Dropbox.

$ tar -tvf data.tar.xz > contents.txt<br>$ ~/duckdb

CREATE OR REPLACE TABLE contents AS<br>SELECT file_size: SPLIT(TRIM(SPLIT(column0, 'jlmcgraw')[-1]), ' ')[1]::INT,<br>file_path: SPLIT(column0, 'data/')[-1],<br>file_type: IF(file_path LIKE '%.%',<br>LOWER(SPLIT(file_path, '.')[-1]),<br>NULL)<br>FROM READ_CSV('contents.txt', header=False);

Most of the content is SQLite3 files followed by Shapefiles. Most of the Shapefiles were sourced from Natural Earth.

SELECT mb: CEIL(SUM(file_size) / 1024 ** 2)::INT,<br>file_type<br>FROM contents<br>GROUP BY 2<br>ORDER BY 1 DESC;

┌───────┬───────────┐<br>│ mb │ file_type │<br>│ int32 │ varchar │<br>├───────┼───────────┤<br>│ 526 │ sqlite │<br>│ 166...

from aviation install data duckdb system

Related Articles