Skip to main content

decode_terrain_rgb_mm

Function decode_terrain_rgb_mm 

Source
pub fn decode_terrain_rgb_mm(r: u8, g: u8, b: u8) -> i32
Expand description

Decodes Mapbox Terrain-RGB encoded pixel (R, G, B) into elevation in millimeters.

$h_{\text{meters}} = -10000.0 + (R \cdot 65536 + G \cdot 256 + B) \cdot 0.1$