st_network_faces | R Documentation |
The faces of a spatial network are the areas bounded by edges, without any other edge crossing it. A special face is the outer face, which is the area not bounded by any set of edges.
st_network_faces(x, boundary = NULL)
x |
An object of class |
boundary |
The boundary used for the outer face, as an object of class
|
An object of class sfc
with POLYGON
geometries, in which each feature represents one face of the network.
library(sf, quietly = TRUE)
oldpar = par(no.readonly = TRUE)
par(mar = c(1,1,1,1))
pts = st_transform(mozart, 3035)
net = as_sfnetwork(pts, "delaunay")
faces = st_network_faces(net)
plot(faces, col = sf.colors(length(faces), categorical = TRUE))
plot(net, add = TRUE)
par(oldpar)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.