encode
fun encode(buffer: ElevationTileBuffer, isFloat: Boolean, tileWidth: Int, tileHeight: Int): ElevationStorageCodec.Encoded
Encode a tile buffer for storage. Dispatches on buffer type and isFloat:
| source | isFloat | output |
|---|---|---|
| ShortBuffer | false | TIFF-Uint16 codes (scale=1, offset=0) |
| ShortBuffer | true | TIFF-Float32 (widened, lossless) |
| FloatBuffer | true | TIFF-Float32 (lossless) |
| FloatBuffer | false | TIFF-Uint16 with (scale, offset) packed from the FloatBuffer's value range — preserves up to ~range/65535 per pixel; no ShortArray intermediate |