revrt.utilities.base.save_data_array_to_geotiff#
- save_data_array_to_geotiff(da, geotiff, nodata=None, lock=None, metadata=None, **profile_kwargs)[source]#
Write xarray DataArray to GeoTIFF file
- Parameters:
da (
xarray.DataArray) – DataArray to write to GeoTIFF. This should have “y” and “x” dimensions, and optionally a “band” dimension (if not provided, one will be added).geotiff (path-like) – Path to output GeoTIFF file.
nodata (
intorfloat, optional) – Optional nodata value for the raster layer. By default,None, which does not add a “nodata” value.lock (
boolor 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.metadata (
dict, optional) – Optional metadata tags to add to the output 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