Over the last few months we have been lucky to have Ted Greene working for us as a summer co-op student.  You may have seen his commits if you look at the open source WED repository.  Ted is heading back to school now, so this post both discusses a little bit of what he accomplished and serves as public recognition of his hard work.

Ted spent the summer working on ‘workflow’ items for WED – that is, things that make WED easier for authors to use.  One of the main features he implemented was a new ortho-photo importer.

If you have a GeoTIFF you wanted to use in WED 1.2, the process goes something like this:

  1. Make an overlay image out of your TIFFs.
  2. Run the “make orthophoto command” which will create .pol files and place them in the project.
  3. Delete the original overlay image, which unfortunately looks almost exactly like the POLs in WED.
  4. Resize the TIFF to a power of 2.
  5. Grind the TIFF in XGrinder.
  6. Edit the .pol file in WordPad to use the DDS file.
  7. Edit the .pol file i WordPad to add LOAD_CENTER (if you remember) – good luck getting all of those numbers right!
  8. Export your scenery pack.
  9. Get some astonishing error in X-Plane, because the odds of getting all eight steps right is approximately 0%.

The new process with Ted’s code is much better:

  1. Import the TIFF files into WED as orthophotos.
  2. Hit control-B to build your scenery pack.
  3. Go get a coffee – WED is grinding your TIFFs to DDS for you, which is a time-consuming operation.  Don’t worry, it won’t grind them again unless you change the source file.
  4. Open in X-Plane and enjoy your orthophotos – with correct load-center directives!

final results

No hand-editing pol files, no chance for human error, and of the four steps, two you already do now and one involves beverages. What’s not to like? This screenshot shows the results of importing the TIFF files into WED and the resulting scenery pack.

This level of automation is how all of the scenery tools should work and it’s nice to finally reach a point in WED where we can add this level of convenience.

For The Nerds

WED is an open source project, and this next part only affects users trying to work with the WED source code.  (If you are not a programmer, you may want to skip to the next section.)  Ted’s finishing the new Orthophoto importer completes the removal of CGAL from WED.

CGAL is an open source library that is critical to the DSF generation code that makes the global scenery.  CGAL is also a very complex, heavy-weight library that can be quite finicky about compilers, brings in a lot of dependencies, and is generally hard to work with on Windows.

By dropping CGAL for WED, it makes the WED code significantly more accessible.  Ted created a complete MSVC 2010/2012 project for WED, so you can just download MSVC Express, open the project and hit ‘compile’ – all of the libraries are included in the repository in binary form.

(For Mac users, unfortunately we are still stuck on X-Code 3.2/10.6 – to move WED to the modern development tools we will have to purge old APIs that Apple has dropped – just like we did on Desktop.)

We are not dropping the makefile system we use on Linux, and it should even still work on Windows, but finally mingw is no longer a requirement to get started.

Removing CGAL from the project should make a Lion-compatible Mac build possible too at some point.

Upcoming Releases

At this point I expect to do a WED 1.2.1 bug-fix patch relatively soon with a few usability fixes.  Ted’s work will go into WED 1.3; I don’t know what the release time frame for 1.3 will be.

About Ben Supnik

Ben is a software engineer who works on X-Plane; he spends most of his days drinking coffee and swearing at the computer -- sometimes at the same time.

13 comments on “What Hath Ted Wrought

  1. Nice, all sounds great, was wondering if he is goin to add a way to add the gritty detail textures from wed too, one thing that is hard is goin back over an old conversion of orthos from v9 to v10 and having to manually add those lines to the .pol files one by one, or is nearly impossible if they # in the thousands. Also any chance of a mesh editing tool for vertex elevations on the dsf? Would also be handy for making runways perfect for the “follow contours on” kind of folks.

    1. I think we will eventually get all .pol file editing options from within WED, e.g. you’ll be able to select a detail texture, set specularity, etc. The idea is to make pol editing fully within-WED for orthophotos.

      Editing the DSF is entirely different, and I think everyone knows my opinion about editing existing DSFs, but the short of it is that I want to focus on tools to create DSFs from data, not manually edit existing ones.

    2. willzah, for now you can simply write a shell script for adding a line to your thousands of .pol files:

      for f in *.pol; do

      echo -e "\r\nTEXT TO BE ADDED" >> $f


      Replace “TEXT TO BE ADDED” with the line you want to add and execute the shell script in the folder where your .pol files are stored.

      On Linux and Mac this should work out of the box, on Windows you may get win-bash.

      1. wow thanks! knew this was possible, tried so many times googling it and no avail… in win will try it thanks

  2. Wish to send an gratitude to Ted and the rest of the team for the work on WED! With this new feature I believe will see even more airports created based on ortophotos etc.

  3. Thanks
    That`s good to hear. Looks like Ted made an awesome work with it. Sadly i haven`t found any geotiffs for my country. But still im making some sceneries with Google Images for personal use, for now im using 2 methods, 1 is to check both ends of the runway in Google and then move the runway in Wed to the right position, then i place the image above it and resize it to match the runway. Another method i use is to place 3 objects (buildings) on OSM and then place 3 random objects on Wed at the same coordinates they are on OSM, then i resize the image until it matches. Both methods are good but not so accurate, second one is worst.
    Hope i find some good geotiffs to work with WED 1.3. Thanks Ted!

    By the way, BEN, are there any plans to accept users model donations to be used with the “Lego brick idea”? I know there is a lot of models to be used, but mainly hangars and terminal are just a few, it is still hard to find good matches for small airfields, either the small hangar is to small and the medium is too big. lol
    Keep the good work guys. Regards, Bob.

    1. Hi,

      First, you don’t have to use geo-tiffs, you can hand position other formats – you’ll still get automatic conversion to DDS, LOAD_CENTER directives and .pol generation. It’s just more time consuming.

      Second, no plans to accept user contributions into the default library – that’s out of the scope of this particular project, but not a bad thing for a third party to organize.

      1. Thanks for the explanation Ben.

        I said Geootiffs but actually i mean images in general (every other format), i haven`t found any for my country (Brazil), at least not Good/Free to use images. That`s why im using only some for personal use at the time. Still its very time consuming, i believe it will be much easier in the new WED`s release if i got it right.

        I`ll see about a free to use models collection, guess a lot of guys will come up with nice models. And that`s beside the already existing model libraries like Open Scenery X, RuScenery, etc…
        Was just a thinking in a way to increase the number of objects of the default library. Im having some nice results using OpenSceneryX with OSM2XP for now.

        Well, just saw the Wed Contest on the Org today, time to remove my ortophotos and contribute with some airports 😀

  4. Any chance of supporting .JP2 format in addition to GeoTIFF?

    Many providers are shifting to JPEG-2000 with the GeoCoords embedded in them (as the files are much smaller now than TIFF) as their preferred method of distribution. The USGS (which is the source of much of our imagery, and is free) has also moved many iamge sets to JP2.

    There are command line utilities (geojasper) which can convert .JP2 to. TIFF, but would hope that we could skip that step if WED can directly read the Geospatial data directly.

    1. Maybe some day – please file a wed bug at //dev.x-plane.com/bugbase/ (or better yet, contribute a patch :-).

      It’s not my highest priority – no one has ever asked for it before, and I have never come across a .jp2 file in my data searches. We use GeoTIFF almost exclusively for the internal global scenery work.

Comments are closed.