hydromt.DataArray.raster.to_raster#
- DataArray.raster.to_raster(raster_path, driver='GTiff', dtype=None, tags=None, windowed=False, mask=False, logger=<Logger hydromt.raster (WARNING)>, **profile_kwargs)#
Write DataArray object to a gdal-writable raster file.
- Parameters:
raster_path (str) – The path to output the raster to.
driver (str, optional) – The name of the GDAL/rasterio driver to use to export the raster. Default is “GTiff”.
dtype (str, optional) – The data type to write the raster to. Default is the datasets dtype.
tags (dict, optional) – A dictionary of tags to write to the raster.
windowed (bool, optional) – If True, it will write using the windows of the output raster. Default is False.
mask (bool, optional) – If True, set nodata values where ‘mask’ coordinate equals False.
**profile_kwargs – Additional keyword arguments to pass into writing the raster. The nodata, transform, crs, count, width, and height attributes are ignored.