hydromt.gis.Dataset.raster.to_mapstack#
- gis.Dataset.raster.to_mapstack(root, driver='GTiff', dtype=None, tags=None, windowed=False, mask=False, prefix='', postfix='', **profile_kwargs)#
Write the Dataset object to one gdal-writable raster files per variable.
The files are written to the
root
directory using the following filename<prefix><variable_name><postfix>.<ext>
.- Parameters:
root (
str
) – The path to output the raster to. It is created if it does not yet exist.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
) – Whether to apply the mask to the tasterisation.prefix (
str
, optional) – Prefix to filenames in mapstackpostfix (
str
, optional) – Postfix to filenames in mapstack**profile_kwargs – Additional keyword arguments to pass into writing the raster. The nodata, transform, crs, count, width, and height attributes are ignored.
logger (
logger object
, optional) – The logger object used for logging messages. If not provided, the default logger will be used.