City2graph (city2graph.net)

🤖 AI Summary
city2graph is a new Python library that converts diverse geospatial datasets into graph structures ready for Graph Neural Networks (GNNs), bridging GeoPandas, NetworkX and PyTorch Geometric. It targets urban/transport applications by turning OSM/Overture Maps (buildings, streets, land use), GTFS public-transport feeds, OD/mobility matrices, POI proximity, and contiguity relations into homogeneous or heterogeneous graphs and PyG Data/HeteroData tensors. That makes it easy for researchers and practitioners to prototype GeoAI tasks—urban morphology analysis, transit resilience, mobility modeling, digital twins—without hand-building graph schemas. Technically, city2graph offers high-level builders: morphological_graph, travel_summary_graph (GTFS), od_matrix_to_graph, fixed_radius/waxman proximity graphs, contiguity (Queen/Rook), bridge_nodes for multi-layer KNN links, and metapath expansion to create multi-hop semantic edges (with edge attribute aggregation like distance sum). It outputs NetworkX/GeoPandas graph objects and converts them into PyTorch Geometric-ready tensors for graph representation learning. Installation is pip-first (extras for PyTorch/Geometric with CPU or CUDA: cu118/cu124/cu126/cu128 variants); conda can install core pieces but pip is recommended for full PyTorch support. Cite the project (Sato 2025) when used in research.
Loading comments...
loading comments...