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`_rasterfor layers that can vary widely in magnitude from cell to cell, like population. This useful when using theMCAmodel.- Parameters:
- mask_layer: VectorLayer
Layer used to set to
nodataevery 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
RasterLayerwill be created and stored in thedistance_rasterattribute of the class. If False, aRasterLayerwith the logarithmic data is returned.
- Returns:
- RasterLayer
RasterLayerwith the logarithmic raster data.