Skip to main content

encode_heights

Function encode_heights 

Source
pub fn encode_heights(elevations: &[f64], width: u32, height: u32) -> Vec<u8> 
Expand description

Encode a row-major width × height elevation grid into little-endian u16 bytes (width * height * 2 bytes).

Rows are expected north → south, columns west → east (Cesium’s convention).

§Panics

Panics if elevations.len() < (width * height) as usize.