Learn R Programming

inlabru (version 2.7.0)

fm_transform: Object coordinate transformation

Description

Handle transformation of various inla objects according to coordinate reference systems of crs (from sf::st_crs()), fm_crssp::CRS or INLA::inla.CRS class.

Usage

fm_transform(x, crs = fm_crs(x), ...)

# S3 method for default fm_transform(x, crs = fm_crs(x), ..., crs0 = NULL)

# S3 method for matrix fm_transform(x, crs = NULL, ..., passthrough = FALSE, crs0 = NULL)

# S3 method for list fm_transform(x, crs = fm_crs(x), ...)

# S3 method for sf fm_transform(x, crs = fm_crs(x), ..., passthrough = FALSE)

# S3 method for sfc fm_transform(x, crs = fm_crs(x), ..., passthrough = FALSE)

# S3 method for sfg fm_transform(x, crs = fm_crs(x), ..., passthrough = FALSE)

# S3 method for Spatial fm_transform(x, crs = fm_crs(x), ..., passthrough = FALSE)

# S3 method for inla.mesh fm_transform(x, ..., crs = fm_crs(x), passthrough = FALSE, crs0 = fm_crs(x))

# S3 method for inla.mesh.lattice fm_transform(x, crs = fm_crs(x), ..., passthrough = FALSE, crs0 = fm_crs(x))

# S3 method for inla.mesh.segment fm_transform(x, crs = fm_crs(x), ..., passthrough = FALSE)

Arguments

x

The object that should be transformed from it's current CRS to a new CRS

crs

The target crs object

...

Potential additional arguments

crs0

The source crs object for spatial classes without crs information

passthrough

Default is FALSE. Setting to TRUE allows objects with no CRS information to be passed through without transformation. Use with care!

See Also

fm_CRS()