Skip to contents

If subsetting results in multiple disconnected components, we keep the main one.

Usage

filter_network(network, target, elements = "nodes")

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