no edit summary
| initialrelease = March 24, 2009
Since March 2009 a GUI
Tool for [[TerraGear]] is available at [http://www.flightgear.org/forums/viewtopic.php?p=30238#p30238 the forum]. This tool makes the use of commandlines redundant, through which it's easy to use for everyone not known with commandlines.
Create a <tt>TerraGearWork/</tt> folder and
inside that folder create three more named:* '''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.
*'''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’ll assume you are using SRTM-3 data. Unless otherwise noted, the process for SRTM-1 is identical . You can get download appropriate data at ftp://e0srp01u.ecs.nasa.gov/srtm. You want all .hgt.zip files covering your region of interest. Depending on the size of your scenery, there may be quite a few. Make sure you download ALL the ones which cover your area of interest. Create a new folder in your <tt>TerraGearWork/Data/</tt> folder called <tt>SRTM-30/</tt>. Download the .hgt.zip files there. The reason why the directories are called SRTM-30 is because genapts 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.
Unzip all of the .hgt.zip files.
===Land use data===
The final piece of data we need to
generate is the land-use data. In general, this is taken from the VMAP0 dataset as shapefiles from the scenery database mapserver, but other sources can be used. 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 [http://www.openstreetmap.org 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 [http://mapserver.flightgear.org FlightGear Mapserver]. This provides access to a database
of information, 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 Fantastic Tutorial by John Holden which shows you how to create your own shapefiles here.http://stattosoftware.com/flightgear/tutorial/index.html Later on, you can experiment with replacing various shapefiles with other versions (GSHHS for coastline, OSM for roads etc.).
==Using the GUI==
The HGTchop tool uses the .hgt.zip files you have and converts it into a form that FlightGear can read.
We need to first create another folder, this time under the <tt>Work/ </tt> directory call <tt>SRTM-30/</tt>. This is where the processed data will be output to.
A command box will open and you will see the tool working away. It will produce numerous .arr.gz files which is quite rough data and requires more refinement with Terrafit.
The Terrafit tool is used to process the .arr.gz files into a more refined data. The data collected so far would show flat land and requires more work, so lets use Terrafit to enhance our data.
The three boxes Min Points, Max Points 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.
with this tool simply use the browse button to point the tool at the <tt>Work/SRTM-30/</tt> folder where the .aar.gz files are stored. Terrafit will extract .fit files which has converted all our data to the correct elevation data required.
a folder in <tt>Data/ </tt> called <tt>Airports/</tt>. Locate FlightGears apt.dat file which is usually in <tt>[[$FG_ROOT]]/Airports/</tt>.Copy this file to your newly created Airport folder (you will need to unzip it) Once you have completed this we can use the Genapts Tool.
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.