inla.spTransform {INLA} | R Documentation |
sp::spTransform
Handles transformation of various inla objects accorting to coordinate
reference systems of sp::CRS
or inla.CRS
class.
inla.spTransform(x, ...) ## Default S3 method: inla.spTransform(x, crs0, crs1, passthrough = FALSE, ...) ## S3 method for class 'SpatialPoints' inla.spTransform(x, CRSobj, passthrough = FALSE, ...) ## S3 method for class 'SpatialPointsDataFrame' inla.spTransform(x, CRSobj, passthrough = FALSE, ...) ## S3 method for class 'inla.mesh.lattice' inla.spTransform(x, CRSobj, passthrough = FALSE, ...) ## S3 method for class 'inla.mesh.segment' inla.spTransform(x, CRSobj, passthrough = FALSE, ...) ## S3 method for class 'inla.mesh' inla.spTransform(x, CRSobj, passthrough = FALSE, ...)
x |
The object that should be transformed from it's current CRS to a new CRS |
... |
Potential additional arguments |
crs0 |
The source |
crs1 |
The target |
passthrough |
default FALSE. Setting to TRUE allows objects with no CRS information to be passed through without transformation. |
CRSobj |
The target |
inla.spTransform.default
Low level transformation of raw coordinates.
The object is returned with its coordinates transformed
Finn Lindgren finn.lindgren@gmail.com
if (require(rgdal)) { latt <- inla.mesh.lattice(-10:10, 40:60) mesh1 <- inla.mesh.create( lattice = latt, extend = FALSE, refine = FALSE, crs = inla.CRS("longlat") ) mesh2 <- inla.spTransform(mesh1, inla.CRS("lambert")) summary(mesh1) summary(mesh2) }