Skip to contents

Conversion methods from mesh related objects to sfc

Usage

fm_as_sfc(x, ...)

# S3 method for inla.mesh
fm_as_sfc(x, ..., multi = FALSE)

# S3 method for fm_mesh_2d
fm_as_sfc(x, ..., multi = FALSE)

# S3 method for inla.mesh.segment
fm_as_sfc(x, ..., multi = FALSE)

# S3 method for fm_segm
fm_as_sfc(x, ..., multi = FALSE)

# S3 method for sfc
fm_as_sfc(x, ...)

# S3 method for sf
fm_as_sfc(x, ...)

Arguments

x

An object to be coerced/transformed/converted into another class

...

Arguments passed on to other methods

multi

logical; if TRUE, attempt to a sfc_MULTIPOLYGON, otherwise a set of sfc_POLYGON. Default FALSE

Value

  • fm_as_sfc: An sfc_MULTIPOLYGON or sfc_POLYGON object

  • fm_as_sfc: An sfc_MULTIPOLYGON or sfc_POLYGON object

Methods (by class)

  • fm_as_sfc(inla.mesh): [Experimental]

  • fm_as_sfc(fm_mesh_2d): [Experimental]

  • fm_as_sfc(inla.mesh.segment): [Experimental]

  • fm_as_sfc(fm_segm): [Experimental]

See also

Examples

fm_as_sfc(fmexample$mesh)
#> Geometry set for 563 features 
#> Geometry type: POLYGON
#> Dimension:     XYZ
#> Bounding box:  xmin: -5.331027 ymin: -3.998161 xmax: 4.061656 ymax: 5.415609
#> z_range:       zmin: 0 zmax: 0
#> CRS:           NA
#> First 5 geometries:
#> POLYGON Z ((-0.7082308 -1.443916 0, -0.9962093 ...
#> POLYGON Z ((1.534019 -1.669411 0, 1.791495 -1.4...
#> POLYGON Z ((0.7169789 -1.03035 0, 0.3472101 -0....
#> POLYGON Z ((-2.580092 -0.4311272 0, -2.857298 -...
#> POLYGON Z ((-3.148845 0.6601133 0, -2.891975 0....
fm_as_sfc(fmexample$mesh, multi = TRUE)
#> Geometry set for 1 feature 
#> Geometry type: MULTIPOLYGON
#> Dimension:     XYZ
#> Bounding box:  xmin: -5.331027 ymin: -3.998161 xmax: 4.061656 ymax: 5.415609
#> z_range:       zmin: 0 zmax: 0
#> CRS:           NA
#> MULTIPOLYGON Z (((-0.7082308 -1.443916 0, -0.99...