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:
- Standardized bicycle facility information
- Bicycle facilities for the right and left sides of the road,
- 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.
- 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:
- Advanced Stop Line
- Shared Road
- Bike Lane
- Buffered Bike Lane
- Protected Bike Lane
- Shared Use Path
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.