Learn R Programming

plotKML (version 0.5-4)

kml_legend.whitening: Whitening legend (PNG)

Description

Produces a PNG file that can be used in KML plots (visualization of uncertainty).

Usage

kml_legend.whitening(legend.res = 0.01, width = 120, height = 300, pointsize = 14, 
                 x.lim, e.lim, leg.asp = 0.3 *  width/height, 
                 legend.file = "whitening_legend.png",
                 matte = FALSE, png.type = "cairo-png")

Arguments

legend.res
numeric; resolution on a 0-1 scale
width
integer; image width
height
integer; image height
pointsize
integer; point size in units for text
x.lim
numeric; upper and lower limits for target variable
e.lim
numeric; upper and lower limits for the normalized error
leg.asp
numeric; legend aspect
legend.file
character; output PNG file name
matte
logical; specify whether to fix transparency using ImageMagick
png.type
character; PNG type

Details

The output PNG file shows a 2D legend with values on the vertical axis and uncertainty on the horizontal axis. Whitening is only valid with Hue-Saturation-Intensity system where Hue's are used to represent values of the target variable, so that the amount of white color can be linearly used to represent uncertainty (i.e. whitening can not be used with different color palettes; or at least we do not recommend this).

References

  • Hengl, T., Heuvelink, G.M.B., Stein, A., (2004)http://dx.doi.org/10.1016/j.geoderma.2003.08.018{A generic framework for spatial prediction of soil variables based on regression-kriging}. Geoderma 122 (1-2): 75-93.
  • Hengl, T., (2003)http://www.geocomputation.org/2003/Papers/Hengl_Paper.pdf{Visualisation of uncertainty using the HSI colour model: computations with colours}. 7th International Conference on GeoComputation (CD-ROM), p. 8.

See Also

whitening

Examples

Run this code
# create the 2D legend for whitening (PNG file):
kml_legend.whitening(x.lim=c(5,20), e.lim=c(.6,1))

Run the code above in your browser using DataLab