onstove.RasterLayer.log#
- RasterLayer.log(mask_layer: VectorLayer, output_path: str | None = None, create_raster: bool | None = True) RasterLayer [source]#
Calculates a logarithmic representation of the raster dataset.
This is used as
distance`_raster
for layers that can vary widely in magnitude from cell to cell, like population. This useful when using theMCA
model.- Parameters:
- mask_layer: VectorLayer
Layer used to set to
nodata
every pixel of the raster outside the mask.- output_path: str, optional
A folder path where to save the output dataset. If not defined then the masked dataset is not saved to disk.
- create_raster: bool, default True
Boolean condition. If True, a
RasterLayer
will be created and stored in thedistance_raster
attribute of the class. If False, aRasterLayer
with the logarithmic data is returned.
- Returns:
- RasterLayer
RasterLayer
with the logarithmic raster data.