TerraGear Documentation: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
Line 13: Line 13:
When TerraGear tools need to query elevation data, they do so expecting the data to be located in a standard SimGear folder structure as follows:
When TerraGear tools need to query elevation data, they do so expecting the data to be located in a standard SimGear folder structure as follows:


10 deg x 10 deg folder
{| class="wikitable"
:1 degree by 1 degree folder
|-
::bucket number.xxx
! Format !! Example
|-
|''10 deg x 10 deg folder''|| ''w070n10''
|-
|— ''1 degree by 1 degree subfolder  ''||— ''w065n17''
|-
|—— ''bucket file  ''||—— ''1891048.arr.gz  ''
|}


hgtchop will create this directory structure in the work folder, and create sgbucket.arr.gz files within.
hgtchop will create this directory structure in the work folder, and create sgbucket.arr.gz files within.


==== resolution ====
==== resolution ====

Revision as of 15:41, 7 June 2012

There has been a lot of questions relating to scenery generation tools. This page is an attempt to document each of the tools I use. I will also document the design, and what each tool is actually doing.

My hope is to attract more developers to work on the tools to make it easier to create better scenery for FlightGear.

Toolchain

hgtchop

hgtchop is responsible for cropping height data files into SimGear buckets (or tiles). Most height data is published in fairly large data files that cover 1 square degree. For SRTM-1 data, there are 3601 x 3601 data points per file. For SRTM-3 data, there are 1201 x 1201 data points per file. SRTM datafiles are named by their southwestern most point.

command options

hgtchop <resolution> <hgt_file> <work_dir>

description

When TerraGear tools need to query elevation data, they do so expecting the data to be located in a standard SimGear folder structure as follows:

Format Example
10 deg x 10 deg folder w070n10
1 degree by 1 degree subfolder w065n17
—— bucket file —— 1891048.arr.gz

hgtchop will create this directory structure in the work folder, and create sgbucket.arr.gz files within.

resolution

Each file created contains ALL of the data points for the simgear tile. For SRTM-1 data, the resultant grid (for tiles near the equator) is 450 x 450 points. For SRTM-3 data, the grid is 150 x 150 points. The resolution parameter tells hgtcop the distance between sampled points. Note that tile width varies with latitude. So 'square' tiles really only exist between 22 degrees N - 22 degrees S. The tile widths are explained here: Tile Index Scheme

hgt_file

The source file. Usually, the source files are 1 degree by 1 degree, and has enough data to create 64 simgear buckets (near the equator).

work_dir

This is where hgt-chop will generated the elevation directory tree described above.

hgtfit

ogr-decode

genapts / genapts850

design

Step 1 : Parse
Step 2 : Clip
Step 3 : Clean
Step 4 : Elevation
Step 5 : Output

fgfs-construct

Related content