move (version 4.2.4)

spTransform: Transform projection of movement track

Description

The spTransform function transforms the coordinates stored in the Move object from the default long/lat coordinates to the default aeqd (Azimuthal Equi-distance) projection or a user defined projection.

Usage

# S4 method for Move,character
spTransform(x,CRSobj,center=FALSE)
  # S4 method for Move,missing
spTransform(x,center=FALSE,...)

Value

same as input object with coordinates transformed to the new coordinate reference system.

Arguments

x

a move, moveStack or moveBurst object to be transformed

CRSobj

object of class CRS, or of class character in which case it is converted to CRS. Can be left empty if center=TRUE

center

logical, if TRUE the center of the coordinate system is the center of the track; FALSE is default

...

for additional arguments

Author

Marco Smolla & Anne Scharf

Details

The spTransform function transforms the coordinates of a Move object by default from "+proj=longlat" to "+proj=aeqd". In this format the coordinates can be used by the brownian.bridge.dyn function.
If center is TRUE the center of the coordinate system is set to the center of the track.

Examples

Run this code
## create a Move object
data(leroy)
## transform the Move object by default into "+aeqd" projection method 
## and center the coordinate system
spTransform(leroy, center=TRUE)

## transform the Move object into another projection method, like mollweide
spTransform(leroy, CRSobj="+proj=moll +ellps=WGS84")

##check projection method
proj4string(leroy)
# \dontshow{
spTransform(leroy, CRSobj=CRS("+proj=moll +ellps=WGS84"))
data(fishers)
spTransform(fishers, center=TRUE)
# }

Run the code above in your browser using DataLab