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 asfc_MULTIPOLYGON
, otherwise a set ofsfc_POLYGON
. DefaultFALSE
Value
fm_as_sfc
: Ansfc_MULTIPOLYGON
orsfc_POLYGON
object
fm_as_sfc
: Ansfc_MULTIPOLYGON
orsfc_POLYGON
object
See also
Other object creation and conversion:
fm_as_fm()
,
fm_as_lattice_2d()
,
fm_as_mesh_1d()
,
fm_as_mesh_2d()
,
fm_as_segm()
,
fm_as_tensor()
,
fm_lattice_2d()
,
fm_mesh_1d()
,
fm_mesh_2d()
,
fm_segm()
,
fm_simplify()
,
fm_tensor()
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...