[Python] Saving .graphml file fails to include lat/lng-attributes

Discussão em 'Python' iniciado por Stack, Maio 20, 2025.

  1. Stack

    Stack Membro Participativo

    I generated a graph from a city using OSMnx:

    ka1 = ox.graph_from_place("Karlsruhe, Germany", network_type="drive")


    Then I saved it as a .graphml file:

    ox.save_graphml(ka1,filepath="/home/user/karlsruhe.graphml", gephi=True, encoding='utf-8')


    But now lat and lng data (x and y) isn't part of the graphml file anymore. To display the graph with the Geo Layout Plugin in Gephi, the nodes need lat and lng data. Is it possible to get a .graphml file with lat and lng data?

    Continue reading...

Compartilhe esta Página