I'm trying to download the map of Mexico to avoid querying using save_graphml
and avoiding long response times in the graph_from_place
, but I've already left this code running for almost six hours and absolutely nothing happens.
import osmnx as ox
ox.config(use_cache=True, log_console=True)
G = ox.graph_from_place('Mexico', network_type = 'drive', simplify=False)
G = ox.add_edge_speeds(G)
G = ox.add_edge_travel_times(G)
ox.save_graphml(G, '/var/www/html/repmexico.graphml')
print("Success!!!")
Today I am trying to run the code on a server with 74GB of RAM and (Intel xeon x5570) X2
(I know that due to the stipulated area the time is long, but what I wanted to know is if there is an alternative to this procedure or if there is a way to optimize so that the creation of the map is a little faster or if there is another way to load maps to route with osmnx and networkx without using queries to servers)