Using TerraGear: Difference between revisions

Jump to navigation Jump to search
m
Update to new tool names
(Needs to be updated, still mentions the old genapts)
m (Update to new tool names)
Line 76: Line 76:
Now we've got elevation data, we can generate our airports. First, create a <tt>data/airports/</tt> directory and copy in your apt.dat file. This may be direct from your FlightGear data package (though you'll need to unzip it), or it may be one that you've modified with [[TaxiDraw]].  
Now we've got elevation data, we can generate our airports. First, create a <tt>data/airports/</tt> directory and copy in your apt.dat file. This may be direct from your FlightGear data package (though you'll need to unzip it), or it may be one that you've modified with [[TaxiDraw]].  


The command to create airports is "genapts". Run it without any arguments to see the various command-line options.  
The command to create airports is "genapts850". Run it without any arguments to see the various command-line options.  


If it is simply run with a specified apt.dat and work directory, it will generate airport layouts for every airport in the file, which can take a long time.  
If it is simply run with a specified apt.dat and work directory, it will generate airport layouts for every airport in the file, which can take a long time.  
Line 82: Line 82:
If you are just creating a single airport and you know the ICAO ID (e.g. [[KSFO]], EGPH, EG32), use is as follows from your root scenery directory (i.e. the directory above your data, work and output directories). If you use an apt.dat file with one single airport in it you should omit the "--airport" parameter.  
If you are just creating a single airport and you know the ICAO ID (e.g. [[KSFO]], EGPH, EG32), use is as follows from your root scenery directory (i.e. the directory above your data, work and output directories). If you use an apt.dat file with one single airport in it you should omit the "--airport" parameter.  


  genapts --input=data/airports/apt.dat --work=./work --airport=<AIRPORT_ID>
  genapts850 --input=data/airports/apt.dat --work=./work --airport=<AIRPORT_ID>


If you are generating a larger set of scenery, then you can specify the minimum and maximum longitude and latitude.  
If you are generating a larger set of scenery, then you can specify the minimum and maximum longitude and latitude.  
Line 95: Line 95:


The landuse data can be split into a number of different types:
The landuse data can be split into a number of different types:
* '''Landmass''' separates the land from the sea. It can be used as a mask for all other data. The most commonly used is the VMAP0 Landmass, but GSHHS can also be used. When running fgfs-construct with <code>--ignore-landmass</code>, all input shapefiles will be taken into consideration, so no landmass mask is required then.
* '''Landmass''' separates the land from the sea. It can be used as a mask for all other data. The most commonly used is the VMAP0 Landmass, but GSHHS can also be used. When running tg-construct with <code>--ignore-landmass</code>, all input shapefiles will be taken into consideration, so no landmass mask is required then.
* '''Land use data:''' defines whether a piece of land is forest, urban, sand, lava, glacier etc. These are usually VMAP0 data, defined as polygons.
* '''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.
* '''Line data:''' includes railroads, streams, roads. Typically VMAP0, but also Open Street Map for roads.
Line 159: Line 159:
|}
|}


Now we can actually generate the scenery. This is done by the fgfs-construct command. Run the command with <code>--help</code> to get usage information.  
Now we can actually generate the scenery. This is done by the tg-construct command. Run the command with <code>--help</code> to get usage information.  


We need to define:
We need to define:
Line 169: Line 169:


For example:
For example:
{{Pre2|<nowiki>fgfs-construct --work-dir=./work --output-dir=./output/Terrain --lon=55 --lat=60 --xdist=3 --ydist=3 AirportArea SRTM-3 AirportObj Stream Bog IrrCropPastureCover Town Lake Urban Landmass Railroad DryCropPastureCover Road EvergreenBroadCover Marsh Sand MixedCropPastureCover ScrubCover GrassCover MixedForestCover</nowiki> }}
{{Pre2|<nowiki>tg-construct --work-dir=./work --output-dir=./output/Terrain --lon=55 --lat=60 --xdist=3 --ydist=3 AirportArea SRTM-3 AirportObj Stream Bog IrrCropPastureCover Town Lake Urban Landmass Railroad DryCropPastureCover Road EvergreenBroadCover Marsh Sand MixedCropPastureCover ScrubCover GrassCover MixedForestCover</nowiki> }}


When this finishes, the output directory will contain a scenery sub-tree. Point to it by setting either [[$FG_SCENERY]] or by using the --fg-scenery command-line option to fgfs, and give your new scenery a try!
When this finishes, the output directory will contain a scenery sub-tree. Point to it by setting either [[$FG_SCENERY]] or by using the --fg-scenery command-line option to fgfs, and give your new scenery a try!
Line 177: Line 177:


* Crashes in genapts. Sometimes genapts will crash when dealing with a particular airport. In that case, try running it again with the --start-id argument to start at the airport it failed on, and the --nudge argument which tries to nudge the calculations in the right direction.  
* Crashes in genapts. Sometimes genapts will crash when dealing with a particular airport. In that case, try running it again with the --start-id argument to start at the airport it failed on, and the --nudge argument which tries to nudge the calculations in the right direction.  
* fgfs-construct Killed. The fgfs-construct process may kill itself if it is using too many system resources. Increasing the values for setrlimit in src/BuildTiles/Main/main.cxx is the best solution.  
* tg-construct Killed. The tg-construct process may kill itself if it is using too many system resources. Increasing the values for setrlimit in src/BuildTiles/Main/main.cxx is the best solution.  
* Airports appear in the bottom of holes, or there are spaces between the airports and the scenery. This typically happens when genapts is unable to find the correct elevation data, or the elevation data changed between running genapts and shape-decode. Try generating a single airport in your scenery area using genapts, and look at the output. In particular, make sure there is a work/SRTM-3 directory.  
* Airports appear in the bottom of holes, or there are spaces between the airports and the scenery. This typically happens when genapts is unable to find the correct elevation data, or the elevation data changed between running genapts and shape-decode. Try generating a single airport in your scenery area using genapts, and look at the output. In particular, make sure there is a work/SRTM-3 directory.  
* Only the airports appear in the scenery. There are three typical causes for this:  
* Only the airports appear in the scenery. There are three typical causes for this:  
** You didn't download the correct shapefiles for the area.  
** You didn't download the correct shapefiles for the area.  
** You haven't run shape-decode on the v0_landmass shapefile as Default  
** You haven't run shape-decode on the v0_landmass shapefile as Default  
** You didn't include the correct directories in fgfs-construct.  
** You didn't include the correct directories in tg-construct.  
* Generate scenery includes data removed from the shapefiles. If you are editing shapefiles, you need to delete the appropriate work subdirectory before running shape-decode. Otherwise your changes will be in addition to those already present.  
* Generate scenery includes data removed from the shapefiles. If you are editing shapefiles, you need to delete the appropriate work subdirectory before running shape-decode. Otherwise your changes will be in addition to those already present.  
* All the scenery is flat and at sea-level. Typically this is because you didn't include any elevation data in your fgfs-construct command. Make sure there's a STRM-3 directory included in the command-line.  
* All the scenery is flat and at sea-level. Typically this is because you didn't include any elevation data in your tg-construct command. Make sure there's a STRM-3 directory included in the command-line.  
* All terrain copies the material of a certain shapefile. You have probably forgotten to put each of the downloaded shapefiles in a seperate directory inside the Data/shapefiles directory.  
* All terrain copies the material of a certain shapefile. You have probably forgotten to put each of the downloaded shapefiles in a seperate directory inside the Data/shapefiles directory.  


Navigation menu