Skip to content

1ec5/apple-turnover

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Apple Turnover

Half-baked OpenStreetMap turn lane analysis

Apple Turnover is a tool that performs basic analysis on the attributes of turn lanes in OpenStreetMap.

Features

With Apple Turnover, you can gather statistics about the lengths of turn lanes by speed limit, highway classification, or other attributes. Apple Turnover contains the following all-natural ingredients:

  • Recognizes :forward, :backward, two-way, and one-way turn lane data
  • Correctly handles left and right turn lanes on the same road in which the lanes’ start and end points are staggered
  • Spans maneuvers across multiple ways split due to changes in lane count, speed limit, name, etc.
  • Consolidates maneuvers that are multiple lanes wide
  • Distinguishes between segments of turn lanes that allow and disallow lane changes

How to bake

  1. Clone this repository and run npm install to install this tool’s dependencies.
  2. Using Overpass turbo, query for turn lanes in a specific region in which turn lanes have been mapped. Examples:
  3. Click the Export button. Under the Data section, choose “raw data” and save the file to disk.
  4. Run the following command to analyze the exported file and output the results:
    node index.js export.json output.csv
    If no output file is specified, the tool outputs to the command line.

Output format

The output file is a tab-delimited file. Each line represents one maneuver, such as a left turn or right turn. Only explicitly tagged maneuvers (i.e., turn:lanes:forward) are accounted for. The file has the following columns:

  • ID of the node at the beginning of the turn lane
  • ID of the node at the end of the turn lane, where the driver turns
  • left, right, or reverse, as indicated by lane markings or signage; combinations of maneuvers, such as left;right, result in separate maneuvers
  • The highway tag of the way at the end of the turn lane
  • The highway tag of the way onto which the driver turns (the cross street)
  • The number of lanes that may be used for this maneuver
  • The length (in meters) of the turn lane
  • The length (in meters) of the portion of the turn lane that is surrounded by lane change restrictions; left blank if the entire lane is subject to lane change restrictions
  • The explicit maximum speed limit (in meters per second) along the turn lane; if the speed limit varies along the turn lane, an average weighted by distance

About

Half-baked OpenStreetMap turn lane analysis

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages