NetworkX

Previous topic

networkx.readwrite.pajek.parse_pajek

Next topic

networkx.readwrite.nx_shp.read_shp

GIS ShapefileΒΆ

Generates a networkx.DiGraph from point and line shapefiles.

Point geometries are translated into nodes, lines into edges. Coordinate tuples are used as keys. Attributes are preserved, line geometries are simplified into start and end coordinates. Accepts a single shapefile or directory of many 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 http://en.wikipedia.org/wiki/Shapefile for additional information.

read_shp(path) Generate a directed graph from shapefiles.