mapview icon indicating copy to clipboard operation
mapview copied to clipboard

add scale argument to viewRGB

Open kendonB opened this issue 7 years ago • 3 comments

As far as I can tell, there is no argument analogous to the scale argument of raster::plotRGB.

kendonB avatar Aug 19 '18 06:08 kendonB

Is it needed? Couldn't you simply do

mapview(obj / maxval * 255)

instead of

mapview(obj, scale = maxval)

?

edzer avatar Aug 19 '18 20:08 edzer

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 avatar Aug 20 '18 00:08 kendonB

@kendonB Would you consider a PR for this?

tim-salabim avatar Aug 30 '18 17:08 tim-salabim