Skip to content

gboeing/osmnx

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
June 13, 2023 22:18
June 18, 2023 22:22
June 18, 2023 21:15
June 18, 2023 21:05
June 18, 2023 21:17
June 18, 2023 21:42
November 28, 2022 08:47
December 14, 2022 19:32
June 18, 2023 14:48
May 23, 2023 21:56
December 19, 2022 21:31
November 28, 2022 08:37
June 18, 2023 21:15
November 28, 2022 08:37
June 18, 2023 21:42

PyPI Version PyPI Downloads Anaconda Downloads Documentation Status Build Status Coverage Status

OSMnx

OSMnx is a Python package that lets you download geospatial data from OpenStreetMap and model, project, visualize, and analyze real-world street networks and any other geospatial entities. 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 download and work with other infrastructure types, amenities/points of interest, building footprints, elevation data, street bearings/orientations, speed/travel time, and routing.

If you use OSMnx in your work, please cite the journal article.

Citation info: Boeing, G. 2017. "OSMnx: New Methods for Acquiring, Constructing, Analyzing, and Visualizing Complex Street Networks." Computers, Environment and Urban Systems 65, 126–139.

Getting Started

How do I install OSMnx? Follow the installation instructions.

How do I use OSMnx? Check out the usage examples/tutorials in the examples gallery.

How does this or that function work? Read its documentation.

What can I do with OSMnx? Check out recent projects and blog posts that use OSMnx.

I have a usage question. Please ask it on StackOverflow.

Features

OSMnx is pronounced as the initialism: "oh-ess-em-en-ex". It is built on top of NetworkX and GeoPandas, and interacts with OpenStreetMap APIs to:

  • Download and model street networks or other networked infrastructure anywhere in the world with a single line of code
  • Download any other geospatial entities (e.g., political boundaries, building footprints, grocery stores, transit stops) as a GeoDataFrame
  • Download by city name, polygon, bounding box, or point/address + distance
  • Model driving, walking, biking, and other travel modes
  • Download node elevations and calculate edge grades (inclines)
  • Impute missing speeds and calculate graph edge travel times
  • Simplify and correct the network's topology to clean-up nodes and consolidate complex intersections
  • Fast map-matching of points, routes, or trajectories to nearest graph edges or nodes
  • Save networks to disk as GeoPackages or GraphML files
  • Save/load a street network to/from a .osm XML file
  • Conduct topological and spatial analyses to automatically calculate dozens of indicators
  • Calculate and visualize street bearings and orientations
  • Calculate and visualize shortest-path routes that minimize distance, travel time, elevation, etc
  • Explore street networks as a static map or interactive web map
  • Visualize travel distance and travel time with isoline and isochrone maps
  • Plot figure-ground diagrams of street networks and building footprints

All of these features are demonstrated in the examples gallery and documented in the documentation. Feature development details are in the change log. Read the journal article for further technical details.

License

OSMnx is open source and licensed under the MIT license. OpenStreetMap's open data license requires that derivative works provide proper attribution.