<elevation> Element
osgEarth uses <elevation> sources to read elevation data.
osgEarth supports any number of <elevation> elements. It will stack these, bottom to top, in their order of appearance in the .earth file, and query the entire stack as a single composite elevation grid for the entire map.
Note: For best performance, you should try to control the size of the terrain tiles. Most drivers default to a tile size of 256 per tile, which is fine for imagery, but quite large for terrain tiles. A smaller tile size (such as 32) will increase performance.
More information on tile sources can be found here.
Attributes
| name | Readable name of the elevation source. Must be unique within the <map>. Also must be legal for use in a pathname, since this name is used by some caching mechanisms. | required |
| driver | Defines which driver to use for fetching tiles. | required |
| min_level | Specifies the minimum level that the layer will generate data | optional |
| max_level | Specifies the maximum level that the layer will generate data | optional |
| loading_weight | Weighting of this layer for load-balanced tile fetching (see loading_policy) | optional |
| blacklist_filename | Specifies a filename to store the tile blacklist. If tiles from this source are not available, they will be placed in a blacklist and not requested again to avoid repeat requests for bad tiles. If no filename is specified, the blacklist will only be valid until the application is closed and not persisted between runs. | optional |
Sub-elements
Some sub-elements of an <elevation> are defined by the driver you specify. The following are universal:
| <profile> | Specifies/Overrides? the Profile for this source. Useful for when the TileSource? itself cannot determine the profile based on metadata. |
| <nodata_value> | A specific value that is used as a marker for "no data" areas in the elevation. Elevation postings that have this value will default to elevation 0 and will not take part in composition of elevation sources. |
| <nodata_min> | The minimum value that should be considered valid elevation. Elevation postings that have elevations less than this value will default to elevation 0 and will not take part in composition of elevation sources. |
| <nodata_max> | The maximum value that should be considered valid elevation. Elevation postings that have elevations greater than this value will default to elevation 0 and will not take part in composition of elevation sources. |
| <cache_enabled> | Whether caching should be enabled for this layer. true by default. |
| <cache_format> | Overrides the format that this layer is cached in. By default, the layer will attempt to use the format of the underlying datasource. |
Example
<map version="2">
...
<elevation name="srtm" driver="wms">
<url>http://localhost/cgi-bin/mapserv.exe?map=srtm30_plus.map</url>
<layers>srtm30plus</layers>
<format>tiff</format>
<tile_size>32</tile_size>
</elevation>
...
</map>
