Geographic Information Systems Asked by Rahul Agnihotri on July 30, 2021
I am trying to extract a subgraph using networkx
ego_graph
function from Los Angeles County graph.
When i plot this graph and compare it with graph generated from graph_from_point
(which looks correct), they seem to be completely different.
Here is my code
G = ox.graph_from_place('Los Angeles County, California, USA')
node = ox.get_nearest_node(G, (34.6806, -118.1435))
Subgraph from networkx
sub_graph = nx.ego_graph(G, node, radius=2500, distance='length')
ox.plot_graph(sub_graph)
graph_from_point
g = ox.graph_from_point((34.6806, -118.1435), dist = 2500)
ox.plot_graph(g)
Both sub_graph and g look completely different.
Am i doing anything wrong here?
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP