get_weights {stelfi}R Documentation

Mesh weights

Description

Calculate the areas (weights) around the mesh nodes that are within the specified spatial polygon sf of the domain.

Usage

get_weights(mesh, sf, plot = FALSE)

Arguments

mesh

A spatial mesh of class fmesher::fm_mesh_2d()

sf

An sf of type POLYGON specifying the region of the domain.

plot

Logical, whether to plot the calculated mesh weights. Default, FALSE.

Value

Either a simple features, sf, object or values returned by geom_sf.

See Also

https://becarioprecario.bitbucket.io/spde-gitbook/.

Examples

data(horse_mesh, package = "stelfi")
data(horse_sf, package = "stelfi")
get_weights(horse_mesh, horse_sf, plot = TRUE)

[Package stelfi version 1.0.1 Index]