Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

to_graph() method too time consuming #172

Open
SpoJa92 opened this issue Feb 3, 2022 · 0 comments
Open

to_graph() method too time consuming #172

SpoJa92 opened this issue Feb 3, 2022 · 0 comments

Comments

@SpoJa92
Copy link

SpoJa92 commented Feb 3, 2022

Hi,

I am working with the OSM for Germany. I loaded the pbf.-file succesfully. However, converting the data into a graph is too time consuming.

How can I speed up the process?

I am attaching my code for more details. Thank you for your support.

import os
from pyrosm import OSM, get_data
import osmnx as ox
import networkx as nx


os.chdir(r"my_path")

pbf = "germany-latest.osm.pbf"
osm = OSM(pbf)

print(type(osm))

nodes, edges = osm.get_network(nodes=True, network_type="driving")

G = osm.to_graph(nodes, edges, graph_type="networkx")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant