Using TerraGear: Difference between revisions

Jump to navigation Jump to search
m
small enhancements
m (→‎Landuse data: update)
m (small enhancements)
Line 1: Line 1:
{{WIP}}
[[Image:Terragearprocesschart.png|thumb|TerraGear Process Flow Chart]]
[[Image:Terragearprocesschart.png|thumb|TerraGear Process Flow Chart]]
The [[TerraGear]] software project supports [[FlightGear]] by creating the files used by FlightGear to represent the elevation and texture of the earth, including airports, cities, fields, forests, rivers, roads and so on. The TerraGear software reads data files containing ground elevation, airport locations and layouts, geographical land-cover data, and more, and produces the scenery files used by FlightGear to represent the terrain of the world.


The [[TerraGear]] software project supports [[FlightGear]] by creating the files used by FlightGear to represent the elevation and texture of the Earth, including airports, cities, fields, forests, rivers, roads and so on.  The TerraGear software reads data files containing ground elevation, airport locations and layouts, geographical land-cover data, and more, and produces the scenery files used by FlightGear to represent the terrain of the world.
For simplicity and convenience, most FlightGear users simply download the plug-and-play scenery files from the FlightGear scenery server, or use [[TerraSync]] to automatically download scenery as needed. But there is a variety of reasons you might want to use TerraGear to produce your own terrain files, rather than downloading the standard FlightGear scenery.  
 
For simplicity and convenience, most FlightGear users simply download the plug-and-play scenery files from the FlightGear scenery server, or use [[TerraSync]] to automatically download scenery as needed. But there are a variety of reasons you might want to use TerraGear to produce your own terrain files, rather than downloading the standard FlightGear scenery.  


For instance, if you use [[TaxiDraw]] to modify/improve information about an [[:Category:Airports|airport]]'s taxiway/apron layout, you might wish to see how that modified airport would look in the scenery before deciding you're happy with the results. Maybe the official scenery is too detailed for your slow machine, and you'd like to build terrain using a digital elevation model (DEM) with poorer resolution, to decrease the number of polygons and thus improve your framerates. Or maybe you've got a fantastically fast machine, and you want to build your own terrain using higher-resultion vector data (vmap1, Tiger, osm) to get better roads/streams. For all these reasons, learning how to use TerraGear is a good idea.
For instance, if you use [[TaxiDraw]] to modify/improve information about an [[:Category:Airports|airport]]'s taxiway/apron layout, you might wish to see how that modified airport would look in the scenery before deciding you're happy with the results. Maybe the official scenery is too detailed for your slow machine, and you'd like to build terrain using a digital elevation model (DEM) with poorer resolution, to decrease the number of polygons and thus improve your framerates. Or maybe you've got a fantastically fast machine, and you want to build your own terrain using higher-resultion vector data (vmap1, Tiger, osm) to get better roads/streams. For all these reasons, learning how to use TerraGear is a good idea.
Line 11: Line 9:
You can either build TerraGear yourself, or download a pre-compiled binary. The later is the easiest and advised for starters.
You can either build TerraGear yourself, or download a pre-compiled binary. The later is the easiest and advised for starters.


* '''Option 1 - Download TerraGear Pre-Compiled (recommended for beginners)'''
* '''Option 1 - Download TerraGear pre-compiled (recommended for beginners) on Windows'''
*# Download the latest TerraGear-cs-Win32-....zip file from ftp://ftp.ihg.uni-duisburg.de/FlightGear/Win32/.  
*# Download the latest TerraGear-cs-Win..-....zip file (check what bits version you run!) from ftp://ftp.ihg.uni-duisburg.de/FlightGear/Win32/.  
*# Create or choose a directory to hold the TerraGear tools.  
*# Create or choose a directory to hold the TerraGear tools.  
*# Unzip the package into a sub-directory named <tt>Terragear/</tt> in the base directory.
*# Unzip the package into a sub-directory named <tt>Terragear/</tt> in the base directory.


* '''Option 2 - Compile TerraGear from Source Code''' is explained in [[Building TerraGear|this article]].
* '''Option 2 - Compile TerraGear from source code''' as explained in [[Building TerraGear|this article]].


==Using TerraGear==
==Using TerraGear==
Line 30: Line 28:


===Obtaining and processing data===
===Obtaining and processing data===
Terragear uses three different kinds of information to generate scenery.
Terragear uses three different kinds of information to generate scenery:


# The elevation of the land (provided by SRTM)  
# The elevation of the land (provided by SRTM)  
# The location and layout of airports (provided by apt.dat)  
# The location and layout of airports (provided by apt.dat or a custom .dat)  
# Whether a given lat/lon is sea, land, city, forest, town, road, railway (provided by VMAP0)  
# Whether a given lat/lon is sea, land, city, forest, town, road, railway (provided by VMAP0, CORINE etc. or custom shapefiles)  


This article describes how obtain and process each of these types of data in order, and bring it together for use by FlightGear. The order of these steps is important. For example, the airport data step needs the elevation data to determine the elevation of the airports.
This article describes how obtain and process each of these types of data in order, and bring it together for use by FlightGear. The order of these steps is important. For example, the airport data step needs the elevation data to determine the elevation of the airports and thus you should start with preparing elevation data.


'''<u>Please note:</u> for inclusion in the official FlightGear scenery, all data <u>must</u> come from [[GNU GPL]] compatible sources!'''
'''<u>Please note:</u> for inclusion in the official FlightGear scenery, all data <u>must</u> come from [[GNU GPL]] compatible sources!'''
Line 46: Line 44:
From now on, we'll assume you are using SRTM-3 data. Unless otherwise noted, the process for SRTM-1 is identical.
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 the appropriate data from http://dds.cr.usgs.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. Download them to <tt>data/SRTM-30/</tt> in your base directory. (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.)
You can download the appropriate data from http://dds.cr.usgs.gov/srtm/version2_1/. You want all .hgt.zip files covering your region of interest. Depending on the size of your scenery, there may be quite a few. Download them to <tt>data/SRTM-30/</tt> in your base directory. (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.)


Now we've got the data, we need to convert it into something of use to TerraGear. First, you need to unzip each of the .hgt files. After that, open the commandline (<tt>Run > cmd.exe</tt>) and change into the base directory (<tt>cd .../.../TerraGear</tt>).  
Now we've got the data, we need to convert it into something of use to TerraGear. First, you need to unzip each of the .hgt files. After that, open the commandline (Windows: <tt>Start > Run > cmd.exe</tt>) and change into the base directory (<tt>cd .../.../TerraGear</tt>).  
* '''NOTE:''' If you want to create a batch-file, replace <tt>%f</tt> with <tt>%%f</tt>, see [http://technet.microsoft.com/en-us/library/bb490909.aspx]
* '''NOTE:''' If you want to create a batch-file, replace <tt>%f</tt> with <tt>%%f</tt>, see [http://technet.microsoft.com/en-us/library/bb490909.aspx]
* '''NOTE:''' For SRTM-1 data, replace the <tt>3</tt> by a <tt>1</tt> in the first argument to hgtchop
* '''NOTE:''' For SRTM-1 data, replace the <tt>3</tt> by a <tt>1</tt> in the first argument to hgtchop

Navigation menu