Learn R Programming

plotKML (version 0.5-4)

kml_layer.STTDF: Write a space-time trajectory to KML

Description

Writes an object of class "STTDF" to a KML file with a possibility to parse attribute variables using several aesthetics arguments.

Usage

kml_layer.STTDF(obj, id.name = names(obj@data)[which(names(obj@data)== "burst")],
    dtime, extrude = FALSE, 
    start.icon = paste(get("home_url", envir = plotKML.opts),
         "3Dballyellow.png", sep = ""), 
    end.icon = paste(get("home_url", envir = plotKML.opts), 
          "golfhole.png", sep = ""), 
    LabelScale = 0.8 * get("LabelScale", envir = plotKML.opts), z.scale = 1,
    metadata = NULL, html.table = NULL, ...)

Arguments

obj
space-time object of class "STTDF" (spatio-temporal irregular data.frames trajectory)
id.name
trajectory ID column name
dtime
temporal support size (in seconds)
extrude
logical; extrude GPS vertices?
start.icon
start icon name (3Dballyellow.png)
end.icon
destination icon name (golfhole.png)
LabelScale
the default size of icons
z.scale
vertical exaggeration
metadata
(optional) specify the metadata object
html.table
optional description block (html) for each GPS point (vertices)
...
other optional arguments

encoding

latin1

Details

The dateTime is defined as yyyy-mm-ddThh:mm:sszzzzzz, where T is the separator between the date and the time, and the time zone is either Z (for UTC) or zzzzzz, which represents {+-}hh:mm in relation to UTC. For more info on how Time Stamps work see http://kml-samples.googlecode.com. If the time is measured at block support, then: tags will be inserted. Temporal support for any spacetime class, if not specified by the user, is determined as a difference between the "time" (indicating begin time) and "endTime" slots.

References

  • Pebesma, E. (2012)http://www.jstatsoft.org/v51/i07{Classes and Methods for Spatio-Temporal Data in R}. Journal of Statistical Software. 51(7): 1-30.
  • spacetime package (http://CRAN.R-project.org/package=spacetime)

See Also

readGPX, plotKML-method