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.

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

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

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.

Value

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

Examples

## 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)
#> class : Move #> features : 919 #> extent : -3561.379, 3563.318, -3316.279, 3317.132 (xmin, xmax, ymin, ymax) #> crs : +proj=aeqd +ellps=WGS84 +lon_0=-73.8871629 +lat_0=42.73884025 #> variables : 17 #> names : timestamp, eobs.battery.voltage, eobs.horizontal.accuracy.estimate, eobs.key.bin.checksum, eobs.speed.accuracy.estimate, eobs.start.timestamp, eobs.status, eobs.temperature, eobs.type.of.fix, eobs.used.time.to.get.fix, ground.speed, heading, height.above.ellipsoid, utm.easting, utm.northing, ... #> min values : 1234354605, 3596, 3.07, 3258904, 0.27, 2009-02-11 12:14:59.000, A, 13, 3, 4, 0.01, 0, -169.6, 587507.837877134, 4729143.16566605, ... #> max values : 1236158219.998, 3666, 97.02, 4291715164, 33.04, 2009-03-04 09:15:01.000, A, 35, 3, 119, 31.71, 359.79, 349, 594679.382402579, 4735720.47868847, ... #> timestamps : 2009-02-11 12:16:45 ... 2009-03-04 09:16:59 Time difference of 21 days (start ... end, duration) #> sensors : gps #> indiv. data : eobs.fix.battery.voltage, manually.marked.outlier, visible, sensor.type, individual.taxon.canonical.name, tag.local.identifier, individual.local.identifier, study.name, study.timezone #> indiv. value: 0 NA true gps Martes pennanti 74 Leroy Urban fisher GPS tracking Eastern Standard Time #> unused rec. : 1071 #> date created: 2015-09-15 15:38:46
## transform the Move object into another projection method, like mollweide spTransform(leroy, CRSobj="+proj=moll +ellps=WGS84")
#> class : Move #> features : 919 #> extent : -6114410, -6109145, 5089890, 5096461 (xmin, xmax, ymin, ymax) #> crs : +proj=moll +ellps=WGS84 #> variables : 17 #> names : timestamp, eobs.battery.voltage, eobs.horizontal.accuracy.estimate, eobs.key.bin.checksum, eobs.speed.accuracy.estimate, eobs.start.timestamp, eobs.status, eobs.temperature, eobs.type.of.fix, eobs.used.time.to.get.fix, ground.speed, heading, height.above.ellipsoid, utm.easting, utm.northing, ... #> min values : 1234354605, 3596, 3.07, 3258904, 0.27, 2009-02-11 12:14:59.000, A, 13, 3, 4, 0.01, 0, -169.6, 587507.837877134, 4729143.16566605, ... #> max values : 1236158219.998, 3666, 97.02, 4291715164, 33.04, 2009-03-04 09:15:01.000, A, 35, 3, 119, 31.71, 359.79, 349, 594679.382402579, 4735720.47868847, ... #> timestamps : 2009-02-11 12:16:45 ... 2009-03-04 09:16:59 Time difference of 21 days (start ... end, duration) #> sensors : gps #> indiv. data : eobs.fix.battery.voltage, manually.marked.outlier, visible, sensor.type, individual.taxon.canonical.name, tag.local.identifier, individual.local.identifier, study.name, study.timezone #> indiv. value: 0 NA true gps Martes pennanti 74 Leroy Urban fisher GPS tracking Eastern Standard Time #> unused rec. : 1071 #> date created: 2015-09-15 15:38:46
##check projection method proj4string(leroy)
#> [1] "+proj=longlat +ellps=WGS84 +datum=WGS84 +towgs84=0,0,0"
# \dontshow{ spTransform(leroy, CRSobj=CRS("+proj=moll +ellps=WGS84"))
#> class : Move #> features : 919 #> extent : -6114410, -6109145, 5089890, 5096461 (xmin, xmax, ymin, ymax) #> crs : +proj=moll +ellps=WGS84 #> variables : 17 #> names : timestamp, eobs.battery.voltage, eobs.horizontal.accuracy.estimate, eobs.key.bin.checksum, eobs.speed.accuracy.estimate, eobs.start.timestamp, eobs.status, eobs.temperature, eobs.type.of.fix, eobs.used.time.to.get.fix, ground.speed, heading, height.above.ellipsoid, utm.easting, utm.northing, ... #> min values : 1234354605, 3596, 3.07, 3258904, 0.27, 2009-02-11 12:14:59.000, A, 13, 3, 4, 0.01, 0, -169.6, 587507.837877134, 4729143.16566605, ... #> max values : 1236158219.998, 3666, 97.02, 4291715164, 33.04, 2009-03-04 09:15:01.000, A, 35, 3, 119, 31.71, 359.79, 349, 594679.382402579, 4735720.47868847, ... #> timestamps : 2009-02-11 12:16:45 ... 2009-03-04 09:16:59 Time difference of 21 days (start ... end, duration) #> sensors : gps #> indiv. data : eobs.fix.battery.voltage, manually.marked.outlier, visible, sensor.type, individual.taxon.canonical.name, tag.local.identifier, individual.local.identifier, study.name, study.timezone #> indiv. value: 0 NA true gps Martes pennanti 74 Leroy Urban fisher GPS tracking Eastern Standard Time #> unused rec. : 1071 #> date created: 2015-09-15 15:38:46
data(fishers) spTransform(fishers, center=TRUE)
#> class : MoveStack #> features : 1919 #> extent : -3561.379, 3563.319, -7713.449, 7714.34 (xmin, xmax, ymin, ymax) #> crs : +proj=aeqd +ellps=WGS84 +lon_0=-73.8871629 +lat_0=42.778423 #> variables : 20 #> names : timestamp, eobs.battery.voltage, eobs.horizontal.accuracy.estimate, eobs.key.bin.checksum, eobs.speed.accuracy.estimate, eobs.start.timestamp, eobs.status, eobs.temperature, eobs.type.of.fix, eobs.used.time.to.get.fix, ground.speed, heading, height.above.ellipsoid, utm.easting, utm.northing, ... #> min values : 1234354605, 3449, 2.05, 3258904, 0.22, 2009-02-11 12:14:59.000, A, -12, 3, 3, 0, 0, -169.6, 587507.837877134, 4729143.16566605, ... #> max values : 1266568086.999, 3732, 97.02, 4292563084, 33.04, 2010-02-19 08:27:59.000, A, 35, 3, 120, 43.12, 359.79, 349, 594679.382402579, 4744523.82522186, ... #> timestamps : 2009-02-11 12:16:45 ... 2010-02-19 08:28:06 Time difference of 373 days (start ... end, duration) #> sensors : gps #> indiv. data : eobs.fix.battery.voltage, manually.marked.outlier, visible, sensor.type, individual.taxon.canonical.name, tag.local.identifier, individual.local.identifier, study.name, study.timezone, behavioural.classification #> min ID Data : NA, NA, true, gps, Martes pennanti, 74, Leroy, Urban fisher GPS tracking, Eastern Standard Time, NA #> max ID Data : NA, NA, true, gps, Martes pennanti, 1016, Ricky.T, Urban fisher GPS tracking, Eastern Standard Time, NA #> individuals : Leroy, Ricky.T #> unused rec. : 2959 #> date created: 2020-03-06 08:59:04
# }