Using GDAL/OGR with TerraGear
TerraGear was in the past extended to be able to handle a number of input formats:
- elevation data: DEM, HGT
- vector data: ESRI shapefiles, E00, VPF (VMAP0 data format), GSHHS (Global Self-consistant Hierarchical High-resolution Shorelines)
In most cases such data has to be already in WGS84 geographic coordinates as required by TerraGear.
With the availability of the GDAL and OGR libraries as a general interface to a huge set of raster and vector file formats and the facilities provided for on-the-fly reprojection between different coordinate systems, access to a much larger number of data sources is provided by integrating these libraries with TerraGear.
For this the World Custom Scenery Project provides two additional tools, gdalchop and ogrdecode, which use GDAL resp. OGR to access raster resp. vector datasources and to convert them to the intermediate format required by TerraGear.
gdalchop reads raster files containing elevation data in any projection and resolution and outputs TerraGear .arr.gz files containing elevation data in a simple raster format for each tile covered by the input data.
ogrdecode reads vector files containing either point, line or polygon data and outputs polygon data, blowing up point and line data to a given thickness as specified by the user. The polygon data is split along tile borders as required by TerraGear.