inla.spTransform {INLA} | R Documentation

## Wrapper method for `fmesher::fm_transform`

### Description

in favour of `fmesher::fm_transform()`.

Handles transformation of various inla objects according to coordinate reference systems of `sf::crs`, `sp::CRS` or `inla.CRS` class.

### Usage

    inla.spTransform(x, CRSobj, ...)

### Arguments

`x` | The object that should be transformed from it's current CRS to a new CRS
`CRSobj` | passed on as the `crs` argument to `fmesher::fm_transform()`.
`...` | Potential other arguments for `fmesher::fm_transform()`.

### Value

The object is returned with its coordinates transformed

### Author(s)

Finn Lindgren finn.lindgren@gmail.com

### See Also

`inla.CRS()`

### Examples

    if (require("sf") && require("sp") && require("fmesher")) {
        latt <- inla.mesh.lattice(-10:10, 40:60)
        mesh1 <- inla.mesh.create(
            lattice = latt, extend = FALSE, refine = FALSE,
            crs = fm_CRS("longlat_norm")
        )
        mesh2 <- fm_transform(mesh1, fm_crs("lambert_globe"))
        print(summary(mesh1))
        print(summary(mesh2))
    }

[Package INLA version 26.02.05 Index]