osmnx

subdividing edges based on a maximum length

无人久伴 提交于 2019-12-13 03:49:45
问题 Is there any way in osmnx or networkx to subdivide/resample/split street edges based on a maximum length? I'm doing shortest path routing based on addresses, but my maps often don't have enough node resolution to put a node close enough to each address. Subdividing edges would allow me to insert more nodes. 回答1: Check out this OSMnx PR which includes some discussion of subdividing edges into 50 meter chunks. In particular, you can use OSMnx's redistribute_vertices function which borrows logic

Python: How can I import waterways from OpenStreetMaps as a graph so I can do graph analysis with networkx

人走茶凉 提交于 2019-12-11 05:23:21
问题 Thanks at first for actually taking the time to help me :-) I want to create a undirected graph from waterways for example from the canals of Venice or Amsterdam. OpenStreetMaps has such a graph of a waterway network of these cities, but the OSMnx package does not have such a filter to filter the waterways (or maybe I don't know it yet ;-) ). import osmnx as ox G = ox.graph_from_bbox(52.36309012572587,4.890326718121118,52.36590601699889,4.898316757037793, network_type='all') G_projected = ox

A module is working in Anaconda prompt, but not in Spyder

纵然是瞬间 提交于 2019-12-01 02:26:55
问题 I have been fighting with this problem for hours now, and it's a kind of complicated one. I'm on windows 7, Python 2.7, Spyder 3.2.6 I tried to install OSMNX through cygwin , however I faced many issues. Finally managed to install it through windows cmd. Through the anaconda prompt , I could import the osmnx with no error. However, I'm trying to import it in spyder, but I keep receiving: Traceback (most recent call last): File "<ipython-input-2-2b99ab66aebb>", line 1, in <module> import osmnx