gboeing / osmnx

OSMnx is a Python package to easily download, model, analyze, and visualize street networks and other geospatial features from OpenStreetMap.
https://osmnx.readthedocs.io
MIT License
4.84k stars 821 forks source link

Cannot load XML made with osmosis with --bounding-polygon option #662

Closed meitiv-et closed 3 years ago

meitiv-et commented 3 years ago

**Problem description

Environment information

**Example

**

$ osmosis --read-pbf planet.pbf --bounding-polygon file=texas.poly --tf accept-ways highway=motorway --write-xml texas_motorway.osm
import osmnx
g = osmnx.graph_from_xml('texas_motorway.osm')
meitiv-et commented 3 years ago

It's the issue with the XML after all. When I use --compete-ways with osmconvert like so

$ osmconvert planet.osm -B=texas.poly --complete-ways -o=texas_motorway.osm

the resulting XML is loaded fine by osmnx.graph_from_xml()