Questions tagged [osmnx]

OSMnx is a Python package to download, model, analyze, and visualize street networks and other geospatial features from OpenStreetMap. You can download and model walking, driving, or biking networks with a single line of code then easily analyze and visualize them. You can just as easily work with urban amenities/points of interest, building footprints, transit stops, elevation data, street orientations, speed/travel time, and routing.

OSMnx is a package to download, model, analyze, and visualize street networks and other geospatial features from . OSMnx is built on top of and . You can download and model walking, driving, or biking networks with a single line of code then easily analyze and visualize them. You can just as easily work with urban amenities/points of interest, building footprints, transit stops, elevation data, street orientations, speed/travel time, and routing.

596 questions
0
votes
1 answer

Igraph shortest path gives an infinite value

I am trying to calculate the distance between a node and two targets, afterwards I compare the lengths of the routes calculated and save the smallest in a list. I know I can use networkx.shortest_path() however this solution takes a long time and…
DPM
  • 845
  • 7
  • 33
0
votes
1 answer

How to make a for cycle with if conditions faster

I have written a piece of code however it takes an enormous amount of time to run and I don't know how to make it faster. Can anyone help me? Here is the code: import networkx as nx import matplotlib.pyplot as plt import osmnx as ox import pandas as…
DPM
  • 845
  • 7
  • 33
0
votes
1 answer

Node found is too far from my lat, lon coordinates (osmnx)

My problem is: I have the geographical coordinates of a place, but when I use ox.get_nearest_node(), the node I get is way too far from the coordinates and I don't know why: import networkx as nx import matplotlib.pyplot as plt import osmnx as…
DPM
  • 845
  • 7
  • 33
0
votes
1 answer

OSMnx : normalised measure of orientation order

Hi I am trying to calculate the normalised orientation order First calculate the bearings of every edge of the street networking into 36 equal sized bins (representing 360 degree with each bin representing 10 degrees) using import datetime import…
Mohammad
  • 47
  • 1
  • 5
0
votes
1 answer

Kernel constantly crashes while compiling my code

I am currently trying to get the drive network of Continental Portugal, which is a Polygon. However kernel on the last line of code crashes. In the ubuntu terminal it says; 'Created graph with 4,901,116 nodes and 9,503,596 edges in 101.64 seconds',…
DPM
  • 845
  • 7
  • 33
0
votes
1 answer

Kernel keeps dying and can't compile code (osmnx)

Good evening, I am currently trying to download data from a polygon and I can't compile the code because kernel keeps dying. Here is the code: import geopandas as gpd import pandas as pd from shapely.geometry import Point, LineString, Polygon…
DPM
  • 845
  • 7
  • 33
0
votes
1 answer

How do I solve an Intel MK Fatal Error when running OSMNX in Python?

I am running Python 3.6.1 with Anaconda 4.4.0 (64-bit) on Windows 10. I am trying to run OSMNX sample code (seen here) My code starts by successfully importing packages: import requests import matplotlib.cm as cm import matplotlib.colors as…
0
votes
1 answer

Issues installing OSMnx in conda

I am having some troubles trying to install OSMnx in conda. Accorgding to OSMnx documentation on github https://github.com/gboeing/osmnx, I must run the following code in conda prompt in to install conda config --prepend channels conda-forge conda…
0
votes
1 answer

osmnx get_nearest_edges function results unclear on which key

The get_nearest_edges function in the python mapping package osmnx seems to return results based only on the nodes, u and v. In some cases the map downloading functions return multiple edges between two nodes though. How do I tell which of these…
T. Shaffner
  • 359
  • 1
  • 5
  • 22
0
votes
1 answer

OSMnx finding the shortest path of a directed graph using networkx

In OSMnx the streets are directed in order to preserve one-way directionality and therefore, when I try to find the shortest path using Networkx I get NetworkXNoPath: No path to (osmid). How do I fix this issue? I need to find the shortest path in a…
malik
  • 1
  • 3
0
votes
1 answer

I would like to get the area from latitude and longitude, and then put buildings etc etc

This is my main code `graph=ox.graph_from_point((60.199695, 24.948005), distance=500, network_type='drive_service') area=ox.gdf_from_place(graph) buildings = ox.footprints_from_place(graph) nodes, edges = ox.graph_to_gdfs(graph) fig, ax =…
renton
  • 51
  • 5
0
votes
0 answers

networkX distance matrix generator to pandas DataFrame

I downloaded graph via osmnx and I want to get distance between all the nodes. I call nx.all_pairs_dijkstra_path_length(G, weight='length') which returns generator of dicts.I then store it into DataFrame and then to .csv How to cope with huge graphs…
0
votes
0 answers

Some questions about Calculating "street_length_avg" in Linzhi City, Xizang, China

I tried to download shapefiles of some cities and calculate their 'street_length_avg' by OSMnx, but found some error about nodes of Linzhi City, Xizang, China: As shown in figures,I found that nodes on a long road have not been properly…
0
votes
1 answer

OSMNX package: osmnx.footprints not working

Here is a code that I have seen working correctly for other people, where I try to import building footprints. import osmnx #osmnx.config(log_console=True, use_cache=True) import matplotlib.pyplot as plt %matplotlib inline point = (40.719464,…
YoungDev
  • 33
  • 1
  • 4
0
votes
2 answers

OSMNX : How to plot nodes only?

I've tried to plot a map with trees. These are nodes in openstreetmap so I'm wondering if it's possible to plot a map with nodes only, without edge between them ? Here's my code: place=['Saint-Egreve,France'] G =…
niavlys
  • 1
  • 1
  • 1