raster.build_rasterio_profile()

Build a rasterio profile by merging the provided profiles, starting from defaults.

Usage

Source

raster.build_rasterio_profile(*profiles)

Each argument is applied in order, so later profiles override earlier ones.

The built-in defaults are::

driver     = "GTiff"
tiled      = True
blockxsize = 512
blockysize = 512
interleave = "pixel"
compress   = "deflate"

The caller must supply dtype, nodata, count, width, and height before passing the profile to rasterio.open.

Parameters

*profiles: dict[str, Any] or None
Profile dicts to merge, in order of increasing precedence.

Returns

dict[str, Any]
Merged profile starting from the defaults above.