Extends stream.Writable

Class implementing RasterBand writing as a stream of pixels

Writing is buffered and it is aligned on the underlying compression blocks for maximum efficiency when possible

When piping between rasters using identical blocks, the transfer is zero-copy

The input stream must be in row-major order

If the data type of the stream is different from the data type of the file, GDAL will automatically convert. Mixing data types across chunks is not supported, all chunks must have the same type.

Writing is zero-copy when writing chunks that are exact multiples of the underlying stream block size as returned by gdal.RasterBandPixels.blockSize

Block are written only when full, so the stream must receive exactly width * height pixels to write the last block

Table of Contents


  • options

Defined in lib/writable.js:22


  • [options] RasterWritableOptions optional
    • band RasterBand

      RasterBand to use

    • [blockOptimize=true] Boolean optional

      Write by file blocks when possible (when rasterSize.x == blockSize.x)

    • [convertNoData=false] Boolean optional

      Automatically convert NaN to gdal.RasterBand.noDataValue if it is set when the stream is constructed