GoogleEarthEnterpriseTerrainData

new Cesium.GoogleEarthEnterpriseTerrainData(options)

来自 Google Earth Enterprise 服务器的单个图块的地形数据。
Name Type Description
options object 包含以下属性的对象:
Name Type Default Description
buffer ArrayBuffer 包含地形数据的缓冲区。
negativeAltitudeExponentBias number 用于编码为非常小正值的负地形高度的乘数。
negativeElevationThreshold number 负值的阈值。
childTileMask number 15 optional 指示此图块的四个子图块中哪些存在的位掩码。 如果设置了子图块的位,则将在需要时请求该图块的几何体。如果位被清除,则不请求子图块,几何体 而是从父图块上采样。位值如下:
位位置位值子图块
01西南
12东南
24东北
38西北
createdByUpsampling boolean false optional 如果此实例是通过上采样另一个实例创建的,则为 true; 否则为 false。
credits Array.<Credit> optional 此图块的 credits 数组。
Example:
const buffer = ...
const childTileMask = ...
const terrainData = new Cesium.GoogleEarthEnterpriseTerrainData({
  buffer : heightBuffer,
  childTileMask : childTileMask
});
See:

Members

An array of credits for this tile

waterMask : Uint8Array|HTMLImageElement|HTMLCanvasElement|undefined

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 GoogleEarthEnterpriseTerrainData.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.
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.