Jump to: navigation, search

TerraGear GUI

6,468 bytes removed, 19:00, 11 March 2011
Update, rewriting for the upcoming GUI release.
| title = TerraGear GUI
| image = TerraGearGUI.jpg
| developedby = Alex Park, Gijs de Rooy(original by Alex Park)| initialrelease = March 24, 2009(original)| writtenin = C++ (Qt)
| os = Windows
| website =
Since March 2009 a The '''GUI''' tool for '''[[TerraGear]]''' is available at [ the forum], available on Windows. This tool makes the use of commandlines redundant, through which it's easy allows people to use for everyone not familiar with commandlines. = Manual =Create a <tt>TerraGearWork/</tt> folder somewhere on your computer and create the following three folders inside that one:* '''Data/''': used to collect the raw unprocessed data we need to feed the tools.* '''Output/''': used at the very end and is where your newly processed [[scenery is finally stored.* '''Work/''': we will keep the files and folders here we will be generating with the TerraGear Tools. == Obtaining data ====== Elevation data ====The best elevation data currently available is from the Shuttle Radar Topography Mission (SRTM). There are two types of SRTM data:* '''SRTM-1''': Highly accurate 1-arcsecond resolution data, for the USA.* '''SRTM-3''': Less accurate 3-arcsecond data, for the rest of the world.From now on, we will assume that you are using SRTM-3 data. Unless otherwise noted, the process for SRTM-1 is identical.  Create a new folder in your <tt>TerraGearWork/Data/</tt> folder called <tt>SRTM-30/</tt>. Now download appropriate data from You want ALL files covering the area you want to create. Depending on the size of your scenery, there may be quite a few. The reason why the directories are called SRTM-30 is because genapts (a tool we will meet further on) will look for a few known, hard-coded directories in its working directory. SRTM-30 is one of them and this is the least confusing in that list. Unzip all of the files using your favorite software. === Land use data ===The final piece of data we need to download is the land-use data. In general, this is taken from the VMAP0 dataset, but other sources can be used as well. The landuse data can be split into a number of different types: * '''Landmass''': separates the land from the sea. It is used as a mask for all other data. The most common used is the VMAP0 Landmass, but GSHHS can be used as well. * '''Land use data''': defines whether a piece of land is forest, urban, sand, lava, glacier etc. These are usually VMAP0 data, defined as polygons.* '''Line data''': includes railroads, streams, roads. Typically VMAP0, but also [ Open Street Map]] for roads.* '''Point data''': currently only used for defining towns.By far the easiest way to get this data is to download shapefiles from the [ [FlightGear Mapserver]. This webpage provides access to a database, and allows you to download the specific shapefiles for your scenery area. Click on the Download Shapefiles link, enter in the bounding box of the scenery you want to generate, select the shapefiles you want, and click download. For your first scenery generation, you want all of the ones listed under VMap0 (with prefix v0_). Download each of them into a seperate Data/Shapefiles directory. The v0_landmass shapefiles goes into a <tt>Data/Shapefiles/v0_landmass/</tt> directory for example and v0_urban should be downloaded into <tt>Data/Shapefiles/v0_urban/</tt>. You can load these shapefiles into a GIS editor such as QGIS or GRASS to view and edit. This is a good idea to verify you have the correct files! There is [ a tutorial available] written by John Holden which shows you how to create your own shapefiles. Later on, you can experiment with replacing various shapefiles with other versions (GSHHS for coastline, OSM for roads etc.)without using commandlines.
== Using the GUI ==
Now we can finally launch the <tt>TerraGear Toolset The GUI.exe</tt>. If you click on the Tools button the list exist of available tools will be shownseveral tabs. The first tool will be needed firstFor normal scenery creation, then all the seconds and so on. This manual follows tabs should be gone through in the same stepsorder they are arranged.
=== HGTchop Start ===The HGTchop tool uses # Set the files you have downloaded earlier on and converts it into a form that FlightGear can read. First we need to create yet another folderTerraGear directory, this time itin which you's <tt>Work/SRTMll find ogr-30/</tt>decode, fgfs-construct etc. The processed data will TerraGear must be output to downloaded/build seperatly from the GUI!# Set the project's directory. In this folderdirectory, if you set all project related stuff will be stored throughout the correct Output pathprocess. You best choose an empty directory specific to your project.
Select === HGT chop ===This will convert the first file and click the Start button. A command box will open and files you will see the tool working away. It will produce numerous .arr.gz files which is quite rough data have downloaded earlier on and requires more refinement with Terrafit (see below). At the moment you need to repeat this step for every file in your <tt>Data/SRTM-30/</tt> folderconverts them into a form that TerraGear can read.
Once completed we === Genapts ===What is scenery without airport in a flight simulator? If your tile does not contain any airports, you can move onto the next toolskip this part and continue with [[#ogr-decode|ogr-decode]].
=== Terrafit ===The Terrafit tool is used to process First create the <tt>data/Airports/</tt> directory.arrThen locate FlightGears <tt>apt.dat.gz files that you </tt> file, which is usually in <tt>[[$FG ROOT]]/Airports/</tt> in the just created into a more refined datadirectory. The data collected so far would show flat land and requires more work, so lets use Terrafit to enhance our dataUnpack the file before you continue.
The three boxes Min Points, Max Points and Max Error can be left blank, unless you are an advanced user. The tool currently uses Use the default setting for these figures which are sufficient for use in FlightGear. Now simply use the browse button to point browse to the tool (unpacked) .dat file. If you only want to create the <tt>Work/SRTM-30/</tt> folder where scenery for a specific airport you can enter the ICAO name into the relevant field.aar.gz files are stored. Press If you do not enter any information in any of the boxes, the Start button and Terrafit tool will converte all our data to run through the correct elevation data requiredentire apt.dat file, leaving .fit files in the <tt>Work/SRTM-30/</tt> folderwhich can take a long time.
=== Genapt OGR Decode ===What is scenery without airport in a flight simulator? If Now we need to decode the shapefiles into TerraGear format, which we do with OGR Decode. After clicking the "Retrieve shapefiles" button, the left list will be populated with the shapefiles from your tile does not contain any airportsproject's data directory. On the right list you'll add the materials, per shapefile. Each single shapefile on the left, should have a material assigned on the right. By dragging materials up&down, you can skip this part of finetune the manual on continue with [[#ogr-decode|ogr-decode]]material assignments.
First create '''Warning: *_landmass MUST be mapped onto the <tt>Data/Airports/</tt> directory. Then locate FlightGears <tt>apt.dat.gz</tt> file, which is usually in <tt>[[$FG ROOT]]/Airports/</tt>.Copy this file to your newly created <tt>Airports/</tt> folder. Unzip the file before you continuematerial Default.'''
Use the upper browse button to locate your, just unzipped, apt.dat file. In the second box, use the browse button to locate your <tt>Work/</tt> folder. If you only want to create the scenery for a specific airport you You can enter delete shapefiles and materials from the ICAO name into the relevant field. If you want to create a larger piece of scenery you can also enter min/max lat and lon colists by double-ordinates. If you do not enter any information in any of the boxes, the tool will run through the entire apt.dat file, which can take a long timeclicking on them.
Click the Start button. Genapts will create two sub=== FGFS Construct ===The fgfs-directories in construct tool brings all your <tt>Work/</tt> directorygathered data together, namely AirportArea throws it in a washing machine and AirportObjspits it out the otherside in format ready for use with FlightGear. These define Click the definitions of "Update list" button to populate the airport layout and any objects present (efield with all decodes shapefiles.g. windsocks and beacons). Right, that’s In the airports sorted outlist you select all types that you'd like to include in your scenery.
=== ogr-decode ===Now we need to decode Then set the shapefiles into TerraGear format. This is done with center of the ogrto-decode tool. There are several important commandbe-line arguments to OGR decode:* Filename of created scenery area; and the shapefile (without the .shp extension for shape decode) you want to decode.* Directory you want to write the data to.* Material type to use. Each of the shapefiles maps onto one of the material types defined radius, all in your <tt>[[$FG ROOT]]/materials.xml</tt> files. The mapping is pretty obvious, e.g. v0_roads maps to Roads etcdegrees.
'''Warning: v0_landmass MUST be mapped onto After clicking the type Default"Generate scenery" button, it may take a long time for TerraGear to finish. Depending on the size of the area you are creating the scenery for and the level of detail in your shapefiles. Simple and small sceneries will take a couple of minutes, where larger, more detailed areas can take over an hour! So trying new things on small areas first will save you a lot of time.'''
So this is what we need to begin. A shapefiles directory The folders and files in your project's <tt>Dataoutput/</tt> folderdirectory are ready to use as scenery. Then for each You can set the scenery path of the different shapefiles you are going FlightGear to create a folder with that name in the <tt>Work/</tt> this directory. see to check if the image below for examplescenery is generated correctly.
=== fgfs-construct ===The fgfs-construct tool brings all your gathered data together, throws it in a washing machine and spits it out the otherside in format ready for use with FlightGear. Using the Browse button, select the <tt>Work/</tt> directory. Then select the <tt>Output/</tt> directory we created at the start of the manual. The next two fields are for the centre of the area you have chosen. The next two fields are the outward distance from the centre in degrees. If you click on the Get Folders button it will populate the empty field with all the folders in your <tt>Work/</tt> directory. Highlite them all, holding Shift and clicking the first and last items in the list.  Press Create Scenery to fianlly generate your scenery. This may take a long time depending on the size of the area you are creating the scenery for and the level of detail in your shapefiles. Simple and small sceneries will take a couple of minutes, where larger, more detailed areas can take over an hour! So trying new things on small areas first will save you a lot of time. The folders and files in the <tt>Output/</tt> directory are ready to use scenery. You can set the scenery path of FlightGear to this directory to check if the scenery is generated correctly. = GUI development ==
The GUI is currently undergoing a complete rebuild and re-written in [ Qt]. This will allow us to build the GUI on multiple OSes (Mac OS X, UNIX, Windows).
=== Requested features ===
* <strike>--tile-id option in fgfs-construct, to easily generate just one tile which can be used for fast scenery in-cooperation.</strike>
* <strike>A larger list or maybey a dropdown menu with the ogr-decode tool to select shapefiles and material mappings. Right now it's very hard and takes a long time to search through the list for the correct shapefiles/materials.</strike>
* <strike>Materials (in fgfs-construct) in alphabetical order.</strike>
* <strike>Ability to select multiple (non linear) folders using the Ctrl key (so not selecting everything between click and click, but just the folders I click).</strike>
* Resizable dialogs.
* A topmenu showing all the tools, so there's no need to return to the mainmenu every time you continue to the next step.
* Creating automatically all needed folders for shapefiles and the decoded ones. This includeds automated decoding all shapefiles in a directory.
* Maybe error reports possible? So you get a message when a certain file isn't found, or a certain path isn't set. Right now it only appears in the console, but it's hard to read the fast scrolling text.
=== Bug reports ===
* Decoding with points width gives no output.
* <strike>Just using airport ICAO in genapts gives no output.</strike>
[[Category:Scenery enhancement]]

Navigation menu