onstove.RasterLayer.align#

RasterLayer.align(base_layer: RasterLayer | str, rescale: bool | None = None, output_path: str | None = None, inplace: bool = True) RasterLayer[source]#

Aligns the raster’s gridded data with the grid of an input raster.

Parameters:
base_layer: RasterLater or str path to file

Raster layer to use as base for the grid alignment.

rescale: bool, optional

Whether to rescale the values proportionally to the cell size difference between the base_layer and the current raster. If not defined then the rescale attribute is used.

output_path: str, optional

A folder path where to save the output dataset. If not defined then the aligned raster is not saved to disk.

inplace: bool, default True

Whether to replace the current raster with the aligned data or return a new RasterLayer.

Returns:
RasterLayer

RasterLayer with the aligned data.