City2Graph · Export for GeoAI

Export a graph for graph neural networks: JSON or GraphML, homogeneous or heterogeneous, plus a standalone PyTorch Geometric loader script. Mirrors the Export panel.

Works on any active graph object: a street network, a proximity graph, a morphological graph or a metapath result.

1. Choose the format and graph type

Graph Type is the one that matters. Homogeneous covers a single node and edge type; Heterogeneous is what a morphological or metapath graph needs, since those carry multiple layers. Format is JSON or GraphML.

Selecting the export format and graph type.

2. Export the graph

Set the Export Path and press Export Graph. The file is written in a layout city2graph.gdf_to_pyg can load into a PyTorch Geometric Data or HeteroData object.

Exporting the graph to disk.

3. Save the loader script

Save Loader Script writes a self-contained Python file that reloads the exported graph into PyTorch Geometric without Blender, ready to drop into a training pipeline.

Saving the standalone PyG loader script.

Next steps

That completes the panel tutorials. For end-to-end scenarios see the Examples; to drive the same operations from Python, the Python API reference.

Back to top