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

kml_track

Generate KML from locations


Description

Function to generate a kml file from tracking data. This is a wrapper of plotKML and kml, specifically designed to generate a kml file from tracking data.

Usage

kml_track(sdata, sdata.CRS = "WGS", output = "open", type = "point", ...)

Arguments

sdata

A data frame containing location data of one individual, with the following column headers: "id", "DateTime", "lat", "lon". "id" is an identifier of the individual. "DateTime" is the GMT date & time of each location in class POSIXct or character with the following format "2012-06-03 01:33:46". "lat" and "lon" are the latitude and longitude of each location in decimal degrees.

sdata.CRS

Coordinate reference system (CRS) for the input location data. If the input data is not in WGS, the specific CRS needs to be supplied as a PROJ.4 notation or EPSG code. (e.g. "+proj=utm +zone=37 +datum=WGS84 +units=m +no_defs" or "EPSG:32637")

output

A string specifying whether to 'open' or 'save' the output. The output will be saved in the current working directory.

type

Type of the output. 'point' or 'line.

...

Optional arguments passed to plotKML and kml.

Value

A kml file

Author(s)

Takahiro Shimada

See Also

Examples

#### Fastloc GPS data obtained from a green turtle
data(turtle)

## Not run: 
#### See the data on Google earth
## points with time stamps
kml_track(turtle, output = 'open', type = 'point', 
points_names = turtle$DateTime, colour_scale = 'yellow')

## lines
kml_track(turtle, output = 'open', type = 'line', colour = 'red')
 

#### Save the location points to the current working directory    
shape <- "http://maps.google.com/mapfiles/kml/pal2/icon26.png"
kml_track(turtle, output = 'save', type = 'point', shape = shape, colour = 'yellow')

## End(Not run)

SDLfilter

Filtering and Assessing the Sample Size of Tracking Data

v2.1.0
GPL-2 | file LICENSE
Authors
Takahiro Shimada
Initial release
2021-04-02

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.