Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

kml_legend.bar

Generates a legend bar (PNG file)


Description

Produces a PNG file that can be used as a screen overlay — legend bar for numeric and factor type variables.

Usage

kml_legend.bar(x, width, height, pointsize = 14, legend.file, legend.pal, 
     z.lim = range(x, na.rm=TRUE, finite=TRUE), factor.labels, png.type)

Arguments

x

numeric or factor-type vector

width

numeric; (optional) width of image in pixels

height

numeric; (optional) height of image in pixels

pointsize

numeric; point size for the plot

legend.file

PNG file name

legend.pal

character; color palette

z.lim

numeric; lower and upper limits

factor.labels

character; class names if applicable

png.type

character; PNG type

Details

When exporting raster layers to KML the legend bar is generated by default. If the width and height are not provided, the function will try to estimate them automatically.

Author(s)

Tomislav Hengl, Pierre Roudier, and Dylan Beaudette

See Also

grDevices::png, kml-methods, kml_layer


plotKML

Visualization of Spatial and Spatio-Temporal Objects in Google Earth

v0.8-1
GPL
Authors
Tomislav Hengl [cre, aut], Andrea Gilardi [ctb], Pierre Roudier [ctb], Dylan Beaudette [ctb], Edzer Pebesma [ctb], Michael Blaschek [ctb]
Initial release
2021-04-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.