ElevationDecoder

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

Public decodeBuffer for cache-only readers that fetch their own Buffer (e.g. GpkgCachedElevationSourceFactory.readCachedTileImage) and need the same Buffer -> ShortArray conversion the standard decode path applies.

Link copied to clipboard
open override fun close(): ERROR CLASS: Unresolved name: close
Link copied to clipboard
open suspend fun decodeElevation(elevationSource: ElevationSource): ERROR CLASS: Unresolved name: withContext
Link copied to clipboard
open suspend fun decodeElevationBytes(bytes: ByteArray, contentType: String?): Buffer?

Public delegate for decoding raw network bytes by elevation MIME. Used by cache factories that fetch their own bytes (bypassing decodeTileSource) but still want the standard format-dispatch table. No postprocessor — the caller is responsible for any side-effects (cache write-through, etc.) it wants on the decoded buffer.

Link copied to clipboard
fun decodePng(bytes: ByteArray, tileScale: Float = 1.0f, tileOffset: Float = 0.0f, coverageScale: Float = 1.0f, coverageOffset: Float = 0.0f, dataNull: Float? = null): Buffer
Link copied to clipboard
open fun decodeTiff(bytes: ByteArray): Buffer

Decode a TIFF/GeoTIFF blob into a ShortBuffer. Uses the cross-platform GeoTiffReader (common code shared with JS / iOS); the prior mil.nga.tiff decode path was JVM-only and forced every platform to maintain its own TIFF parser. Encoding still goes through mil.nga.tiff via encodeTiff - moving that to common is a follow-up.

Link copied to clipboard
fun encodePng(pixels: ShortBuffer, tileWidth: Int, tileHeight: Int): ByteArray
Link copied to clipboard
fun encodeTiff(pixels: FloatBuffer, tileWidth: Int, tileHeight: Int): ByteArray

Serialise a tileWidth × tileHeight FLOAT32 elevation grid as a TIFF byte array. Uses the cross-platform GeoTiffWriter (no mil.nga.tiff dependency); produces a baseline single-strip uncompressed FLOAT32 grayscale TIFF that round-trips through GeoTiffReader / any standard TIFF library. Used by GpkgElevationDataFactory to store elevation tiles in the GeoPackage cache.