Skip to content

Documentation / @interstellar-tools/maps / ElevationEncodingType

Type Alias: ElevationEncodingType ​

ts
type ElevationEncodingType = 'terrarium' | 'terrain-rgb';

Defined in: tiles/elevation-tile.ts:15

How an elevation tile packs a height into a pixel's red, green and blue, for decodeElevationTile.

  • 'terrarium': h=256R+G+B/256−32768, the Terrarium format of Mapzen's and AWS's open terrain tiles: steps of 1/256 m.
  • 'terrain-rgb': h=0.1(65536R+256G+B)−10000, Mapbox Terrain-RGB and MapTiler's terrain tiles: steps of 0.1 m.