Skip to contents

Find the node in a network that is closest to a target geometry.

Usage

nearest_node(network, target)

Arguments

network

A network object of class sfnetworks::sfnetwork

target

An object of class sf::sf or sf::sfc

Value

A node in the network as an object of class sf::sfc_POINT