Python tools for geographic graphs
GeoNetworkX is a project to add support for geographic graphs to NetworkX (in the same way that GeoPandas support geographic data to Pandas). It currently implements four data structures that extends the networkx graph classes (Graph, MultiGraph, DiGraph, MultiDiGraph).
Requirements
- pyproj>=2.2
- geopy>=1.12.0
- geopandas>=0.7
- networkx>=2.3
- numpy>=1.12.0
- pandas>=0.25.0
- shapely>=1.2.18
- scipy>=0.19.0rc2
- nose>=1.3.7
Optional packages:
- srtm (for elevation data)
- pyvoronoi (for voronoi utils)
- osmnx (for OSM data)
Installation
pip install geonetworkx
If you are using conda
on Windows, the binaries downloaded automatically
are broken, and rtree
is
unable to work properly.
A workaround is to download manually the binary from this webpage. Please download the binary corresponding to your system and your Python version (3.6 or 3.7). You have notably to download:
- Binary for
Rtree
- Binary for
GDAL
- Binary for
Fiona
Online documentation is available here: https://geonetworkx.readthedocs.io
Tests can be launched with unittest
with the following command:
python -m unittest discover -v geonetworkx
Or with nose
like this:
nosetests geonetworkx -v --with-doctest