Wiki

Clone wiki

OSMAirportsX / Home

OSMAirportsX

Welcome to OSMAirportsX wiki! This page gives a quick description about the software and installation/usage details for all three major platforms (Windows, Linux and OSX).

Description

OSMAirportsX is a tool that generates complete airport environments from OSM and other Public Domain data for the X-Plane simulation environment. By reading OSM data, it can generate both the apt.dat runway information as well as .dsf scenery files in and around the airport proximity. For the apt.dat, it can recognize and build airport boundaries, runways, taxiways, taxi lines, aprons, beacons, PAPIs and frequency lists. On the scenery side, it builds airport terminals, gates & jetways, fences, hangars, buildings and service roads by randomly choosing appropriate facades and random heights.

The tool can detect anomalies in OSM data by comparing with OurAirports data and automatically fix it. For example, if the runway 7/25 is shown in OSM with the first co-ordinate on the 25 side rather than the 7, the tool will reverse the coordinates to accurately generate the correct runway position and orientation. The tool also warns the user if the OSM data and OurAirports data do not agree. Warnings such as this ensure the data is accurate by comparing the two public domain sources.

The results are quite spectacular (Basically, if you use an orthophoto overlay, there is nothing you need to align, its already perfectly aligned and extremely accurate). Depending on the OSM data, some anomalies do occur, particularly in taxiways, which are easily tweaked in WED. Basically, you can start with nothing (no need for a default apt.dat). The tool generates a folder with apt.dat and .dsf files in the appropriate folders. Just copy this folder into custom scenery and you're done. If nothing else, the tool should simplify the scenery creation dramatically.

I see two use cases for this tool, although I started with only one in mind.

  1. Remove the flat, barren, airport look in X-Plane. I believe I have succeeded in that.
  2. Scenery designers can save tons of time, effort and money using the tool as a first step and then tweaking the results. Imagine building a class bravo airport from scratch! KDTW took about 10 seconds for the tool to spit out. I even tried KORD and it takes 30 seconds, but considering the gigantic size (spans two scenery tiles no less!), it is a huge timesaver.

Have fun!

Installation

Binaries

Binaries are available for the Windows and OSX Platforms in the download page. Download them, unzip and run the executable inside. All dependencies are bundled in the package.

Windows Pre-requisites

Ensure you have installed Microsoft Visual C++ (2008) redistributable packages from microsoft.com

OSX pre-requisites

Install the GEOS framework (You can install the framework from anywhere. This link is only for convenience: from http://www.kyngchaos.com/software/frameworks#geos)

From source

Clone the OSMAirportsX repository into a directory using git clone, or download the zipped master branch from the Download page. From (http://www.ourairports.com/data), download airports.csv, runways.csv, airport-frequencies.csv, navaids.csv. Put these inside the OSMAirportsX directory.

OSX

Dependencies:

  • lxml
  • shapely (depends on libgeos_c and may need to be installed separately)
  • pygui
  • pyobjc-core
  • pyobjc

Install these dependencies via pip, easy_install or manually at your discretion. libgeos_c is a shapely dependency and may need to be installed separately via binaries, homebrew/Macports/Fink or from source.

Clone the OSMAirportsX repository, change into the directory and type:

python OSMAirportsX.py

Linux

  • lxml
  • shapely (depends on libgeos_c and may need to be installed separately)
  • pygui
  • pygtk

Install these dependencies via pip, easy_install, your favourite package management tool or manually at your discretion. libgeos_c is a shapely dependency and may need to be installed separately.

For Linux, an environment variable needs to be set for PyGUI to work. You can export this variable in the terminal before running, write a script to do that before running the tool or export the variable in-place at your discretion.

If you are using bash:

export PYGUI_IMPLEMENTATION=GtkGI

Clone the OSMAirportsX repository, change into the directory and type:

python OSMAirportsX.py

Windows

  • lxml
  • shapely (install binaries with libgeos_c, don't install via pip. These are unofficial binaries, so install at your own discretion.)
  • pygui
  • pywin32 (install from website, not available on pip)

Clone the OSMAirportsX repository, change into the directory and type:

python OSMAirportsX.py

Usage

Before using the tool, you need to export an OSM file for the airport you wish to generate from http://www.openstreetmap.org. Find your airport and set up an appropriate zoom level so that you can see the entire airport. Click on Data->Export Data on the left side toolbar. In the export dialog that comes up to the right of this toolbar, select "Manually Select a different area". Move the bounding box so that it covers the entire airport. Make the bounding box just big enough to hold the airport boundaries, maybe slightly bigger. Don't make it too big. Click the Export button and a file called map.osm.xml will be downloaded. Rename and move it as you see fit. Make sure the extension is .osm or .xml.

Now start the tool.

  1. Enter the Airport ICAO and select the OSM file you wish to use for airport generation. Make sure ICAO matches the area in the OSM file.
  2. Select appropriate taxiway settings
  3. Click Identify Runways button. This will populate the runway number listbox with the runways for the selected airport.
  4. All settings in the Runway settings area depend on the runway selection. Select a runway pair and make appropriate selections under runway settings. These settings are remembered even if you switch between runways. These details are usually not in OSM and can be taken from websites like airnav.
  5. Enter fallback values for situations where OSM data does not have values.
  6. Enter appropriate values under DSF setting
  7. Click "Set Path" and select a directory where you wish the generated folder to go into. The application will create a folder with ICAO name in this path.
  8. Finally, click Generate. The application will appear to freeze (will be fixed later), but is actually processing OSM data. Once you get a pop-up message, the generation is complete. Look into the path which you set earlier and you should see the generated airport.

DO NOT FORGET THE NEXT STEP!

Post generation tasks

The DSF file present in ICAO_FOLDER/Earth Nav Data/<lat><lon>/ is a text file. This needs to be converted to a .dsf file using DSFTool (CLI) or XGrinder (GUI). If you are using XGrinder, just drag the .txt file into the XGrinder window and the .dsf will be generated.

Now you're done!

Updated