Skip to main content

Module geotiff

Module geotiff 

Source
Expand description

Multi-Format DEM Ingestion & Chunking (GeoTIFF, Terrain-RGB, Terrarium).

Converts raw floating-point elevation rasters or compressed 24-bit elevation tiles into cache-aligned $64 \times 64$ cell .m64 strata chunks in row-major order, with a 2D Hilbert index recorded for each chunk.

Structs§

CogIfdHeader
Cloud-Optimised GeoTIFF (COG) Image File Directory (IFD) header (GAP-13 / G66).
ElevationRaster
Raw raster elevation grid descriptor.

Enums§

CompressionCodec
Codec identifiers for .m64 spatial chunks (stored in compression_flags). The raster producer currently implements only UncompressedMmap; all other identifiers fail before output mutation rather than mislabelling raw bytes.
IngestionError
Errors during raster ingestion and compilation.

Constants§

CHUNK_CELL_COUNT
CHUNK_GRID_SIZE

Functions§

compile_raster_to_m64
Partitions a DEM raster into $64 \times 64$ .m64 strata chunks in row-major order, retaining a Hilbert index in each directory entry.
compile_raster_to_m64_with_codec
Partitions a DEM raster into $64 \times 64$ .m64 strata chunks with an explicit compression codec.
compute_canopy_height_model_zero_heap
Computes clamped non-negative canopy height model: CHM = (DSM - DEM).max(0.0).
decode_terrain_rgb_mm
Decodes Mapbox Terrain-RGB encoded pixel (R, G, B) into elevation in millimeters.
decode_terrarium_mm
Decodes Mapzen Terrarium encoded pixel (R, G, B) into elevation in millimeters.
encode_terrain_rgb
Encodes elevation in millimeters into Mapbox Terrain-RGB (R, G, B).
extract_cog_f32_window_zero_heap
Extracts floating-point elevation values from an uncompressed COG tile or strip with zero heap allocation.
parse_cog_ifd_header_zero_heap
Parses a TIFF / Cloud-Optimised GeoTIFF (COG) IFD0 header with zero heap allocation.