Terrain source either terrain RGB or terrarium formats for computing elevation

interface TerrainSource {
    encoding?: "terrarium" | "mapbox";
    maxzoom?: number;
    minzoom?: number;
    tileSize?: 256 | 512;
    tms?: boolean;
    url: string;
}

Properties

encoding?: "terrarium" | "mapbox"

The encoding used by this source. Mapbox Terrain RGB is used by default.

terrarium: Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info. mapbox: Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info.

maxzoom?: number

maxzoom for terrain RGB raster tilesets. default is 15

minzoom?: number

minzoom for terrain RGB raster tilesets. default is 5

tileSize?: 256 | 512

size of tile. 256 or 512. Defaults to 512.

tms?: boolean

whether it is Tile Map Service. Default is false

url: string

URL for terrain RGB or terrarium raster tilesets.

For example, URL should be like the below. https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png