mapview
mapview copied to clipboard
add scale argument to viewRGB
As far as I can tell, there is no argument analogous to the scale argument of raster::plotRGB.
Is it needed? Couldn't you simply do
mapview(obj / maxval * 255)
instead of
mapview(obj, scale = maxval)
?
That doesn't work as viewRGB has internal scaling to quantiles 0.02 and 0.98 or (if quantiles = NULL) the interval 0, 1: https://github.com/r-spatial/mapview/blob/fb90f4f7a1358e580e963e42a9dd46d558887325/R/viewRGB.R#L89
@kendonB Would you consider a PR for this?