Skip to content

Airport data

Airport search in flight planning uses worldwide airport data from OpenAIP, licensed under CC BY-NC 4.0. Whitebox mirrors it at:

AIRPORT_DATA_URL=https://whitebox.hel1.your-objectstorage.com/airport_db/v1/airports.json.gz

Installation

The airport-data-provisioner service downloads the file once into the airport-data volume (airport-data-dev in development) and builds the search file from it. Later runs reuse the downloaded file, so search keeps working offline. Network failures are retried every 30 seconds; invalid data stops the service with an error in its log. Until data is installed, airport search returns "Airport data is temporarily unavailable" and the rest of Whitebox works.

To check or rerun it, from the checkout (use ./bin/dev-compose instead of docker compose in development):

docker compose logs airport-data-provisioner
docker compose run --rm --no-deps airport-data-provisioner

To fetch the current mirror file again, add poetry run python whitebox/manage.py provision_airport_data --refresh to the run command. The installed data is kept if the download fails.

Updating the mirror

Maintainers with an OpenAIP API key and write access to the bucket can export a new file with the Flight Management plugin installed:

OPENAIP_API_KEY=<key> python -m whitebox_plugin_flight_management.airports.export \
  --output airports.json.gz

Upload airports.json.gz to airport_db/v1/airports.json.gz with public read access and Content-Type: application/gzip, then download it from the public URL and check that it is byte-identical. Installed devices pick it up with --refresh. A change to the file format needs a new airport_db/v2/ path so existing installations keep working.