fm_vertices {fmesher} | R Documentation |
Extract vertex locations from an fm_mesh_2d
Description
Extracts the vertices of an fm_mesh_2d
object.
Usage
fm_vertices(x, format = NULL)
Arguments
x |
An |
format |
character; |
Value
An sf
, data.frame
, or SpatialPointsDataFrame
object, with the vertex
coordinates, and a .vertex
column with the vertex indices.
Author(s)
Finn Lindgren finn.lindgren@gmail.com
See Also
Examples
if (require("ggplot2", quietly = TRUE)) {
vrt <- fm_vertices(fmexample$mesh, format = "sf")
ggplot() +
geom_sf(data = fm_as_sfc(fmexample$mesh)) +
geom_sf(data = vrt, color = "red")
}
[Package fmesher version 0.1.7 Index]