gps2kml: Convert GPS coordinates

View source: R/geomaps.R

gps2kmlR Documentation

Convert GPS coordinates

Description

Convert GPS coordinates into the KML format.

Usage

gps2kml(x)

Arguments

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

Value

vector of characters (one item per line of the KML file)

Author(s)

Timothee Flutre

Examples

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)

timflutre/rutilstimflutre documentation built on Feb. 7, 2024, 8:17 a.m.