Show HN: Geospatial Data → Graphs (Networks) (github.com)

🤖 AI Summary
city2graph is a new Python library that converts geospatial datasets into graph representations, bridging GeoPandas, NetworkX and PyTorch Geometric to power GeoAI and GNN workflows. It can build graphs from buildings, streets, land-use, POI proximity and adjacency, OD matrices, and mobility flows (bike-sharing, pedestrian, migration), and includes explicit support for transportation networks via GTFS. The package streamlines the common task of turning spatial relations into node/edge features and PyTorch tensors so you can train or evaluate graph neural networks on urban problems. The release lowers engineering friction with multiple install paths (pip core without PyTorch, pip extras for CPU or CUDA builds—supported CUDA: cu118, cu124, cu126, cu128—and conda-forge instructions), Docker compose for notebook-based workflows, and a development setup using uv. Technical safeguards include pre-commit checks and static typing (ruff, mypy) and testing with pytest. For researchers, this means faster prototyping of spatial GNNs, reproducible transport and mobility experiments, and easier integration of real-world GTFS and OD data into graph ML pipelines; the project also provides citation metadata and contribution guidelines for community development.
Loading comments...
loading comments...