openstreetmap

Cant parse XML tree without bounds element from Pyosmium

Cant parse XML tree without bounds element from Pyosmium Question: I downloaded some data from OpenStreetMap, and have been sorting the data so i only have the nodes and ways that i need for my project (highways and the corresponding nodes in the references). To sort the XML file and create a new one, i …

Total answers: 1

Load a Graph from .osm file using Osmnx/Python

Load a Graph from .osm file using Osmnx/Python Question: I want to load a graph from XML, i.e. .osm file, using Osmnx Python library. The .osm file contains roads not connected each other, for example only highway=primary and highway=primary_link of a country’s region. I use the parameter retain_all to avoid discarding all the roads, since …

Total answers: 1

Extremely long response time with graph_from_place OSMNX

Extremely long response time with graph_from_place OSMNX Question: I’m trying to download the map of Mexico to avoid querying using save_graphml and avoiding long response times in the graph_from_place, but I’ve already left this code running for almost six hours and absolutely nothing happens. import osmnx as ox ox.config(use_cache=True, log_console=True) G = ox.graph_from_place(‘Mexico’, network_type = …

Total answers: 1

python osmnx – extract only big freeways of a country

python osmnx – extract only big freeways of a country Question: 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 …

Total answers: 2

OSMNx : get coordinates of nodes using OSM id

OSMNx : get coordinates of nodes using OSM id Question: I used the Python library OSMNx to draw an optimal route between several steps of a city trip. The final variable is a list of OSM ids. Now, I’m trying to save this route as a shp or json files. The problem is that I …

Total answers: 4