osmnx

.plot() command does not display anything

大城市里の小女人 提交于 2020-02-25 04:14:07
问题 I have this code based on this question, just a different point Extract constrained polygon using OSMnx I am trying to plot the block in which the point is located but it does nothing, it just prints "Done" but I cannot see any image import osmnx as ox import geopandas as gpd import shapely point = (50.090464, 14.400070) streets_graph = ox.graph_from_point(point, distance=500, network_type='drive') streets_graph = ox.project_graph(streets_graph) streets = ox.save_load.graph_to_gdfs(streets

.plot() command does not display anything

最后都变了- 提交于 2020-02-25 04:13:49
问题 I have this code based on this question, just a different point Extract constrained polygon using OSMnx I am trying to plot the block in which the point is located but it does nothing, it just prints "Done" but I cannot see any image import osmnx as ox import geopandas as gpd import shapely point = (50.090464, 14.400070) streets_graph = ox.graph_from_point(point, distance=500, network_type='drive') streets_graph = ox.project_graph(streets_graph) streets = ox.save_load.graph_to_gdfs(streets

Cannot import name 'CRS' from 'pyproj' for using the osmnx library

谁都会走 提交于 2020-02-25 03:42:08
问题 I have used a fresh anaconda install to download and install all the required modules for osnmx library but I got the following error: 回答1: I have had the same issue and turned out that it did not like the latest release of osmnx (0.11.3). It could be that that version is unstable as its new (9th January 2020). I have sort out the issue by uninstalling the osmnx 0.11.3 conda uninstall osmnx and forcing to install the osmnx 0.11 version pip install osmnx==0.11 来源: https://stackoverflow.com

Plotting different area objects in OSMnx

时光怂恿深爱的人放手 提交于 2020-01-06 07:31:50
问题 I am wondering if it is possible to plot area objects from OSM through OSMnx. It seems to me, that there is an easy way only to plot buildings. But I would like to be able to plot e.g. rivers, but can't find a place to specify this. I was hoping for a similar mechanism to plotting different way objects (e.g. power lines) through infrastructure parameter in graph_from_bbox function. Is there something like that but for areas? What I did already is to try a minimal example: import osmnx as ox

OSMnx Add Title to Graph Plot

我们两清 提交于 2020-01-06 05:59:15
问题 I'm using the wonderful OSMnx library created by Geoff Boeing. I am plotting a street network based on one of his tutorials. Everything works perfectly. However, I would like to plot more than 40 graphs, using different centralities. Therefore, I would like to add a title with each district and centrality name to each plot. Currently, it looks like this. Plotted OSMnx Street Network This is what my code looks like. def display_most_important_node(G_centralities_sorted_dict, G_dictionary,

OSMnx Visualize the graph of edge centrality on Folium

跟風遠走 提交于 2020-01-04 09:47:07
问题 I'm trying to plot the graph of edge centrality on the folium using the following code graph_map = ox.plot_graph_folium(G, popup_attribute='name', tiles='stamenterrain', edge_color=ec, edge_width=2) where ec is list of edge colors but it is not showing up. Does edge_color accept a list of colors ? Any ideas? I really appreciate if you can help me. https://github.com/gboeing/osmnx-examples/blob/master/notebooks/08-example-line-graph.ipynb 回答1: I tried adding a new column of edge color to gdf

OSMnx Visualize the graph of edge centrality on Folium

[亡魂溺海] 提交于 2020-01-04 09:43:49
问题 I'm trying to plot the graph of edge centrality on the folium using the following code graph_map = ox.plot_graph_folium(G, popup_attribute='name', tiles='stamenterrain', edge_color=ec, edge_width=2) where ec is list of edge colors but it is not showing up. Does edge_color accept a list of colors ? Any ideas? I really appreciate if you can help me. https://github.com/gboeing/osmnx-examples/blob/master/notebooks/08-example-line-graph.ipynb 回答1: I tried adding a new column of edge color to gdf

OSMnx Visualize the graph of edge centrality on Folium

主宰稳场 提交于 2020-01-04 09:43:34
问题 I'm trying to plot the graph of edge centrality on the folium using the following code graph_map = ox.plot_graph_folium(G, popup_attribute='name', tiles='stamenterrain', edge_color=ec, edge_width=2) where ec is list of edge colors but it is not showing up. Does edge_color accept a list of colors ? Any ideas? I really appreciate if you can help me. https://github.com/gboeing/osmnx-examples/blob/master/notebooks/08-example-line-graph.ipynb 回答1: I tried adding a new column of edge color to gdf

python osmnx - extract only big freeways of a country

不想你离开。 提交于 2019-12-22 17:54:25
问题 I know it is possible to extract the road network of a city via the OSMNX python package. See details at https://geoffboeing.com/2016/11/osmnx-python-street-networks/ . paris_network = ox.gdf_from_place("Paris") But, let's say I do not want that level of high details, but rather only big freeways of a whole country. I'm looking for something like : france_big_expressway_network = ox.gdf_from_place("France", road_type = "freeway") I guess it might comes from the "infrastructure" argument but

Save a route and conserve its curvature with Python OSMnx

橙三吉。 提交于 2019-12-13 04:43:19
问题 With OSMnx, I would like to be able to save a path with its curvature as the image below shows. import osmnx as ox import networkx as nx # Download the road network G = ox.graph_from_place('Monterey, California', network_type='drive') # Starting and ending point of a trip start = [36.580665,-121.8297467] end = [36.594319,-121.8727587] # Retrieve nearest node orig_node = ox.get_nearest_node(G, start) dest_node = ox.get_nearest_node(G, end) # Compute the path of the trip route = nx.shortest