OSMnx is a free and open-source Python package for downloading, modeling, analyzing, and visualizing street networks and other geospatial features from OpenStreetMap. It represents spatial networks as NetworkX graph objects and can convert them to and from GeoPandas data structures.
OSMnx is used in research on urban form, transportation, accessibility analysis, and travel behavior and is taught in textbooks on spatial analysis and geographic data science.
History
OSMnx was developed by Geoff Boeing, a professor of urban planning and spatial analysis at the University of Southern California. The project was initially motivated by the difficulty of acquiring consistently defined street network data and converting it into graph models suitable for reproducible analysis. Its development reflected a broader effort to make spatial science software more accessible and to encode geographic theory in reusable research tools. The package has been part of the growing ecosystem of open source software for urban planning and transport analysis, and is commonly used for modeling and analyzing real-world networks from geospatial vector data.
OSMnx was first released in November 2016. As of 2026, it had been downloaded over 13 million times. In 2025, OSMnx won the Zephyr Foundation's Exceptional Technical Achievement Award, which recognizes projects with high potential to improve transportation or land-use decision-making. OSMnx has received media coverage from Bloomberg, Forbes, FlowingData, Planetizen, Domus, MIT Technology Review, and 99% Invisible.
Features
OSMnx can retrieve OpenStreetMap data for a named place, polygon, bounding box, or area around a point, and then model a network for walking, driving, cycling, or user-defined sets of OpenStreetMap ways. It can also retrieve tagged OpenStreetMap features such as buildings, amenities, and transit stops. It represents spatial networks as NetworkX directed multigraphs, allowing parallel edges and one-way flow constraints.
OSMnx offers topological simplification algorithms that can merge nodes or edges such that nodes represent intersections and dead-ends and edges represent the street segments between them, while retaining the full original street geometry. This reduces intersection overcounting and produces accurate measurements of intersection density, street segment length, and node degree. Nodes and edges can be converted to GeoPandas data structures, projected to other coordinate reference systems, visualized, and saved in graph or GIS file formats. The package supports shortest-path routing and calculates network statistics including street and intersection density, node degree, circuity, and street orientation. OSMnx can also add elevation, street grade, speed, and travel-time attributes to the graph.
Applications
OSMnx has been used to analyze street networks at neighborhood, city, and multi-city scales. Systematic reviews of open-source urban analysis software have identified its use in street network and built environment research. Transportation applications include modeling cyclists' route choices, comparing travel times by car and public transport, studying bicycle network growth, and preparing road network data for traffic assignment models. Beyond transportation, studies have used OSMnx to study spatial accessibility and justice, segregation across multimodal transport networks, traffic emissions modeling, urban health indicators, and machine learning research on urban form.
↑Hofer, Christian; Jäger, Georg; Füllsack, Manfred (2018). "Large scale simulation of CO2 emissions caused by urban car traffic: An agent-based network approach". Journal of Cleaner Production. 183: 1–10. doi:10.1016/j.jclepro.2018.02.113.
↑Law, Stephen; Neira, Mateo (2019). "An unsupervised approach to geographical knowledge discovery using street level and street network images". Proceedings of the 3rd ACM SIGSPATIAL International Workshop on AI for Geographic Knowledge Discovery. pp.56–65. arXiv:1906.11907. doi:10.1145/3356471.3365238.