hydromt.Model.setup_maps_from_raster#

Model.setup_maps_from_raster(raster_fn: str, variables: Optional[List] = None, fill_method: Optional[str] = None, name: Optional[str] = None, reproject_method: Optional[str] = None, split_dataset: Optional[bool] = True) List[str][source]#

This component adds data variable(s) from raster_fn to maps object.

If raster is a dataset, all variables will be added unless variables list is specified.

Adds model layers:

  • raster.name maps: data from raster_fn

Parameters:
  • raster_fn (str) – Source name of raster data in data_catalog.

  • variables (list, optional) – List of variables to add to maps from raster_fn. By default all.

  • fill_method (str, optional) – If specified, fills nodata values using fill_nodata method. Available methods are {‘linear’, ‘nearest’, ‘cubic’, ‘rio_idw’}.

  • name (str, optional) – Name of new maps variable, only in case split_dataset=False.

  • reproject_method (str, optional) – See rasterio.warp.reproject for existing methods, by default the data is not reprojected (None).

  • split_dataset (bool, optional) – If data is a xarray.Dataset split it into several xarray.DataArrays (default).

Returns:

Names of added model map layers

Return type:

list