I have a .shp with a road network that I want to represent in a Graph with NetworkX. I have used it for further analysis such as shortest distance etc. The problem is the function in Networkx converts shapefile to DiGraph only. The Digraphs are not suitable for representing multiple edges to same nodes
Is there any way to create a MultiDiGraph so I don't lose any edges, or a way around it?
1 Answer 1
You could "manually" write your import function, instead of using write_shp()
like mentioned in this answer to Counting number of lines connected to point? at "Creation of a Graph".