Graphserver is a multi-modal trip planner. Graphserver supports transit modes through GTFS, and street-based modes through OSM.
The core graphserver library has Python bindings which provide easy construction, storage, and analysis of graph objects.
Learn more about Graphserver at http://graphserver.github.com/graphserver/
Note: The build process requires two steps to resolve linking issues with inline functions.
cd core
cmake -S . -B build
cmake --build build
sudo cmake --install build
cd pygs
pip install .
For development installation (editable):
cd pygs
pip install -e .[dev]
This installs the Python package and command-line tools. The tools are installed to your Python environment's bin directory.
After successful installation, verify all components work:
# Test core import
python3 -c "import graphserver.core; print('Core module: OK')"
# Test graph creation
python3 -c "import graphserver.core; g = graphserver.core.Graph(); print('Graph creation: OK')"
# Check installed tools
which gs
Create a GTFSDatabase (sqlite3 db) from a GTFS zip file
gs compile gtfs google_transit.zip google_transit.gtfsdb
Create an OSM database (sqlite3 db) from an OSM XML file
gs compile osm map.osm map.osmdb
Create a new graph file
gs new foobar.gdb
Import an OSM database to a graph file
gs import osm foobar.gdb map.osmdb
Import a GTFS database to a graph file
gs import gtfs foobar.gdb google_transit.gtfsdb
Link OSM vertices to GTFS vertices to enable multimodal trip planning
gs link foobar.gdb map.osmdb google_transit.gtfsdb
Run one of the filter classes from graphserver.ext.osm.osmfilters
on an OSMDB instance
gs_osmfilter <Filter Name> <run|rerun|visualize> <osmdb_file> [<filter args> ...]