hydromt.raster.full_from_transform#
- hydromt.raster.full_from_transform(transform, shape, nodata=nan, dtype=<class 'numpy.float32'>, name=None, attrs=None, crs=None, lazy=False)[source]#
Return a full DataArray based on a geospatial transform and shape.
See
full()
for all options.- Parameters:
transform (
affine transform
) – Two dimensional affine transform for 2D linear mapping.shape (
tuple
ofint
) – Length along (dim0, x, y) dimensions, of which the first is optional.nodata (optional) – The nodata value to assign to the DataArray. Defaults to np.nan.
dtype (optional) – The data type to use for the DataArray. Defaults to np.float32.
name (optional) – The name of the DataArray. Defaults to None.
attrs (optional) – Additional attributes to assign to the DataArray. Empty by default.
crs (optional) – The coordinate reference system (CRS) of the DataArray. Defaults to None.
lazy (
bool
, optional) – Whether to create a lazy DataArray. Defaults to False.
- Returns:
da – Filled DataArray
- Return type:
DataArray