hydromt.model.processes.grid.create_rotated_grid_from_geom#

hydromt.model.processes.grid.create_rotated_grid_from_geom(geom: ~geopandas.geodataframe.GeoDataFrame, *, res: float, dec_origin: int, dec_rotation: int, nodata: int | float | None = 1, dtype: type = <class 'numpy.uint8'>) DataArray[source]#

Create a rotated grid based on a geometry.

Parameters:
  • geom (gpd.GeoDataFrame) – The geometry to create the grid from.

  • res (float) – The resolution of the grid.

  • dec_origin (int) – The number of significant numbers to round the origin points to.

  • dec_rotation (int) – The number of significant numbers to round the rotation to.

  • nodata (int, float, None) – The nodata value to use for the grid. by default 1

  • dtype (type) – The data type of the grid, by default np.uint8.

Returns:

A rotated grid based on the geometry.

Return type:

xr.DataArray