Jump to: navigation, search

TerraGear GUI

1,278 bytes added, 05:36, 23 June 2015
For GNU/Linux users: Add HelpLines for common Errors
{{Infobox Software
| title = TerraGear GUI| image = TerraGearGUITerraGear GUI download San Francisco.png| alt = The download page with the San Francisco bay area selected.jpg| developedby = Gijs de Rooy (original by Alex Park)| initialrelease = March 24, 2009(original)<br>March 27, 2010| latestrelease = 0.9.x (2012)| writtenin = C++ (Qt)| os = Windows, Linux, Mac OS X| website =
Since March 2009 a The '''GUI''' tool for '''[[TerraGear]]''' is available at allows people to create [ the forum[scenery]]. This tool makes the use of commandlines redundant, through which it's easy to use for everyone not known with [[FlightGear]] without using commandlines.
=Manual= Obtaining the GUI ==Create You can either build the GUI [ from source], or download a <tt>TerraGearWorkpre-compiled build:* [http:/</tt> folder somewhere on your computer and create the following three folders inside Windows builds]Please note that one:* '''Datayou need to download/compile a recent version of [[TerraGear]] as well;* for Windows users, you''': used to collect the raw unprocessed data we ll need to feed the toolsadd three DLLs to you TerraGear GUI root directory:** msvcp71.dll (see [[TerraGear_Installation_for_Windows]] to know how to get it)* '''Output/''': used at the very end and is where your newly processed scenery is finally stored* mscvr71.dll (see [[TerraGear_Installation_for_Windows]] to know how to get it)* '''Work/''': we will keep the files and folders here we will * gdal12.dll (this can be generating with the TerraGear Toolsretrieved from )
==Obtaining data======Elevation dataFor GNU/Linux users ====The best elevation data currently available is from # Grab the Shuttle Radar Topography Mission (SRTM)sources and store it where you want:<br/><pre>git clone git://git. There are two types of SRTM</pre># Then go in the source:<br/><pre>cd terrageargui</pre>*'''SRTM-1'''# Create a build dir: Highly accurate 1<br/><pre>mkdir build && cd build</pre># Now build it:<br/><pre>qmake .. </pre> or<pre>qmake-arcsecond resolution data, for the USAqt4 ..</pre> then<pre>make</pre>:::<sub>In case of ERRORS You may have to add the following via SYNAPTIC:</sub>:::*'''SRTM<sub>for "/usr/lib/i386-3'''linux-gnu/qt4/bin/uic: Less accurate 3Command not found" add: libqt4-arcsecond data, dev-bin</sub>:::*<sub>for the rest of the world."QtGui/QApplication: No such file or directory" add: qt4-dev-tools</sub>From <br /># You can now on, we will assume that you are using SRTM-3 datastart it with:<br/><pre>". Unless otherwise noted, the process for SRTM-1 is identical/bin/TerraGUI" or ". /build/TerraGUI"</pre>
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, hardcoded directories in it’s working directory. SRTM-30 is one of them and this is the least confusing in that list.'re done!
Unzip all of == Using the GUI ==The GUI exist of several files using your favorite softwareFor normal scenery creation, all the tabs should be gone through in the order they are arranged.
===Land use dataStart ===The final piece of data we need to download is # Set the land-use data. In generalTerraGear directory, this is taken from in which you'll find the VMAP0 dataset, but other sources can be used as wellsubdirectories bin/ and share/. The landuse data can TerraGear must be split into a number of different types: *'''Landmass''': separates the land downloaded/build seperatly from the sea. It is used as a mask for all other data. The most common used is GUI!# Set the VMAP0 Landmass, but GSHHS can be used as well. *project'''Land use data''': defines whether a piece of land is forest, urban, sand, lava, glacier etcs directory. These are usually VMAP0 dataIn this directory, defined as polygonsall project related stuff will be stored throughout the process.*'''Line data''': includes railroads, streams, roads. Typically VMAP0, but also [ Open Street Map] for roadsYou best choose an empty directory specific to your project.*# Set your FlightGear'''Point data''': currently only used for defining towns.By far the easiest way to get this data is to download shapefiles from the s root ([ FlightGear Mapserver[$FG_ROOT]]). This webpage provides access is used to a database, and allows you to download retrieve the specific shapefiles for your scenery area. Click on the Download Shapefiles link, enter in the bounding box list 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>available terrain materials.
You can load these shapefiles into a GIS editor such as QGIS === Download ===Specify boundaries in the boxes on the left, or GRASS to view and edit. This is a good idea to verify you have select an area on the correct files! There is [ Next select a tutorial available] written by John Holden which shows you how source to create your own download shapefilesfor that area. Later onNote that OpenStreetMap only includes line date (roads, rivers), so you can experiment with replacing various shapefiles with other versions (GSHHS 'll need some polygon data for coastline, OSM for roads etcthe actual terrain.Both [[World Custom Scenery Project|Custom Scenery]] and [[CORINE]] (only Europe)provide that. The GUI downloads and unpacks the package to your <tt>{project's directory}/data/</tt>.
==Using the GUI==Now we Alternatively you can finally launch download shapefiles from [ the mapserver by hand]. Unpack the downloaded file(s) to your <tt>TerraGear Toolset GUI.exe{project's directory}/data/</tt>. If you click on the Tools button the list of available tools will be shown. The first tool will be needed first, then the seconds and so on. This manual follows the same steps.
===HGTchop= Elevation data ====The HGTchop tool uses Elevation files are optional, but of course required to generate scenery with elevation offsets (even flat countries like the Netherlands need elevation data, since no country is completely at files you have downloaded earlier on and converts it into Simply select a form data source and then click the button to download the HGT files that FlightGear can readspan your specified area. First we need to create yet another folderThe original source is, this time it's but a cleaned variant of the same data is available from (see [ the readme] for more information). The data will be saved in in <tt>Work{project's directory}/data/SRTM-30/3</tt>. The processed data will be output to this folder, if you set the correct Output path.
Select the first .hgt===== By hand =====[[File:HGT tiles png|thumb|An example of HGT file and click the Start buttontiles. A command box will open and you will see the tool working away. It will produce numerous .arr.gz files which ]]Downloading tiles by hand is quite rough data and requires more refinement with Terrafit (see below)somewhat tricky. At If your scenery has a boundary of:{| class="wikitable"!! Min! max|-! Latitude| 33| 37|-! Longitude| -2| 2|}The GUI would display the moment range as <tt>N33W002-N37E002</tt>. This means you need have to repeat this step for every download all tiles in that range, which are all the tiles as shown in the image on the right. Unpack the downloaded elevation file (s) in your <tt>Data{project's directory}/data/SRTM-30/3</tt> folder.
Once completed we If you don't know how to find the boundaries range you can move onto use Google Earth with this KMZ file : [ grid_1_degree.kmz]# Download KMZ file above# Open it with Google Earth and active it (if not yet active). A lot of red lines should appears# Zoom where you want know the next toolboundaries range# Click on the bottom left boundary wanted and report the displayed value in TerraGear GUI. (i.e: if Google Earth value is "W9_N42", report Minimum Latitude value "42" and Minimum Longitude value "-9")# Click on the top right boundary wanted and report the displayed value in TerraGear GUI. (i.e: if Google Earth value is "E6_N45", report Maximum Latitude value "45" and Maximum Longitude value "6")
===TerrafitElevation ===The Terrafit tool is used to process This will convert the .arrhgt.gz zip files (that you just created have downloaded earlier) into a more refined dataform that TerraGear can read. The Simply select the directory in which you placed the elevation downloads (probably <tt>{project's directory}/data collected so far would show flat land and requires more work/SRTM-3</tt>). Make sure you do set the correct resolution! For the USA this can be 1 arcsec, so lets use Terrafit to enhance our datawhile the rest of the world is provided in 3 arcsec resolution.
The three boxes Min Points=== Airports ===What is scenery without airports in a flight simulator? If your area does not contain any airports, Max Points you can skip this part and Max Error can be left blank, unless you are an advanced user. The tool currently uses the default setting for these figures which are sufficient for use in FlightGear. Now simply use the browse button to point the tool to the <tt>Work/SRTMcontinue with [[#ogr-30/</tt> folder where the .aar.gz files are stored. Press the Start button and Terrafit will converte all our data to the correct elevation data required, leaving .fit files in the <tt>Work/SRTMdecode|ogr-30/</tt> folderdecode]].
===Genapt===You can do two things now:What *'''Already-made airports:''' use FlightGear's <tt>apt.dat.gz</tt> file, which is scenery without airport usually in a flight simulator? If your tile does not contain any <tt>[[$FG ROOT]]/Airports/</tt>.*'''Home-made airports, :''' if you can skip this part of the manual on continue with created an airport in [[#ogr-decode|ogr-decodeWorldEditor]], use the .dat file that you exported.
First create Use the button to browse to 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 of your newly created <tt>Airports/</tt> folder. Unzip the file before you continuechoice.
Use * '''All airports in area''' generates all the upper browse button to locate your, just unzipped, apt.dat file. In airports within the second box, use boundaries as set on the browse button to locate your <tt>Work/</tt> folderstart tab. If you only want * '''Single airport''' to create generate the scenery for a specific airport you can enter . Enter the ICAO name code into the relevant field. If you want to create a larger piece of scenery you can also enter min/max lat and lon co-ordinates* '''Single tile''' only processes airports that are located on the given tileid. If you do not enter any information * '''All airports in any of the boxes, apt.dat''' the tool will run through the entire apt.dat file, which can take a long (!) timewhen using the default apt.dat from FlightGear.
Click === Materials ===Now we need to decode the Start buttonshapefiles into TerraGear format, which we do with OGR Decode. Genapts After clicking the "Retrieve shapefiles" button, the list will create two sub-directories in be populated with the shapefiles from your <tt>Work/</tt> project's data directory, namely AirportArea and AirportObj. These define the definitions of the airport layout and any objects present (e.gThe GUI will try to assign fitting materials. windsocks and beacons). RightIf a shapefile has no material, that’s the airports sorted outyou'll need to assign it by hand. Each single shapefile must have a material.
===ogr-decode===Now we need to decode the You can delete shapefiles into TerraGear format. This is done with from the ogrlist by double-decode toolclicking on them. There A single click on a material will allow you to edit it; to create custom materials that are several important command-line arguments to OGR decode:*Filename of the shapefile not (without the .shp extension for shape decodeyet) you want to decodein materials.*Directory you want to write xml (do note that FlightGear will apply the data default material to.*Material type to use. Each of the shapefiles maps onto one of those landclasses, untill you create the material types defined in your <tt>[[$FG_ROOT]]/materials.xml</tt> files. The mapping is pretty obvious, e.g. v0_roads maps to Roads etc!).
'''Warning: v0_landmass MUST be mapped onto Line width is only used on line-data (like roads, rivers and railroads). If you leave the type Defaultline width fields empty, a default width of 10 meters is used.'''
So this is what we need to begin. A shapefiles directory in your <tt>Data/</tt> folder. Then for each of the different shapefiles you are going to create a folder with that name in the <tt>Work/</tt> directory. see the image below for example.===== Example =====
{| class===fgfs-construct==="wikitable"The fgfs|-construct tool brings all your gathered data together, throws it ! Shapefile !! Material !! Line width (in a washing machine and spits it out the otherside in format ready for use with FlightGear.meters)|-| osm_canal || Canal || 12|-| osm_motorway || Road-Motorway || 12|-| osm_primary || Road-Primary || 10|-| osm_rail || Railroad || 5|-| osm_river || Canal || 8|-| osm_secondary || Road-Secondary || 8|-| osm_stream || Stream || 3|-| osm_tertiary || Road-Tertiary || 6|-| osm_trunk || Road-Trunk || 18|}
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=== Construct ===[[Image:TerraGearGUI. png|thumb|270px|The next two fields are for the centre of the area you have chosenconstruction page. The next two fields are the outward distance from the centre in degrees. If you click on the Get Folders button ]]'''Note: with recent TerraGear builds, it will populate is required to add the empty field with all used material-names to the folders in your <tt>Work/</tt> directorydefault_priorities. Highlite them all, holding Shift and clicking the first and last items in the listtxt file. '''
Press Create Scenery to fianlly generate The tg-construct tool brings all your scenery. This may take gathered data together, throws it in a long time depending on washing machine and spits it out the size of otherside in a format ready for use with FlightGear. Click the area you are creating "Update list" button to populate the scenery for and field with all decoded shapefiles. In the level of detail list you select all types that you'd like to include 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 timescenery.
After clicking the "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. === Running the scenery ===The folders and files in the your project's <tt>Outputoutput/</tt> directory are ready to use as scenery. You can set the [[$FG_SCENERY|scenery path ]] of FlightGear to this directory to check if the scenery is generated correctly. == GUI development ==The current source code can be retrieved [ from SourceForge]. Feel free to add feature requests and/or bug reports to this page. Anyone interested in helping is invited to contact Gijs at the forum. === Requested features ===Also see [[TerraGear scenery build server]] [[File:TerraGear-GUI-Remote-Mode.png|thumb|Prototyping a remote mode for [[TerraGear]] as part of [[TerraGear GUI]]]] * Multi-threading, so the GUI doesn't freeze when running a process []* Support a new "Setup" page where people can decide if TerraGear is installed locally or remotely {{Not done}} * Add a command handler abstraction so that commands can be easily run over SSH [] {{Not done}}* File retrieval would ideally be wrapped via SFTP {{Not done}} == External link ==* [ Forum topic]
[[Category:Scenery enhancement]]

Navigation menu