Elevation Storage Codec
Cross-platform encode/decode for one elevation tile in the cache.
Storage format (JS / iOS — the platforms that use this codec):
isFloat = true→ TIFF-Float32. Lossless for Float32 sources; widens Int16 sources to Float32. Coverage-level(scale, offset) = (1, 0)(unused).isFloat = false→ TIFF-Uint16 with per-tile(scale, offset)that pack a FloatBuffer's actual range into the 16-bit codes. Int16 sources go through unchanged at(1, 0). Float→Int never rounds through a WorldWindShortArrayintermediate — the lossy step is the 16-bit quantization ((max-min)/65535per code), not "round to nearest meter".
The JVM/GeoPackage path uses PNG-Int16 + the gpkg gpkg_2d_gridded_tile_ancillary table; it has its own implementation in GpkgCachedElevationDataFactory. Same encoding contract (storage isFloat + per-tile scale/offset), different wire format.
Types
Functions
Decode a stored tile. Returns either a ShortBuffer-equivalent (for unscaled Int16 storage) or a FloatBuffer-equivalent (for Float32 storage or Int16 storage with non-trivial scale/offset where applying them would lose precision).