Tutorial - Using GetImage to Create a Custom Airport
Note: you can click any image to view it at full resolution.
In this tutorial we will use GetImage to fetch orthophotos of a U.S. airport
and then use WorldMaker to build an airport layout to match these photos.
In this first part we will prepare our photos; in the second part
we will create the runway layout.
While this tutorial focuses on runway layouts, you can use this technique
to prepare reference scenery for building cities or placing custom objects
1. Preparing the Reference Scenery.
In order to create the airport layout, we will create a "reference" custom
scenery package. This will be a scenery package with black and white
orthophotos of the area we want to work on. When we view this scenery
in WorldMaker, the orthophotos will be shown (as custom terrain textures)
exactly where the real world objects are, allowing us to accurately place
runways, obstacles, etc.visually.
We are going to create a runway layout for Sacramento International Airport
(KSMF). Before we can create the reference scenery, we need to know
a little bit about where KSMF is.
Load WorldMaker. Choose the Airports tab and type KSMF into the
upper right text box to search for KSMF. WorldMaker will zoom into
the airport and show you something like this:
In the original airport layout, the runways (from Robin's data) are all
that is available. We need to know how much of this area we will be
working with. In the case of KSMF, we can look up the taxiway layout
online and compare the runway locations to the whole airport.
Go to www.myairplane.com and click on the link for NOAA approach plates.
Type KSMF into the ID field and click search. Click the AIRPORT
DIAGRAM link to view KSMF. You should download a PDF that looks something
From this we can determine that the airprot area for KSMF is almost entirely
contained between the two runways. Now we have to decide which "quads"
(squares of terrain) in WorldMaker we will need to have texture for.
Zoom out in WorldMaker from KSMF, then switch to the Terrain tab and
zoom back in again. At a certain point, white numbers will appear in
the bottom of the quads.
We can now figure out the range of quads that we need to cover with orthophotos
to draw the airport. The first number is horizontal. Based on
the runway placement it looks like we need quads from 59 to 63 inclusive.
(It is better to take one too many quads than one too few.) Vertically
we need quads 135 to 142.
We now have to make a custom scenery package that we can load the custom
IMPORTANT: you must not have any custom Sacramento scenery (+38-122)
installed. If you do, remove that scenery and restart WorldMaker before
Pick the "Save Terrain and Obstacles" menu item in WorldMaker. Quit
WorldMaker 7.30 will automatically create a new custom scenery package
for you in your custom scenery folder, called "New Custom Scenery". It
will contain a +38-122.env file in just the right place on your hard disk.
Find the "New Custom Scenery" package in your custom scenery folder
and rename it "Sacramento Reference Scenery". Navigate to Earth nav
data/+30-130 within that package.
Now we will create the "GetImage" script that will apply the custom scenery.
Create a new text document in this folder and name it "get_sacramento.txt".
Open it in NotePad and type the following:
Let's try to understand what this script does. The first line tells
GetImage ot read the .env file you have dragged in. (That's how it knows
that those quads in the middle of the .env file are for Sacramento and not
Boston.) The second line tells GetImage to move the vertices for the
50 quads from 59x135 to 64x143 to be perfectly square. If we do not
do this, GetImage's image will not be quite properly aligned. The third
and fourth lines both fetch bitmaps, the first with a lower left corner of
59,133 and the second of 59, 138
SQUARE 59 135 64 143
AUTO_APPLY 59 133 5 1024
AUTO_APPLY 59 138 5 1024
(insert here x-planation)
Start GetImage. Drag the +32-122.env file and the get_sacramento.txt
file into the GetImage window at the same time with one drag.
GetImage will take a while to run and then create three new files: +32-122_new.env
(a new ENV with the textures applied) and two bitmaps, 59_138.bmp and 59_133.bmp.
Rename the existing +32-122.env file as +32-122_old.env. Rename
+32-122_new.env as +32-122.env. Create a new "custom terrain textures"
folder in your custom scenery folder and move the two bitmaps into this folder.
Now you have a new .env file with the two textures applied over KSMF on
nice square quads and two bitmaps that represent the airport. Restart
WorldMaker and you should see this:
We now have our KSMF reference custom scenery package and we can build taxiway
2. Making the Taxiway Layout
Now that we have reference custom scenery for KSMF we can make the taxiway
layout. Before we do this, we are going to do some prep work. WorldMaker
can be very slow when saving the apt.dat file after editing. Also the
default KSMF airport contains "fake" taxiways automatically inserted by Robin's
database that we do not want. We will deal with both of these situations
Go to your Resources/Earth nav data folder and make a backup copy of
the apt.dat file. Name it "apt_original.dat". Open the apt.dat
file and delete everything from the copywrite notice to the first line of
KSMF. Then delete everything from after KSMF to the 99 line at the
end. Also delete all of the runways (lines starting with a 10 that
have a runwawy name of "xxx" (are taxiways).
When done your apt.dat file will look like this (except with a longer copyright
Now when you start up WorldMaker and choose airports you should only see
KSMF and any airport layouts from custom scenery packages. When you
pick KSMF you should only see the two main runways and not any taxiways.
715 Version - DAFIF data cycle 200313, build 1444...
1 27 1 1 KSMF Sacramento Intl
10 38.695320 -121.580257 16L 180.75 8609
0.0000 0.0000 150 352321 02 0 3 0.25 1
10 38.695537 -121.601277 16R 180.74 8609
0.0000 0.0000 150 155222 01 0 3 0.25 1
18 38.695309 -121.579203 1 Light beacon
19 38.707115 -121.579004 1 Windsock
19 38.683524 -121.581510 1 Windsock
19 38.707332 -121.600027 1 Windsock
19 38.683741 -121.602526 1 Windsock
50 12675 ATIS
51 12295 UNICOM
52 12110 CLNC DEL
53 12170 GND
54 12570 CAPITOL TWR
55 11910 NORCAL APP/DEP
You are now ready to add your taxiways. Use WorldMaker to add taxiways
one by one on top of the real ones in the bitmaps. I recommend the following
The runways will be in the right place but you may want to add blast pads
based on the photo.
- Create rough taxiways approximately where the real ones belong.
- Zoom in and align them more closely.
- Hide the original textures (toggle "show textures" in the special
menu to hide the bitmap) and double-check corners.
- Add blastpads to the runways if necessary.
- Exit WorldMaker and use a text editor to change the taxiway light
types for all taxiways using search and replace and a word processor. The
six digit code (six from the right) controls the lights for each line. This
is faster than setting them all in WorldMaker.
- Go through and set any special pavement types for runways and taxiways.
3. What To Do With Your Taxiway Layout
When done you will have an apt.dat file in your X-System/Resources/Earth
nav data folder that contains your new apt.dat layout as well as any other
custom scenery airport layouts that were available. (X-Plane saves
these in the file too). You can then do two things with your layout:
Once done don't forget to rename the old apt_original.dat file back to apt.dat
so you have your runways back before flying in X-Plane!
- If you are building a custom scenery package, copy your apt.dat file
from the X-System/Resources/Earth nav data to the Earth nav data folder in
your custom scenery package. Delete all airports in this file but yours.
Now your custom package has your custom layout.
- Send the apt.dat file from your X-System/Resources/Earth nav data to
Robin Peel for inclusion in the next version of X-Plane. Delete all
apt.dat layouts except yours from the apt.dat file before sending it to Robin.
You can get more info about contributing data to Robin at Robin's nav
data home page: http://www.x-plane.org/robinp/.