<image> Element
An Earth file can contain one or more image layer. Image layers will appear, bottom to top, in the order in which they appear in the .earth file.
osgEarth offers multiple techniques for compositing image layers together. Your graphics hardware, along with the compositor that osgEarth uses, will determine the maximum number of image layers you can display.
More information on tile sources and how they work can be found here.
Attributes
| name | Readable name of the image 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 |
| cacheid | Explicity sets a string to use to identify the cache directory or table. By default, the system will automatically generate this based on the configuration of the driver. But you can override it using this attribute. | optional |
| 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 |
| min_range | Minimum camera distance (meters) at which to start fading in the layer | optional |
| max_range | Maximum camera distance (meters) at which to start fading in the layer | optional |
| lod_blending | Whether to blend between adjacent levels of detail (default = false) | 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 <image> are defined by the driver you specify. The following are universal:
| <profile> | Specifies/Overrides the profile for this source. Usually, the driver will automatically determine the correct profile. If it cannot do so you can use this element to explicitly define it. |
| <nodata_image> | The URL of an image to treat as a "no data" marker. Some image services, when they run out of data, will serve up a "Sorry no data at this level" image. You can use this property to point to that image, so it doesn't get displayed or cached. |
| <transparent_color> | The color in the image to treat as a "no data" marker specified. Portions of the image matching this color will be rendered as transparant. Specified as an RGBA value with ranges 0-255 separated by spaces. For example, Red would be "255 0 0 0" |
| <cache_enabled> | Whether caching should be enabled for this layer. (default: true) |
| <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. For example, you could cache a PNG image source to JPEG by setting the cache_format to jpeg |
| <opacity> | The opacity of the layer (default: 1.0, i.e. completely opaque) |
| <enabled> | The enabled state of the layer. (default: true) |
| <tile_size> | The dimensions (width and height, in pixels) of the images to produce from this layer |
| <l2_cache_size> | Maximum number of tiles to store in the L2 cache to increase mosaicing performance. (default: 16) |
Example
<image name="blue marble" driver="tms">
<url>http://onearth.jpl.nasa.gov/wms.cgi</url>
<layers>global_mosaic</layers>
<format>jpeg</format>
<tile_size>512</tile_size>
</image>
