Hi fellow wiki editors!

To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).

I have tried to keep the template short, but meaningful. /Johan G

Changes

Jump to: navigation, search

TerraGear GUI

17 bytes removed, 05:36, 23 June 2015
m
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 = https://sourceforge.net/p/flightgear/fgscenery/terrageargui/ci/master/tree/
}}
Since March 2009 a The '''GUI''' tool for '''[[TerraGear]]''' is available at allows people to create [http://www.flightgear.org/forums/viewtopic.php?p=30238#p30238 the forum[scenery]], available on Windows. 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 [https://sourceforge.net/p/flightgear/fgscenery/terrageargui/ci/master/tree/ from source], or download a <tt>TerraGearWorkpre-compiled build:* [http:/</tt> folder somewhere on your computer and create the following three folders inside liveries.flightgear.org/terrageargui/ 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 ftp://ftp.ihg.uni-duisburg.de/FlightGear/Win32/terragear-cs-Win32-20101002.zip )
==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 datacode.sf.net/p/flightgear/fgscenery/terrageargui</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 ftp://e0srp01u.ecs.nasa.gov/srtm. You want ALL .hgt.zip 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 tabs.hgt.zip 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 [http://www.openstreetmap.org 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 ([http://mapserver.flightgear.org 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 [http://stattosoftwaremap.com/flightgear/tutorial/index.html 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 [http://mapserver.flightgear.org/download.psp 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 sealevel.hgt.zip 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 usgs.gov, this time it's but a cleaned variant of the same data is available from fgx.ch (see [http://downloads.fgx.ch/geodata/data/srtm/README.txt 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 example.zip 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 : [http://clemaez.fr/flightgear/grid_1_degree.kmz 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.
The folders and files in After clicking the <tt>Output/</tt> directory are ready to use "Generate scenery" button, it may take a long time for TerraGear to finish. You can set Depending on the scenery path size of FlightGear to this directory to check if the area you are creating the scenery is generated correctlyfor 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 your project's <tt>output/</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 GUI will undergo a large rebuildcurrent source code can be retrieved [https://sourceforge. net/p/flightgear/fgscenery/terrageargui/ci/master/tree/ from SourceForge]. Feel free to add feature requests and/or bug reportsto 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-tile-id option in fgfsRemote-construct, to easily generate just one tile which can be used for fast scenery in-cooperationMode.* A larger list or maybey png|thumb|Prototyping 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 remote mode for the correct shapefiles/materials.[[TerraGear]] as part of [[TerraGear GUI]]]]* Materials (in fgfs-construct) in alphabetical order.* Ability to select multiple (non linear) folders using the Ctrl key (Multi-threading, so not selecting everything between click and click, but just the folders I click)GUI doesn't freeze when running a process [http://forum.* Resizable dialogsflightgear.* A topmenu showing all the tools, so there's no need to return to the mainmenu every time you continue to the next steporg/viewtopic.php?f=5&t=25688&p=235873&hilit=#p235623]* Creating automatically all needed folders for shapefiles and the decoded onesSupport a new "Setup" page where people can decide if TerraGear is installed locally or remotely {{Not done}} * Maybe error reports possible? So you get Add a message when a certain file isn't found, or a certain command handler abstraction so that commands path isn't setcan be easily run over SSH [http://doc. Right now it only appears in the console, but it's hard to read the fast scrolling textqt.digia.com/qtcreator-extending/utils-sshconnection.html] {{Not done}}* File retrieval would ideally be wrapped via SFTP {{Not done}} ===Bug reports=External link ==* Decoding with points width gives no output[http://forum.* Just using airport ICAO in genapts gives no outputflightgear.org/viewtopic.php?f=5&t=7485 Forum topic]
[[Category:Scenery enhancement]]
[[Category:TerraGear]]
652
edits

Navigation menu