revrt.utilities.base.save_data_using_layer_file_profile#

save_data_using_layer_file_profile(layer_fp, data, geotiff, nodata=None, lock=None, **profile_kwargs)[source]#

Write to GeoTIFF file

Parameters:
  • layer_fp (path-like) – Path to layered file on disk. This file must already exist.

  • data (array-like) – Data to write to GeoTIFF using LayeredFile profile.

  • geotiff (path-like) – Path to output GeoTIFF file.

  • nodata (int | float, optional) – Optional nodata value for the raster layer. By default, None, which does not add a “nodata” value.

  • lock (bool | `dask.distributed.Lock`, optional) – Lock to use to write data using dask. If not supplied, a single process is used for writing data to the GeoTIFF. By default, None.

  • **profile_kwargs – Additional keyword arguments to pass into writing the raster. The following attributes ar ignored (they are set using properties of the source LayeredFile):

    • nodata

    • transform

    • crs

    • count

    • width

    • height

Raises:

revrtValueError – If shape of provided data does not match shape of LayeredFile.