Extracting Bicycle Facilities from Open Street Map (OSM)

I’ve been working on a Python package called ExtractOSM that can extract roadway features from large Open Street Map (OSM) Protocolbuffer Binary Format (PBF) files. The latest addition to this package includes new features to extract and standardize bike facility information. The results are returned in shapefile format, and include the following attributes:

  1. Standardized bicycle facility information
  2. Bicycle facilities for the right and left sides of the road,
  3. Bicycle facility that provides the minimum and maximum protection for a given roadway segment
    • One-way roads are treated a little differently. On these road types, the facility that provides the maximum protection is used for both the min and maximum facility types. This assumes riders will use the facilities that provide the maximum level of protection on one-way roads. 
  4. Number of lanes (right and left), max speed limit, oneway flag, functional classification (OSM standard), and list of associated OSM nodes. Information is only included where available.

The resulting roadway feature shapefile is provided with the original OSM bicycle facility tag, as well as a standardized version that describes the tag in commonly used terms for bicycle facilities. Here’s the list of the possible values of standardized bicycle facilities:

  1. Proposed
  2. Crossing
  3. Advanced Stop Line
  4. Shoulder
  5. Shared Road
  6. Bike Lane
  7. Buffered Bike Lane
  8. Protected Bike Lane
  9. Shared Use Path
  10. Cycleway

You can review the mapping from OSM value to the list above, here. Feel free to suggest any changes.

I’ve provided a Dockerfile and a few supporting files that create an Anaconda environment to use ExtractOSM. I suggest cloning the repo and running the Dockerfile from the clone because you’ll need the ‘data’ folder and the supporting files setup the same way as in the repo. Please note this might change, since I’m hoping to make this project available through Python Package Index.

To date, I’ve processed Colorada, Texas, Oklahoma, Virginia, Washington, Northern California, and Nevada. Happy to provide those files – just reach out.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s