Make a spatial segment object
fm_segm(...)# S3 method for default
fm_segm(loc = NULL, idx = NULL, grp = NULL, is.bnd = TRUE, crs = NULL, ...)
# S3 method for fm_segm
fm_segm(..., grp = NULL, grp.default = 0L, is.bnd = NULL)
# S3 method for fm_segm_list
fm_segm(x, grp = NULL, grp.default = 0L, ...)
fm_segm_join(x, grp = NULL, grp.default = 0L, is.bnd = NULL)
fm_segm_split(x, grp = NULL, grp.default = 0L)
# S3 method for inla.mesh.segment
fm_segm(..., grp.default = 0)
# S3 method for fm_mesh_2d
fm_segm(x, boundary = TRUE, grp = NULL, ...)
fm_is_bnd(x)
fm_is_bnd(x) <- value
An fm_segm or fm_segm_list object
Passed on to submethods
Matrix of point locations, or SpatialPoints, or sf/sfc point
object.
Segment index sequence vector or index pair matrix. The indices
refer to the rows of loc. If loc==NULL, the indices will be
interpreted as indices into the point specification supplied to
fm_rcdt_2d(). If is.bnd==TRUE, defaults to linking
all the points in loc, as c(1:nrow(loc),1L), otherwise
1:nrow(loc).
When joining segments, use these group labels for segments instead of the original group labels.
TRUE if the segments are boundary segments, otherwise
FALSE.
An optional fm_crs(), sf::st_crs() or sp::CRS() object
If grp.default is NULL, use these group labels for
segments with NULL group.
Mesh to extract segments from
logical; if TRUE, extract the boundary segments,
otherwise interior constrain segments.
logical
fm_segm(fm_segm): Join multiple fm_segm objects into a single fm_segm
object. If is.bnd is non-NULL, it overrides the input segment information.
Otherwise, it checks if the inputs are consistent.
fm_segm(fm_segm_list): Join fm_segm objects from a fm_segm_list into
a single fm_segm object. Equivalent to fm_segm_join(x)
fm_segm(fm_mesh_2d): Extract the boundary or interior segments of a 2d mesh.
If grp is non-NULL, extracts only segments matching the matching the set
of groups given by grp.
fm_segm(): Create a new fm_segm object.
fm_segm_join(): Join multiple fm_segm objects into a single fm_segm
object. If is.bnd is non-NULL, it overrides the segment information.
Otherwise it checks for consistency.
fm_segm_split(): Split an fm_segm object by grp into an fm_segm_list
object, optionally keeping only some groups.
Other object creation and conversion:
fm_as_collect(),
fm_as_fm(),
fm_as_lattice_2d(),
fm_as_lattice_Nd(),
fm_as_mesh_1d(),
fm_as_mesh_2d(),
fm_as_mesh_3d(),
fm_as_segm(),
fm_as_sfc(),
fm_as_tensor(),
fm_collect(),
fm_lattice_2d(),
fm_lattice_Nd(),
fm_mesh_1d(),
fm_mesh_2d(),
fm_simplify(),
fm_tensor()
fm_segm(rbind(c(0, 0), c(1, 0), c(1, 1), c(0, 1)), is.bnd = FALSE)
fm_segm(rbind(c(0, 0), c(1, 0), c(1, 1), c(0, 1)), is.bnd = TRUE)
fm_segm_join(fmexample$boundary_fm)
fm_segm(fmexample$mesh, boundary = TRUE)
fm_segm(fmexample$mesh, boundary = FALSE)
Run the code above in your browser using DataLab