TerraGear Documentation: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Line 7: Line 7:
   for file in *; do echo "" && echo "###################################" && echo $file && echo "###################################" && ./$file --help; done
   for file in *; do echo "" && echo "###################################" && echo $file && echo "###################################" && ./$file --help; done


=== hgtchop ===
=== gdalchop ===
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.
 
gdalchop is a too 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.


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:
Line 23: Line 26:
|}
|}


hgtchop will create this directory structure in the work folder, and create sgbucket.arr.gz files within.
gdalchop will create this directory structure in the work folder, and create sgbucket.arr.gz files within.
 
==== command options ====
gdalchop <height data dir> <work dir>
 
'''height data dir'''<br />
This is the directory your height data resides in.  (i.e. .hgt files for SRTM)
 
'''work_dir'''<br />
This is where gdalchop will generate the elevation directory structure described above.
 
==== notes ====
# remember to use gdalchop on directories, rather than individual files.  It handles height data stitching for you.  Using individual files will produce data with missing elevation data where stitching could not be performed.
 
<br />
 
=== hgtchop (deprecated) ===
hgtchop is also a too responsible for cropping height data files into SimGear buckets (or tiles).  This tool only work with data in the .hgt format (SRTM, viewfinder). 
 
Reasons for using gdalchop:
* handles heightdata in many more formats
* is based on gdal, an actively maintained open source GIS library


==== command options ====
==== command options ====
Line 69: Line 93:


=== ogr-decode ===
=== ogr-decode ===
ogrdecode is responsible for decoding landclass and line vector data into terragears internal textured polygon format.  It also performs the 'chop' operation, so the output is structured in the same directory format as described in gdalchop.  ogr-decode is capable of decoding shapefiles stored on disk, or retrieving the data from a PosGIS database.
==== command options ====
ogr-decode [options...] <work dir> <datasource> [<layername>...]
{| class="wikitable"
|-
! Option !! Default !! Description
|-
| --line-width||50||for line data, this is the width in meters the generated polygons will be.
|-
| --line-width-column||''none''||for line data, this optional field can be used to retrieve the width from the database row, under the given column.  If data is present in the row, it overrides the line-width parameter.
|-
| --point-width||500||for point data, this is the 'width' of the square generated.  Both width and height will be this large.
|-
| --point-width-column||''none''||for point data, this optional field can be used to retrieve the width from the database row, under the given column.  If data is present in the row, it overrides the point-width parameter.
|-
| --area-type||Default||This string is used to define the type of landclass the generated polygons will be saved under.  In tgconstruct, the landclass priorities file is used to determine the priority of each landclass.  higher priorities are 'on top' of lower.  The name given here must match a landclass type in your priorities configuration file.
|-
|}


=== genapts / genapts850 ===
=== genapts / genapts850 ===
129

edits

Navigation menu