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

kml_compress

Compress a KML file with auxiliary files


Description

Compresses the KML file toghether with the auxiliary files (images, models, textures) using the default ZIP program.

Usage

kml_compress(file.name, zip = "", files = "", rm = FALSE, ...)

Arguments

file.name

KML file name

zip

(optional) location of an external ZIP program

files

a character vector specifying the list of auxiliary files

rm

logical; specify whether to remove temporary files

...

other kml arguments

Details

The KMZ file can carry the model files (.dae), textures and ground overlay images. For practical purposes, we recommend that you, instead of compressing the images together with the KML file, consider serving the ground overlay images via a server i.e. as network links.
If no internal ZIP program exists, the function looks for the system ZIP program:

Sys.getenv("R_ZIPCMD", "zip")

External ZIP program can also be specified via the zip argument.

Author(s)

Pierre Roudier, Tomislav Hengl and Dylan Beaudette

References

See Also

Examples

data(eberg)
eberg <- eberg[runif(nrow(eberg))<.1,] 
library(sp)
library(rgdal)
library(raster)
coordinates(eberg) <- ~X+Y
proj4string(eberg) <- CRS("+init=epsg:31467")
kml.file = paste0(tempdir(), "/eberg.kml")
kml_open(kml.file)
kml_layer(eberg, colour = CLYMHT_A)
kml_close(kml.file)
# compress:
kml_compress(kml.file)

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.