Guy
Guy

Reputation: 191

In OSMnx, how would I set all roads to be two-way roads?

In fact it is as the title state. I want to test my simulation model on a simplified version, which means less roads so I took only the driving roads, but some of them are one-way roads. How would I set all roads in a graph to be of two-way?

For example this is the graph that I work with:

G = ox.graph_from_bbox(35.00843, 34.99174, 135.78775, 135.77495, network_type='drive')

Upvotes: 0

Views: 505

Answers (1)

gboeing
gboeing

Reputation: 6442

See the documentation. The get_undirected function converts a directed multigraph to an undirected multigraph.

Upvotes: 1

Related Questions