Warning

This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.

GIS Shapefile

Shapefile

Generates a networkx.DiGraph from point and line shapefiles.

“The Esri Shapefile or simply a shapefile is a popular geospatial vector data format for geographic information systems software. It is developed and regulated by Esri as a (mostly) open specification for data interoperability among Esri and other software products.” See https://en.wikipedia.org/wiki/Shapefile for additional information.

read_shp(path[, simplify, geom_attrs]) Generates a networkx.DiGraph from shapefiles.
write_shp(G, outdir) Writes a networkx.DiGraph to two shapefiles, edges and nodes.