
Subset a network keeping the components that intersect a target geometry.
Source:R/network.R
filter_network.RdIf subsetting results in multiple disconnected components, we keep the main one.
Arguments
- network
A spatial network object of class
sfnetworks::sfnetwork- target
The target geometry
- elements
The elements of the network to filter. It can be "nodes" or "edges"
Value
A spatial network object of class sfnetworks::sfnetwork