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

layer.SpatialLines

Writes spatial lines to KML


Description

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

Usage

kml_layer.SpatialLines(obj, subfolder.name = paste(class(obj)), 
  extrude = FALSE, z.scale = 1, metadata = NULL, 
  html.table = NULL, TimeSpan.begin = "", TimeSpan.end = "", ...)

Arguments

obj

object of class "SpatialLines*"

subfolder.name

character; optional subfolder name

extrude

logical; specifies whether to connect the LinearRing to the ground

z.scale

vertical exaggeration

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

...

additional style arguments (see aesthetics)

Details

Only colour and width (aesthetics) are recommended when visualizing SpatialLines* objects.
TimeSpan.begin and TimeSpan.end are optional TimeStamp vectors in the format:
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

Examples

library(rgdal)
library(sp)
data(eberg_contours)
data(SAGA_pal)
names(eberg_contours)
# KML plot with elevations used as 'colour' argument:
kml.file = paste0(tempdir(), "/eberg_contours.kml")
kml(eberg_contours, file.name = kml.file, 
  colour_scale = SAGA_pal[[1]], colour = Z)

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.