ox_as_dodgr: Convert to a 'dodgr' graph

View source: R/interop.R

ox_as_dodgrR Documentation

Convert to a dodgr graph

Description

Returns a data.frame in the column layout expected by the dodgr routing package (from_id, from_lon, from_lat, to_id, to_lon, to_lat, d), suitable for dodgr::dodgr_dists() and friends.

Usage

ox_as_dodgr(g, weight = "length")

Arguments

g

An osm_graph.

weight

Edge column used as the distance/weight d. Default "length".

Value

A data.frame dodgr graph.

Examples


g <- example_osm_graph()
head(ox_as_dodgr(g))


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