Avoids the problem of -Inf occuring for log(0).
logRasterStack(rStack, standartize = FALSE, InfVal = NA)
rasterStack to convert to logarithmic scale
logical: standartize cube between 0 and 1
the value that Inf
and -Inf
should be rpeplaced with
A rasterStack in logarithmic scale
logRasterStack(raster::stack(dem))
#> class : RasterStack
#> dimensions : 175, 501, 87675, 1 (nrow, ncol, ncell, nlayers)
#> resolution : 251.2, 370.8 (x, y)
#> extent : 2543252, 2669103, 1177108, 1241998 (xmin, xmax, ymin, ymax)
#> crs : +init=epsg:2056 +proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs
#> names : layer
#> min values : 5.925142
#> max values : 7.864088
#>