RasterDemEncoding

How the tiles of a RasterDemTileSource store elevation in pixel colors: the style spec's encoding source property.

MapLibre reads the elevation of each pixel, in meters, as red * redFactor + green * greenFactor + blue * blueFactor - baseShift, where each channel is 0 to 255. Each encoding fixes these four numbers, except Custom, which takes them from the source.

Values may be added in minor releases; use an else branch when matching.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The style spec's name for this encoding, such as mapbox.