GoogleEarthEnterpriseTerrainData

new Cesium.GoogleEarthEnterpriseTerrainData(options)

Terrain data for a single tile from a Google Earth Enterprise server.
Name Type Description
options Object Object with the following properties:
Name Type Default Description
buffer ArrayBuffer The buffer containing terrain data.
negativeAltitudeExponentBias Number Multiplier for negative terrain heights that are encoded as very small positive values.
negativeElevationThreshold Number Threshold for negative values
childTileMask Number 15 optional A bit mask indicating which of this tile's four children exist. If a child's bit is set, geometry will be requested for that tile as well when it is needed. If the bit is cleared, the child tile is not requested and geometry is instead upsampled from the parent. The bit values are as follows:
Bit PositionBit ValueChild Tile
01Southwest
12Southeast
24Northeast
38Northwest
createdByUpsampling Boolean false optional True if this instance was created by upsampling another instance; otherwise, false.
credits Array.<Credit> optional Array of credits for this tile.
Example:
var buffer = ...
var childTileMask = ...
var terrainData = new Cesium.GoogleEarthEnterpriseTerrainData({
  buffer : heightBuffer,
  childTileMask : childTileMask
});
See:

Members

An array of credits for this tile

waterMask : Uint8Array|HTMLImageElement|HTMLCanvasElement

The water mask included in this terrain data, if any. A water mask is a rectangular Uint8Array or image where a value of 255 indicates water and a value of 0 indicates land. Values in between 0 and 255 are allowed as well to smoothly blend between land and water.

Methods

interpolateHeight(rectangle, longitude, latitude)Number

Computes the terrain height at a specified longitude and latitude.
Name Type Description
rectangle Rectangle The rectangle covered by this terrain data.
longitude Number The longitude in radians.
latitude Number The latitude in radians.
Returns:
The terrain height at the specified position. If the position is outside the rectangle, this method will extrapolate the height, which is likely to be wildly incorrect for positions far outside the rectangle.

isChildAvailable(thisX, thisY, childX, childY)Boolean

Determines if a given child tile is available, based on the HeightmapTerrainData.childTileMask. The given child tile coordinates are assumed to be one of the four children of this tile. If non-child tile coordinates are given, the availability of the southeast child tile is returned.
Name Type Description
thisX Number The tile X coordinate of this (the parent) tile.
thisY Number The tile Y coordinate of this (the parent) tile.
childX Number The tile X coordinate of the child tile to check for availability.
childY Number The tile Y coordinate of the child tile to check for availability.
Returns:
True if the child tile is available; otherwise, false.

upsample(tilingScheme, thisX, thisY, thisLevel, descendantX, descendantY, descendantLevel)Promise.<HeightmapTerrainData>|undefined

Upsamples this terrain data for use by a descendant tile. The resulting instance will contain a subset of the height samples in this instance, interpolated if necessary.
Name Type Description
tilingScheme TilingScheme The tiling scheme of this terrain data.
thisX Number The X coordinate of this tile in the tiling scheme.
thisY Number The Y coordinate of this tile in the tiling scheme.
thisLevel Number The level of this tile in the tiling scheme.
descendantX Number The X coordinate within the tiling scheme of the descendant tile for which we are upsampling.
descendantY Number The Y coordinate within the tiling scheme of the descendant tile for which we are upsampling.
descendantLevel Number The level within the tiling scheme of the descendant tile for which we are upsampling.
Returns:
A promise for upsampled heightmap terrain data for the descendant tile, or undefined if too many asynchronous upsample operations are in progress and the request has been deferred.

wasCreatedByUpsampling()Boolean

Gets a value indicating whether or not this terrain data was created by upsampling lower resolution terrain data. If this value is false, the data was obtained from some other source, such as by downloading it from a remote server. This method should return true for instances returned from a call to HeightmapTerrainData#upsample.
Returns:
True if this instance was created by upsampling; otherwise, false.