I used OSMnx to retrieve the road networks in France. For execution time constraints, I retrieved the data department by department: While trying to retrieve the road network of all of France at once, my script ran for 4 days without results. Therefore, I retrieve the data department by department. I stored the data on disk, and now I need to combine the graphs of all the departments to obtain the complete road network of France.
Is there any function with OSMnx to combine several graphs into one?
Below is my code to retrieve data by department
departments = ["Ain","Aisne", "Alpes de Haute-Provence",..., "Seine-Saint-Denis", "Val-de-Marne", "Val-d'Oise"]
for department in departments:
DepartemntName = department + ",France"
G = ox.graph_from_place(DepartmentName, network_type="drive")
filePathToSave = "AllDepartmentsData/" + department +".graphml"
ox.save_graphml(G,filePathToSave)