kml_layer.SpatialPolygons {plotKML}R Documentation

Writes spatial polygons to KML

Description

Writes object of class "SpatialPolygons*" to KML with a possibility to parse attribute variables using several aesthetics arguments.

Usage

kml_layer.SpatialPolygons(obj, subfolder.name = paste(class(obj)),
        extrude = TRUE, tessellate = FALSE, 
        outline = TRUE, plot.labpt = FALSE, z.scale = 1, 
        LabelScale = get("LabelScale", envir = plotKML.opts), 
        metadata =  NULL, html.table = NULL, TimeSpan.begin = "", 
        TimeSpan.end = "", colorMode = "normal", ...)

Arguments

obj

object of class "SpatialPolygons*"

subfolder.name

character; optional subfolder name

extrude

logical; specifies whether to connect the point to the ground with a line

tessellate

logical; specifies whether to connect the LinearRing to the ground

outline

logical; specifies whether to outline the polygon

plot.labpt

logical; specifies whether to add the label point (polygon centre)

z.scale

numeric; exaggeration in vertical dimension

LabelScale

numeric; scale factor for size of labels

metadata

(optional) specify the metadata object

html.table

optional description block (html) for each GPS point (vertices)

TimeSpan.begin

(optional) beginning of the referent time period

TimeSpan.end

(optional) end of the referent time period

colorMode

(optional) KML color mode (normal or random)

...

additional style arguments (see aesthetics)

Details

Label points are be default not plotted. We recommend adding the legend to attribute maps instead. Transparency can be set by using the alpha argument.
TimeSpan.begin and TimeSpan.end are optional TimeStamp vectors:

yyyy-mm-ddThh:mm:sszzzzzz

Use the same time values for both TimeSpan.begin and TimeSpan.end if the measurements refer to a single moment in time. TimeSpan.begin and TimeSpan.end can be either a single value or a vector of values.

Author(s)

Pierre Roudier, Tomislav Hengl and Dylan Beaudette

See Also

kml_layer.SpatialLines, kml_layer.STIDF, , plotKML-method

Examples

library(rgdal)
library(sp)
data(eberg_zones)
names(eberg_zones)
## visualize zones using random colors:
kml(eberg_zones, colorMode = "random")
## with labels:
kml(eberg_zones, colour = ZONES, plot.labpt = TRUE, 
   labels = ZONES, kmz = TRUE, balloon=TRUE)

[Package plotKML version 0.5-8 Index]