fm_vertices | R Documentation |
fm_mesh_2d
Extracts the vertices of an fm_mesh_2d
object.
fm_vertices(x, format = NULL)
x |
An |
format |
character; |
An sf
, data.frame
, or SpatialPointsDataFrame
object, with the vertex
coordinates, and a .vertex
column with the vertex indices.
Finn Lindgren finn.lindgren@gmail.com
fm_centroids()
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")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.