gps2kml | R Documentation |
Convert GPS coordinates into the KML format.
gps2kml(x)
x |
data frame with point locations in rows and at least columns named "name", "longitude" and "latitude"; if columns "description" and "altitude" are present, they will also be used |
vector of characters (one item per line of the KML file)
Timothee Flutre
coords <- data.frame(name=c("Paris", "Montpellier", "Toulouse"),
longitude=c(2.352222, 3.876716, 1.444209),
latitude=c(48.856614, 43.610769, 43.604652))
kml <- gps2kml(x=coords)
## Not run: ## save to a file
out.file <- "coords.kml"
cat(kml, file=out.file, sep="\n")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.