ox_as_sfnetwork: Convert to an 'sfnetwork'

View source: R/interop.R

ox_as_sfnetworkR Documentation

Convert to an sfnetwork

Description

Returns the graph as a sfnetworks::sfnetwork() object, ready for the sfnetworks/tidygraph spatial-network workflow.

Usage

ox_as_sfnetwork(g, directed = TRUE)

Arguments

g

An osm_graph.

directed

Build a directed network. Default TRUE.

Value

An sfnetwork.

Examples


g <- example_osm_graph()
ox_as_sfnetwork(g)


osmnxr documentation built on Oct. 20, 2026, 1:07 a.m.