hydromt.Dataset.raster.to_mapstack#
- Dataset.raster.to_mapstack(root, driver='GTiff', dtype=None, tags=None, windowed=False, mask=False, prefix='', postfix='', pcr_vs_map={'ldd': 'ldd'}, logger=<Logger hydromt.raster (WARNING)>, **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.
prefix (str, optional) – Prefix to filenames in mapstack
postfix (str, optional) – Postfix to filenames in mapstack
pcr_vs_map (dict, optional) – Only for PCRaster driver: <variable name> : <PCRaster type> key-value pairs e.g.: {‘dem’: ‘scalar’}, see https://www.gdal.org/frmt_various.html#PCRaster
**profile_kwargs – Additional keyword arguments to pass into writing the raster. The nodata, transform, crs, count, width, and height attributes are ignored.