# NOT RUN {
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)
# }
Run the code above in your browser using DataLab