Module parallel_writer

Source
Expand description

Parallel GeoTIFF writer for direct windowed writes (replaces mosaic subprocess chain). Parallel GeoTIFF writer inspired by Dask/rioxarray’s RasterioWriter.

Pre-creates an output GeoTIFF and allows multiple threads to write their blocks directly to windows in the file, serialized by a Mutex.

Unlike the rioxarray approach which opens/closes per chunk, this writer keeps the GDAL dataset open across writes (protected by a Mutex), avoiding repeated header parsing overhead.

This replaces the mosaic phase (gdalwarp → gdalbuildvrt → gdal_translate subprocess chain) with direct windowed writes, eliminating subprocess spawning and intermediate files.

Structs§

ParallelGeoTiffWriter
Writer that allows parallel block writes to a pre-created GeoTIFF.

Functions§

create_output_geotiff
Pre-creates a GeoTIFF file with the given parameters.
write_block
Writes a single block’s data (all bands) to the pre-created GeoTIFF.