onstove.RasterLayer.shape_from_cell#

static RasterLayer.shape_from_cell(bounds: list[float], cell_height: float, cell_width: float) tuple[int, int][source]#

Gets the shape (width and height) of the raster layer based on the bounds and a cell size.

Parameters:
bounds: list of float

The west, south, east, north bounds of the raster.

See also

bounds

cell_height: float

The cell height in units consistent with the raster’s crs.

cell_width: float

The cell width in units consistent with the raster’s crs.

Returns:
tuple pair of int

The height and width of the dataset in pixels