docsby gkjohnson
Building terrain from Terrain-RGB encoded elevation tiles
Data courtesy of Mapterhorn, Esri World Imagery
On this page

Methods

new TerrainRGBMeshPlugin(
	options?: {
		// XYZ url template, e.g. `.../{z}/{x}/{y}.png`.
		url: string,

		// Source tile pixel size.
		tileDimension: number = 256,

		// Highest zoom level the source provides.
		maxZoom: number = 15,

		// Factor applied to the meter elevations. A pure vertical exaggeration on the ellipsoid, while planar projections need the meters-to-world conversion folded in. Can be adjusted dynamically.
		heightScale: number = 1,

		// Overlay used to texture the tiles when `applyOverlayTexture` is enabled.
		overlay: ImageOverlay = null,

		// Whether to apply the overlay texture.
		applyOverlayTexture: boolean = false,

		// Render the tiles without lighting or terrain normals.
		unlit: boolean = false,

		// Display the tiles on the ellipsoid, on a plane in the source projection, or on a plane in the named projection scheme.
		projection: 'ellipsoid' | 'source' | string = 'ellipsoid',

		// Snap poles to ±90° lat.
		endCaps: boolean = true,

		// Apply recommended TilesRenderer settings.
		useRecommendedSettings: boolean = true
	}
)
sampleCartographicElevation(
	// Latitude in radians.
	lat: number,

	// Longitude in radians.
	lon: number
): number | null