0

I have searched around but still didn't find a proper tutorial about the networkx write_shp(). Currently I have the graph variable G and nodes position dictionary pos.

According to the document, the nodes and edges have to have the 'Wkb' or 'Wkt'. How could I assign this 'Wkb' to my current graph? Currently, the error pops up saying.

TypeError: 'int' object is not subscriptable

I hope to draw the map by arcgis after obtaining this shape file. Also, I hope the shape file could preserve the edges attributes if possible.

Xudong
  • 441
  • 5
  • 16

1 Answers1

0

1)Replace the node name with the node coordinate.

2)Set the node and edge attributes as either int, float, or string. Tuple is not supported.

3)See this question.

Xudong
  • 441
  • 5
  • 16