ltraj2sf: Convert ltraj to sf spatial object

Description Usage Arguments Details Value See Also Examples

View source: R/ltraj2sf.R

Description

The function ltraj2sf is a simple function for converting ltraj to sf objects.

Usage

1
ltraj2sf(traj, type = "point")

Arguments

traj

an object of the class ltraj which contains the time-stamped movement fixes of the object. For more information on objects of this type see help(ltraj).

type

One of "point" (the default) or "line".

Details

The function ltraj2sf can be used to convert an ltraj object into an sf spatial object (either as points or lines).

Value

A sf object either points or lines.

See Also

conSpatial

Examples

1
2
3
4
5
6
7
8
data(deer)
#points
deer_pt <- ltraj2sf(deer)
plot(deer_pt['id'])

#lines
deer_ln <- ltraj2sf(deer)
plot(deer_ln['id'])

wildlifeDI documentation built on June 16, 2021, 5:07 p.m.